diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-02 13:48:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-02 14:59:15 +0200 |
commit | 9824134ab3c19aa0a00943c65a0e09c36ef23899 (patch) | |
tree | ff40fd413c77ed3731bcd66d69eb423e43e9bd72 /drawinglayer | |
parent | ed8186531beb13d03e0041440c5d784177951516 (diff) |
drawinglayer: add transparency support to BackgroundColorPrimitive2D
Impress has tools Color that is wrapped in this primitive, then later
drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D()
converts it back to tools Color. Problem is that the primitive uses basegfx
BColor, so the alpha channel is lost.
Add member and API to survive this roundtrip.
Change-Id: I940e60f6e352022306abac3223636d19dd859355
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index 3441483a9ac4..ea10d205e2d8 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -50,9 +50,11 @@ namespace drawinglayer } BackgroundColorPrimitive2D::BackgroundColorPrimitive2D( - const basegfx::BColor& rBColor) + const basegfx::BColor& rBColor, + double fTransparency) : BufferedDecompositionPrimitive2D(), maBColor(rBColor), + mfTransparency(fTransparency), maLastViewport() { } @@ -63,7 +65,7 @@ namespace drawinglayer { const BackgroundColorPrimitive2D& rCompare = static_cast<const BackgroundColorPrimitive2D&>(rPrimitive); - return (getBColor() == rCompare.getBColor()); + return (getBColor() == rCompare.getBColor() && getTransparency() == rCompare.getTransparency()); } return false; |