From 81a9e0eb98eacfb50ee1b30d1bbaea7a02594cc6 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 15 Oct 2020 12:07:51 +0200 Subject: sd: fix transparency when drawing OverlayPolyPolygon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit should be sal_uInt8 not sal_Int8, which means that the we could have a negative transpareny in some cases. Change-Id: I53c414878f0d88e58a6a9670f3f49ea23f8990a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104368 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- svx/source/sdr/overlay/overlaypolypolygon.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx index b338d171e551..8abde414faa0 100644 --- a/svx/source/sdr/overlay/overlaypolypolygon.cxx +++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx @@ -59,8 +59,8 @@ namespace sdr::overlay aReturnContainer.push_back(aFill); } - sal_Int8 nTransparency = getBaseColor().GetTransparency(); - if (nTransparency != 0) + sal_uInt8 nTransparency = getBaseColor().GetTransparency(); + if (nTransparency > 0) { const drawinglayer::primitive2d::Primitive2DReference aTransparencePrimitive( new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aReturnContainer, nTransparency / 255.0)); -- cgit