diff options
author | fmalita <fmalita@chromium.org> | 2016-08-16 15:38:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-16 15:38:51 -0700 |
commit | dc4c2a9fb7210925df7cc5c142b691e6c817ca77 (patch) | |
tree | dced094ef0ebd63d084cbcb14d5cc67ac811f01e /experimental/svg/model/SkSVGDOM.cpp | |
parent | 36931c2b47f81db7ccf441937567c6fda72ad3e6 (diff) |
[SVGDom] Add <circle>, <ellipse> support
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249033003
Review-Url: https://codereview.chromium.org/2249033003
Diffstat (limited to 'experimental/svg/model/SkSVGDOM.cpp')
-rw-r--r-- | experimental/svg/model/SkSVGDOM.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGDOM.cpp b/experimental/svg/model/SkSVGDOM.cpp index 8e2667ad20..ef1bb0d0ae 100644 --- a/experimental/svg/model/SkSVGDOM.cpp +++ b/experimental/svg/model/SkSVGDOM.cpp @@ -10,7 +10,9 @@ #include "SkParsePath.h" #include "SkString.h" #include "SkSVGAttributeParser.h" +#include "SkSVGCircle.h" #include "SkSVGDOM.h" +#include "SkSVGEllipse.h" #include "SkSVGG.h" #include "SkSVGNode.h" #include "SkSVGPath.h" @@ -213,12 +215,15 @@ struct AttrParseInfo { }; SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = { + { "cx" , { SkSVGAttribute::kCx , SetLengthAttribute }}, + { "cy" , { SkSVGAttribute::kCy , SetLengthAttribute }}, { "d" , { SkSVGAttribute::kD , SetPathDataAttribute }}, { "fill" , { SkSVGAttribute::kFill , SetPaintAttribute }}, { "fill-opacity" , { SkSVGAttribute::kFillOpacity , SetNumberAttribute }}, { "height" , { SkSVGAttribute::kHeight , SetLengthAttribute }}, { "opacity" , { SkSVGAttribute::kOpacity , SetNumberAttribute }}, { "points" , { SkSVGAttribute::kPoints , SetPointsAttribute }}, + { "r" , { SkSVGAttribute::kR , SetLengthAttribute }}, { "rx" , { SkSVGAttribute::kRx , SetLengthAttribute }}, { "ry" , { SkSVGAttribute::kRy , SetLengthAttribute }}, { "stroke" , { SkSVGAttribute::kStroke , SetPaintAttribute }}, @@ -235,6 +240,8 @@ SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = { }; SortedDictionaryEntry<sk_sp<SkSVGNode>(*)()> gTagFactories[] = { + { "circle" , []() -> sk_sp<SkSVGNode> { return SkSVGCircle::Make(); }}, + { "ellipse" , []() -> sk_sp<SkSVGNode> { return SkSVGEllipse::Make(); }}, { "g" , []() -> sk_sp<SkSVGNode> { return SkSVGG::Make(); }}, { "path" , []() -> sk_sp<SkSVGNode> { return SkSVGPath::Make(); }}, { "polygon" , []() -> sk_sp<SkSVGNode> { return SkSVGPoly::MakePolygon(); }}, |