aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGPath.h
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.h
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.h')
-rw-r--r--experimental/svg/model/SkSVGPath.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/experimental/svg/model/SkSVGPath.h b/experimental/svg/model/SkSVGPath.h
index b650f67463..e72f0d137e 100644
--- a/experimental/svg/model/SkSVGPath.h
+++ b/experimental/svg/model/SkSVGPath.h
@@ -9,30 +9,26 @@
#define SkSVGPath_DEFINED
#include "SkPath.h"
-#include "SkSVGTransformableNode.h"
+#include "SkSVGShape.h"
-class SkSVGPath final : public SkSVGTransformableNode {
+class SkSVGPath final : public SkSVGShape {
public:
virtual ~SkSVGPath() = default;
static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
- void appendChild(sk_sp<SkSVGNode>) override { }
-
void setPath(const SkPath& path) { fPath = path; }
protected:
- void onRender(SkCanvas*, const SkSVGRenderContext&) const override;
-
void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
+ void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const override;
+
private:
SkSVGPath();
- void doRender(SkCanvas*, const SkPaint*) const;
-
SkPath fPath;
- typedef SkSVGTransformableNode INHERITED;
+ typedef SkSVGShape INHERITED;
};
#endif // SkSVGPath_DEFINED