diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-03 22:52:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-06 18:15:01 +0200 |
commit | 710f3c63af2d8bee7d5e860614145799a3f0e491 (patch) | |
tree | b04c4c91cc021980b9ae6c680b3a00130013d91b | |
parent | e2cb51bfbdc4b83ace14a5984f242c252ddd11b7 (diff) |
tdf#125670 just check gradient clipping on drawing
Otherwise the gradient won't be commited to the Metafile, as
mbOutputClipped will be true, because the output device will
have just one pixel size.
Change-Id: I73084eb715ee6313f6478eded24feb9abfc411f3
Reviewed-on: https://gerrit.libreoffice.org/73423
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index fad0604920e0..d356355889d1 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -50,12 +50,6 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, { assert(!is_double_buffered_window()); - if ( mbInitClipRegion ) - InitClipRegion(); - - if ( mbOutputClipped ) - return; - if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() ) { if ( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) ) @@ -107,6 +101,9 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, if( mbInitClipRegion ) InitClipRegion(); + if ( mbOutputClipped ) + return; + // try to draw gradient natively bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient ); |