summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-30 09:57:46 +0100
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:13 +0100
commit8eb00f1ccdcdedfec089db99e7196bc6978907f1 (patch)
tree44da3cea5c04b1b62e0c9c736731c83d19a85dcd /vcl
parentc6524f3836595040db3711567e5f3ad99abd66d8 (diff)
use SkPath::kEvenOdd_FillType for polypolygon paths in Skia
Apparently that is the rule LO code uses, seeing e.g. the last screen in visualbackendtest. Change-Id: I88da7e96df9748cc6ffb3fbb6901512f59210cab
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/gdiimpl.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 1565f23c98ca..0f07ebd5a1d9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -260,6 +260,7 @@ static SkRegion toSkRegion(const vcl::Region& region)
{
SkPath path;
lclPolyPolygonToPath(region.GetAsB2DPolyPolygon(), path);
+ path.setFillType(SkPath::kEvenOdd_FillType);
SkRegion skRegion;
skRegion.setPath(path, SkRegion(path.getBounds().roundOut()));
return skRegion;
@@ -298,6 +299,7 @@ bool SkiaSalGraphicsImpl::setClipRegion(const vcl::Region& region)
{
SkPath path;
lclPolyPolygonToPath(region.GetAsB2DPolyPolygon(), path);
+ path.setFillType(SkPath::kEvenOdd_FillType);
canvas->clipPath(path);
}
else
@@ -459,6 +461,7 @@ bool SkiaSalGraphicsImpl::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectTo
basegfx::B2DPolyPolygon aPolyPolygon(rPolyPolygon);
aPolyPolygon.transform(rObjectToDevice);
lclPolyPolygonToPath(aPolyPolygon, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
if (mFillColor != SALCOLOR_NONE)
@@ -561,6 +564,7 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDev
SkPath aPath;
lclPolygonToPath(rPolyLine, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkMatrix matrix = SkMatrix::MakeTrans(0.5, 0.5);
{
SkAutoCanvasRestore autoRestore(mSurface->getCanvas(), true);
@@ -729,6 +733,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
{
SkPath aPath;
lclPolygonToPath(rPoly, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
aPaint.setStrokeWidth(2);
float intervals[] = { 4.0f, 4.0f };
@@ -743,6 +748,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl
{
SkPath aPath;
lclPolygonToPath(rPoly, aPath);
+ aPath.setFillType(SkPath::kEvenOdd_FillType);
SkPaint aPaint;
aPaint.setColor(SkColorSetARGB(255, 255, 255, 255));
aPaint.setStyle(SkPaint::kFill_Style);