summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/gradient.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/outdev/gradient.cxx')
-rw-r--r--vcl/source/outdev/gradient.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 7fc37b31c9ab..2e8406714daf 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -50,6 +50,10 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
{
assert(!is_double_buffered_window());
+ if (mbInitClipRegion)
+ InitClipRegion();
+ // don't return on mbOutputClipped here, as we may need to draw the clipped metafile, even if the output is clipped
+
if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
{
if ( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) )
@@ -94,20 +98,17 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
if( !mpGraphics && !AcquireGraphics() )
return;
- if( mbInitClipRegion )
- InitClipRegion();
-
- if (mbOutputClipped)
- return;
-
// secure clip region
Push( PushFlags::CLIPREGION );
IntersectClipRegion( aBoundRect );
+ if (mbInitClipRegion)
+ InitClipRegion();
+
// try to draw gradient natively
bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
- if (!bDrawn)
+ if (!bDrawn && !mbOutputClipped)
{
// draw gradients without border
if( mbLineColor || mbInitLineColor )