summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-04-12 12:11:37 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-04-12 23:05:39 +1000
commit4981bb9eed1a51f8ce54d01c37bfb5b5d46f0637 (patch)
tree0b8c976a2a833078affc07238c0839e99f4c3cbe
parenta7228e0bdbb06de56145d1edeacfe4ede1a7a7d4 (diff)
Reduce the clip region in ClipAndDrawGradient
We should reduce OutputDevice's clipping region to the bounds of the polypolygon. To do this we run OutputDevice::Push(PUSH_CLIPREGION) to have it set the clip region of the device, then intersect the clip region of the device with the bounding rectangle. Change-Id: I58ff5d1def1eca3c1213c7fd2d6a7205b70cdd01
-rw-r--r--vcl/source/gdi/outdev4.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index ed149c69a10f..fde279004f8e 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -736,6 +736,10 @@ void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon
if( !mpGraphics && !ImplGetGraphics() )
return;
+ // secure clip region
+ Push( PUSH_CLIPREGION );
+ IntersectClipRegion( aBoundRect );
+
if( mbInitClipRegion )
ImplInitClipRegion();
@@ -761,6 +765,8 @@ void OutputDevice::ClipAndDrawGradient ( Gradient &rGradient, const PolyPolygon
else
ImplDrawComplexGradient( aRect, rGradient, false, &aClipPolyPoly );
}
+
+ Pop();
}
}
}