summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/BackendTest.cxx3
-rw-r--r--vcl/skia/gdiimpl.cxx5
2 files changed, 6 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 6dfda5d02d35..1090c33b73e0 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -465,8 +465,7 @@ public:
CPPUNIT_TEST(testDrawInvertWithRectangle);
CPPUNIT_TEST(testDrawInvertN50WithRectangle);
- // AFAIK this test (itself) is broken.
- // CPPUNIT_TEST(testDrawInvertTrackFrameWithRectangle);
+ CPPUNIT_TEST(testDrawInvertTrackFrameWithRectangle);
CPPUNIT_TEST(testDrawBezierWithPolylineB2D);
CPPUNIT_TEST(testDrawBezierAAWithPolylineB2D);
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 948c85df72e4..271f1a61321c 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -920,6 +920,11 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
SkPath aPath;
addPolygonToPath(rPoly, aPath);
aPath.setFillType(SkPath::kEvenOdd_FillType);
+ // TrackFrame is not supposed to paint outside of the polygon (usually rectangle),
+ // but wider stoke width usually results in that, so ensure the requirement
+ // by clipping.
+ SkAutoCanvasRestore autoRestore(mSurface->getCanvas(), true);
+ mSurface->getCanvas()->clipRect(aPath.getBounds(), SkClipOp::kIntersect, false);
SkPaint aPaint;
aPaint.setStrokeWidth(2);
float intervals[] = { 4.0f, 4.0f };