diff options
Diffstat (limited to 'experimental/svg/model/SkSVGPath.cpp')
-rw-r--r-- | experimental/svg/model/SkSVGPath.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGPath.cpp b/experimental/svg/model/SkSVGPath.cpp index dd248237f1..7568744035 100644 --- a/experimental/svg/model/SkSVGPath.cpp +++ b/experimental/svg/model/SkSVGPath.cpp @@ -31,3 +31,12 @@ void SkSVGPath::onDraw(SkCanvas* canvas, const SkSVGLengthContext&, const SkPain fPath.setFillType(fillType); canvas->drawPath(fPath, paint); } + +SkPath SkSVGPath::onAsPath(const SkSVGRenderContext& ctx) const { + // the computed fillType follows inheritance rules and needs to be applied at draw time. + fPath.setFillType(FillRuleToFillType(*ctx.presentationContext().fInherited.fFillRule.get())); + + SkPath path = fPath; + this->mapToParent(&path); + return path; +} |