aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGSVG.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/SkSVGSVG.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/SkSVGSVG.h')
-rw-r--r--experimental/svg/model/SkSVGSVG.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGSVG.h b/experimental/svg/model/SkSVGSVG.h
index 8e69d144d6..27631f5a31 100644
--- a/experimental/svg/model/SkSVGSVG.h
+++ b/experimental/svg/model/SkSVGSVG.h
@@ -9,6 +9,7 @@
#define SkSVGSVG_DEFINED
#include "SkSVGContainer.h"
+#include "SkSVGTypes.h"
class SkSVGSVG : public SkSVGContainer {
public:
@@ -16,9 +17,22 @@ public:
static sk_sp<SkSVGSVG> Make() { return sk_sp<SkSVGSVG>(new SkSVGSVG()); }
+ void setX(const SkSVGLength&);
+ void setY(const SkSVGLength&);
+ void setWidth(const SkSVGLength&);
+ void setHeight(const SkSVGLength&);
+
+protected:
+ void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
+
private:
SkSVGSVG();
+ SkSVGLength fX = SkSVGLength(0);
+ SkSVGLength fY = SkSVGLength(0);
+ SkSVGLength fWidth = SkSVGLength(100, SkSVGLength::Unit::kPercentage);
+ SkSVGLength fHeight = SkSVGLength(100, SkSVGLength::Unit::kPercentage);
+
typedef SkSVGContainer INHERITED;
};