diff options
author | Florin Malita <fmalita@chromium.org> | 2017-10-09 12:57:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-10 16:20:43 +0000 |
commit | 4de426b2422bec260686b6c4e3c4834eeffe864f (patch) | |
tree | de13e5cb22845f988296f28dbf4e33bd1e33e160 /experimental/svg/model/SkSVGRenderContext.cpp | |
parent | a108c92ae5868ca99759a872edddb377f31ad1be (diff) |
[SVGDom] stroke-miterlimit support
https://www.w3.org/TR/SVG/painting.html#StrokeMiterlimitProperty
Change-Id: I5e488e95afe17c4b753e8177ea5783d4820e3d2c
Reviewed-on: https://skia-review.googlesource.com/57221
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/svg/model/SkSVGRenderContext.cpp')
-rw-r--r-- | experimental/svg/model/SkSVGRenderContext.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGRenderContext.cpp b/experimental/svg/model/SkSVGRenderContext.cpp index 9de605a034..f071d9696f 100644 --- a/experimental/svg/model/SkSVGRenderContext.cpp +++ b/experimental/svg/model/SkSVGRenderContext.cpp @@ -174,6 +174,13 @@ void commitToPaint<SkSVGAttribute::kStrokeLineJoin>(const SkSVGPresentationAttri } template <> +void commitToPaint<SkSVGAttribute::kStrokeMiterLimit>(const SkSVGPresentationAttributes& attrs, + const SkSVGRenderContext&, + SkSVGPresentationContext* pctx) { + pctx->fStrokePaint.setStrokeMiter(*attrs.fStrokeMiterLimit.get()); +} + +template <> void commitToPaint<SkSVGAttribute::kStrokeOpacity>(const SkSVGPresentationAttributes& attrs, const SkSVGRenderContext&, SkSVGPresentationContext* pctx) { @@ -218,6 +225,7 @@ SkSVGPresentationContext::SkSVGPresentationContext() commitToPaint<SkSVGAttribute::kStroke>(fInherited, dummy, this); commitToPaint<SkSVGAttribute::kStrokeLineCap>(fInherited, dummy, this); commitToPaint<SkSVGAttribute::kStrokeLineJoin>(fInherited, dummy, this); + commitToPaint<SkSVGAttribute::kStrokeMiterLimit>(fInherited, dummy, this); commitToPaint<SkSVGAttribute::kStrokeOpacity>(fInherited, dummy, this); commitToPaint<SkSVGAttribute::kStrokeWidth>(fInherited, dummy, this); } @@ -270,6 +278,7 @@ void SkSVGRenderContext::applyPresentationAttributes(const SkSVGPresentationAttr ApplyLazyInheritedAttribute(Stroke); ApplyLazyInheritedAttribute(StrokeLineCap); ApplyLazyInheritedAttribute(StrokeLineJoin); + ApplyLazyInheritedAttribute(StrokeMiterLimit); ApplyLazyInheritedAttribute(StrokeOpacity); ApplyLazyInheritedAttribute(StrokeWidth); |