aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGDOM.cpp
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-08-17 08:38:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-17 08:38:15 -0700
commitd24ee1419f17fe3ac70373ca74136a766522e399 (patch)
treeb70f2c4ad0c3afc0fd77e2df46506db2c4710782 /experimental/svg/model/SkSVGDOM.cpp
parent4c56b9fa714d1bee54666adf7e5e1db5fb398dc7 (diff)
[SVGDom] Add <line> support
R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223005 Review-Url: https://codereview.chromium.org/2244223005
Diffstat (limited to 'experimental/svg/model/SkSVGDOM.cpp')
-rw-r--r--experimental/svg/model/SkSVGDOM.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGDOM.cpp b/experimental/svg/model/SkSVGDOM.cpp
index ef1bb0d0ae..c123bc6bfb 100644
--- a/experimental/svg/model/SkSVGDOM.cpp
+++ b/experimental/svg/model/SkSVGDOM.cpp
@@ -14,6 +14,7 @@
#include "SkSVGDOM.h"
#include "SkSVGEllipse.h"
#include "SkSVGG.h"
+#include "SkSVGLine.h"
#include "SkSVGNode.h"
#include "SkSVGPath.h"
#include "SkSVGPoly.h"
@@ -236,13 +237,18 @@ SortedDictionaryEntry<AttrParseInfo> gAttributeParseInfo[] = {
{ "viewBox" , { SkSVGAttribute::kViewBox , SetViewBoxAttribute }},
{ "width" , { SkSVGAttribute::kWidth , SetLengthAttribute }},
{ "x" , { SkSVGAttribute::kX , SetLengthAttribute }},
+ { "x1" , { SkSVGAttribute::kX1 , SetLengthAttribute }},
+ { "x2" , { SkSVGAttribute::kX2 , SetLengthAttribute }},
{ "y" , { SkSVGAttribute::kY , SetLengthAttribute }},
+ { "y1" , { SkSVGAttribute::kY1 , SetLengthAttribute }},
+ { "y2" , { SkSVGAttribute::kY2 , SetLengthAttribute }},
};
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(); }},
+ { "line" , []() -> sk_sp<SkSVGNode> { return SkSVGLine::Make(); }},
{ "path" , []() -> sk_sp<SkSVGNode> { return SkSVGPath::Make(); }},
{ "polygon" , []() -> sk_sp<SkSVGNode> { return SkSVGPoly::MakePolygon(); }},
{ "polyline", []() -> sk_sp<SkSVGNode> { return SkSVGPoly::MakePolyline(); }},