diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-27 10:07:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-27 16:44:40 +0200 |
commit | 3529f28c679b117bf914e56a95a6e4d16cfbae4e (patch) | |
tree | 10106995c3135a0cfb6abb441598b8cca2f314a5 | |
parent | 323a2a249a6c87ffde52a1e826d5d12be649e018 (diff) |
ignoring transparency for border doesn't seem to make sense
If we are filling *and* drawing border then we do the border
transparently, but if we're not filling we draw the border
without transparency? I can't see that this is intentional.
Change-Id: Idf8d84bed7f93b1fc4ee05ea56bc10c5e5c6e875
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124261
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/outdev.hxx | 1 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 20 |
2 files changed, 1 insertions, 20 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index eb3f6acf7096..ed9e38f9fdbd 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1491,7 +1491,6 @@ public: protected: virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ); - void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly ); virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index fd0410f0e9e6..cf1bb63d1931 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -191,21 +191,6 @@ void OutputDevice::DrawTransparent( static_cast<sal_uInt16>(fTransparency * 100.0)); } -void OutputDevice::DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly ) -{ - assert(!is_double_buffered_window()); - - // short circuit if the polygon border is invisible too - if( !mbLineColor ) - return; - - // we assume that the border is NOT to be drawn transparently??? - Push( vcl::PushFlags::FILLCOLOR ); - SetFillColor(); - DrawPolyPolygon( rPolyPoly ); - Pop(); -} - bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { @@ -538,11 +523,8 @@ void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly, } // short circuit for drawing an invisible polygon - if( !mbFillColor || (nTransparencePercent >= 100) ) - { - DrawInvisiblePolygon( rPolyPoly ); + if( (!mbFillColor && !mbLineColor) || (nTransparencePercent >= 100) ) return; // tdf#84294: do not record it in metafile - } // handle metafile recording if( mpMetaFile ) |