aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGPath.cpp
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-08-03 10:21:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-03 10:21:11 -0700
commitbffc2566872f99d378a1113d0a49ec9ee0d60b7a (patch)
tree3a7fab8b6206e99201b1ea817c95454f340260c8 /experimental/svg/model/SkSVGPath.cpp
parent9e3d3d8b363edcdd81a13b2be046152c6bb839cd (diff)
[SVGDom] Initial SVGLength support
Mostly plumb new length types, but also introduce a stateful parser, rect shape and named color support. R=reed@google.com,robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053002 Review-Url: https://codereview.chromium.org/2202053002
Diffstat (limited to 'experimental/svg/model/SkSVGPath.cpp')
-rw-r--r--experimental/svg/model/SkSVGPath.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/experimental/svg/model/SkSVGPath.cpp b/experimental/svg/model/SkSVGPath.cpp
index 7d905945bc..07e0a3e545 100644
--- a/experimental/svg/model/SkSVGPath.cpp
+++ b/experimental/svg/model/SkSVGPath.cpp
@@ -13,17 +13,6 @@
SkSVGPath::SkSVGPath() : INHERITED(SkSVGTag::kPath) { }
-void SkSVGPath::doRender(SkCanvas* canvas, const SkPaint* paint) const {
- if (paint) {
- canvas->drawPath(fPath, *paint);
- }
-}
-
-void SkSVGPath::onRender(SkCanvas* canvas, const SkSVGRenderContext& ctx) const {
- this->doRender(canvas, ctx.fillPaint());
- this->doRender(canvas, ctx.strokePaint());
-}
-
void SkSVGPath::onSetAttribute(SkSVGAttribute attr, const SkSVGValue& v) {
switch (attr) {
case SkSVGAttribute::kD:
@@ -35,3 +24,7 @@ void SkSVGPath::onSetAttribute(SkSVGAttribute attr, const SkSVGValue& v) {
this->INHERITED::onSetAttribute(attr, v);
}
}
+
+void SkSVGPath::onDraw(SkCanvas* canvas, const SkSVGLengthContext&, const SkPaint& paint) const {
+ canvas->drawPath(fPath, paint);
+}