From 710f3c63af2d8bee7d5e860614145799a3f0e491 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Mon, 3 Jun 2019 22:52:05 +0000 Subject: tdf#125670 just check gradient clipping on drawing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- vcl/source/outdev/gradient.cxx | 9 +++------ 1 file 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 ); -- cgit