summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit/bitmapcolor.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-08 13:45:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-08 17:20:48 +0100
commit6911375ab66df6fd4cb2b922ea1c9e57b4fcd3b2 (patch)
treeebe9d2610d30eda9d18b94370792e67cde6111ab /vcl/qa/cppunit/bitmapcolor.cxx
parent9cc41b9ad52e3da734ce72223946bd00bfc92d14 (diff)
Remove BitmapColor::GetAlpha
since its implementation is completely wrong - alpha and transparency are not the same thing, they are inverses of each other. Change-Id: Id9e00b8296391befd471345b6c86e0493a9e3f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qa/cppunit/bitmapcolor.cxx')
-rw-r--r--vcl/qa/cppunit/bitmapcolor.cxx31
1 files changed, 16 insertions, 15 deletions
diff --git a/vcl/qa/cppunit/bitmapcolor.cxx b/vcl/qa/cppunit/bitmapcolor.cxx
index eafa4d13805c..58d889a3d8a5 100644
--- a/vcl/qa/cppunit/bitmapcolor.cxx
+++ b/vcl/qa/cppunit/bitmapcolor.cxx
@@ -56,7 +56,8 @@ void BitmapColorTest::defaultConstructor()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Red wrong", static_cast<sal_uInt8>(0), aBmpColor.GetRed());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(0), aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(0), aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0), aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
void BitmapColorTest::colorValueConstructor()
@@ -68,8 +69,8 @@ void BitmapColorTest::colorValueConstructor()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(0),
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(0), aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
{
@@ -80,8 +81,8 @@ void BitmapColorTest::colorValueConstructor()
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(128),
aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
{
@@ -92,8 +93,8 @@ void BitmapColorTest::colorValueConstructor()
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(255),
aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
}
@@ -106,8 +107,8 @@ void BitmapColorTest::colorClassConstructor()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(0),
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(0), aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
{
@@ -118,8 +119,8 @@ void BitmapColorTest::colorClassConstructor()
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(127),
aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
{
@@ -130,8 +131,8 @@ void BitmapColorTest::colorClassConstructor()
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(255),
aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(0),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(0),
+ aBmpColor.GetTransparency());
}
// Transparency / Alpha
@@ -142,8 +143,8 @@ void BitmapColorTest::colorClassConstructor()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Green wrong", static_cast<sal_uInt8>(64),
aBmpColor.GetGreen());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Blue wrong", static_cast<sal_uInt8>(0), aBmpColor.GetBlue());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Alpha wrong", static_cast<sal_uInt8>(255),
- aBmpColor.GetAlpha());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Transparency wrong", static_cast<sal_uInt8>(255),
+ aBmpColor.GetTransparency());
}
}