summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-05-14 14:42:24 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-05-29 06:25:05 +0200
commitd5a995c0296df61cd6c9341779bccbf8989ecc75 (patch)
tree8c5e2a35576ee11ccdc96fb46739ceabd4c01e80 /drawinglayer
parent425125e31f9053e0e4895fb13e1e267ec5d26487 (diff)
Use buffer with alpha in VclProcessor2D::RenderTransparencePrimitive2D
This allows TransparencePrimitive2D to produce truly transparent image, usable later in the stack - specifically by soft edge effect. Change-Id: I54e6f9a8fd196247b1130446af3d21b082820f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95038 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 9e3cf43208bc..60b372b0ef48 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -870,7 +870,7 @@ void VclProcessor2D::RenderTransparencePrimitive2D(
basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D()));
aRange.transform(maCurrentTransformation);
- impBufferDevice aBufferDevice(*mpOutputDevice, aRange);
+ impBufferDevice aBufferDevice(*mpOutputDevice, aRange, true);
if (!aBufferDevice.isVisible())
return;
@@ -878,6 +878,7 @@ void VclProcessor2D::RenderTransparencePrimitive2D(
// remember last OutDev and set to content
OutputDevice* pLastOutputDevice = mpOutputDevice;
mpOutputDevice = &aBufferDevice.getContent();
+ mpOutputDevice->Erase();
// paint content to it
process(rTransCandidate.getChildren());
@@ -889,6 +890,8 @@ void VclProcessor2D::RenderTransparencePrimitive2D(
basegfx::BColorModifierStack aLastBColorModifierStack(maBColorModifierStack);
maBColorModifierStack = basegfx::BColorModifierStack();
+ mpOutputDevice->Erase();
+
// paint mask to it (always with transparence intensities, evtl. with AA)
process(rTransCandidate.getTransparence());