summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-02 13:48:17 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-07 10:57:35 +0200
commite97e59a61f2d74e2cee337ee75d3cc33c0419b77 (patch)
tree96473738a698fbff1bf39ba68b03c827fe5b1ef7 /drawinglayer
parent72852df904bf1bf3efcde20371a0414052a798d8 (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 (cherry picked from commit 9824134ab3c19aa0a00943c65a0e09c36ef23899)
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx6
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;