diff options
author | 2017-10-09 16:05:30 -0400 | |
---|---|---|
committer | 2017-10-09 20:26:54 +0000 | |
commit | cc6cc2963b9663aae33863d5f9c70106f38f0ddc (patch) | |
tree | d2faca3bb7dbb4ed6dec8e9c6524434df1f531de /experimental/svg/model/SkSVGDOM.cpp | |
parent | 7f56d3d2d865a9fed44c420bd3b9497118b7ed26 (diff) |
[SVGDom] Radial gradient support
Implement support for
https://www.w3.org/TR/SVG/pservers.html#RadialGradients.
BUG=skia:7074
Change-Id: I19645a4a3bbddfd1ee0d08a2775381a0017acbfc
Reviewed-on: https://skia-review.googlesource.com/57340
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'experimental/svg/model/SkSVGDOM.cpp')
-rw-r--r-- | experimental/svg/model/SkSVGDOM.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGDOM.cpp b/experimental/svg/model/SkSVGDOM.cpp index a67576b40c..2640399f9c 100644 --- a/experimental/svg/model/SkSVGDOM.cpp +++ b/experimental/svg/model/SkSVGDOM.cpp @@ -21,6 +21,7 @@ #include "SkSVGNode.h" #include "SkSVGPath.h" #include "SkSVGPoly.h" +#include "SkSVGRadialGradient.h" #include "SkSVGRect.h" #include "SkSVGRenderContext.h" #include "SkSVGStop.h" @@ -284,6 +285,9 @@ SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = { { "fill" , { SkSVGAttribute::kFill , SetPaintAttribute }}, { "fill-opacity" , { SkSVGAttribute::kFillOpacity , SetNumberAttribute }}, { "fill-rule" , { SkSVGAttribute::kFillRule , SetFillRuleAttribute }}, + // focal point x & y + { "fx" , { SkSVGAttribute::kFx , SetLengthAttribute }}, + { "fy" , { SkSVGAttribute::kFy , SetLengthAttribute }}, { "gradientTransform", { SkSVGAttribute::kGradientTransform, SetTransformAttribute }}, { "height" , { SkSVGAttribute::kHeight , SetLengthAttribute }}, { "offset" , { SkSVGAttribute::kOffset , SetLengthAttribute }}, @@ -324,6 +328,7 @@ SortedDictionaryEntry<sk_sp<SkSVGNode>(*)()> gTagFactories[] = { { "path" , []() -> sk_sp<SkSVGNode> { return SkSVGPath::Make(); }}, { "polygon" , []() -> sk_sp<SkSVGNode> { return SkSVGPoly::MakePolygon(); }}, { "polyline" , []() -> sk_sp<SkSVGNode> { return SkSVGPoly::MakePolyline(); }}, + { "radialGradient", []() -> sk_sp<SkSVGNode> { return SkSVGRadialGradient::Make(); }}, { "rect" , []() -> sk_sp<SkSVGNode> { return SkSVGRect::Make(); }}, { "stop" , []() -> sk_sp<SkSVGNode> { return SkSVGStop::Make(); }}, { "svg" , []() -> sk_sp<SkSVGNode> { return SkSVGSVG::Make(); }}, |