diff options
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/BitmapColor.hxx | 18 | ||||
-rw-r--r-- | include/vcl/RawBitmap.hxx | 2 | ||||
-rw-r--r-- | include/vcl/salgtype.hxx | 2 |
3 files changed, 17 insertions, 5 deletions
diff --git a/include/vcl/BitmapColor.hxx b/include/vcl/BitmapColor.hxx index 634ae6902d27..b5364b4d146f 100644 --- a/include/vcl/BitmapColor.hxx +++ b/include/vcl/BitmapColor.hxx @@ -27,7 +27,9 @@ class VCL_DLLPUBLIC BitmapColor final : public Color { public: inline BitmapColor(); - constexpr BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha = 0 ); + constexpr BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue ); + constexpr BitmapColor( ColorTransparencyTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cTransparency ); + constexpr BitmapColor( ColorAlphaTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha ); inline BitmapColor( const Color& rColor ); explicit inline BitmapColor( sal_uInt8 cIndex ); @@ -45,8 +47,18 @@ inline BitmapColor::BitmapColor( const Color& rColor ) { } -constexpr BitmapColor::BitmapColor(sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha) - : Color(cAlpha, cRed, cGreen, cBlue) +constexpr BitmapColor::BitmapColor(sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue) + : Color(cRed, cGreen, cBlue) +{ +} + +constexpr BitmapColor::BitmapColor(ColorTransparencyTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cTransparency) + : Color(ColorTransparency, cTransparency, cRed, cGreen, cBlue) +{ +} + +constexpr BitmapColor::BitmapColor(ColorAlphaTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha) + : Color(ColorAlpha, cAlpha, cRed, cGreen, cBlue) { } diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx index 79cef7c47e00..d3dcb642cf6c 100644 --- a/include/vcl/RawBitmap.hxx +++ b/include/vcl/RawBitmap.hxx @@ -55,7 +55,7 @@ public: if (mnBitCount == 24) return Color(mpData[p], mpData[p + 1], mpData[p + 2]); else - return Color(mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]); + return Color(ColorTransparency, mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]); } // so we don't accidentally leave any code in that uses palette color indexes void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor) = delete; diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx index 902170555526..1ab62fbdb6c7 100644 --- a/include/vcl/salgtype.hxx +++ b/include/vcl/salgtype.hxx @@ -34,7 +34,7 @@ enum class DeviceFormat { #endif }; -constexpr ::Color SALCOLOR_NONE ( 0xFF, 0xFF, 0xFF, 0xFF ); +constexpr ::Color SALCOLOR_NONE ( ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF ); struct SalTwoRect { |