diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-14 14:42:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-29 10:31:12 +0200 |
commit | 82acd02f1395ea1a1b1e43c6b4beeec93ebf9428 (patch) | |
tree | 017552883e8233fcf7d04d77c728c3bc82829bc4 /drawinglayer/source | |
parent | a89d2a19930ba4f14bc498978664c45bfd3e8b58 (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>
(cherry picked from commit d5a995c0296df61cd6c9341779bccbf8989ecc75)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95080
Tested-by: Jenkins
Diffstat (limited to 'drawinglayer/source')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 5 |
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()); |