summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-08-20 00:06:18 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-10 10:16:05 +0100
commite0348118fc7ce7591782b4929c338d4832f3365d (patch)
tree2a8a67298143a8fae94c30675f4fc14b92b9d9d4 /drawinglayer
parent496c1cda4d52b3e37bfc0d5bb162a9fee00794b3 (diff)
Deduplicate some code
Change-Id: I37c492adef30db748eaa975247d386dcd953257b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100949 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112248
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx23
1 files changed, 7 insertions, 16 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index ffb649da3554..e937ac0e8fad 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -790,22 +790,13 @@ void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive
if (!basegfx::utils::isRectangle(aMask))
{
// draw mask
- if (getOptionsDrawinglayer().IsAntiAliasing())
- {
- // with AA, use 8bit AlphaMask to get nice borders
- VirtualDevice& rTransparence = aBufferDevice.getTransparence();
- rTransparence.SetLineColor();
- rTransparence.SetFillColor(COL_BLACK);
- rTransparence.DrawPolyPolygon(aMask);
- }
- else
- {
- // No AA, use 1bit mask
- VirtualDevice& rMask = aBufferDevice.getMask();
- rMask.SetLineColor();
- rMask.SetFillColor(COL_BLACK);
- rMask.DrawPolyPolygon(aMask);
- }
+ // with AA, use 8bit AlphaMask to get nice borders; no AA -> use 1bit mask
+ VirtualDevice& rMask = getOptionsDrawinglayer().IsAntiAliasing()
+ ? aBufferDevice.getTransparence()
+ : aBufferDevice.getMask();
+ rMask.SetLineColor();
+ rMask.SetFillColor(COL_BLACK);
+ rMask.DrawPolyPolygon(aMask);
}
// dump buffer to outdev