aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGAttribute.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/SkSVGAttribute.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/SkSVGAttribute.h')
-rw-r--r--experimental/svg/model/SkSVGAttribute.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/experimental/svg/model/SkSVGAttribute.h b/experimental/svg/model/SkSVGAttribute.h
index 83a35527c5..64465b13c9 100644
--- a/experimental/svg/model/SkSVGAttribute.h
+++ b/experimental/svg/model/SkSVGAttribute.h
@@ -8,14 +8,18 @@
#ifndef SkSVGAttribute_DEFINED
#define SkSVGAttribute_DEFINED
-#include "SkColor.h"
+#include "SkSVGTypes.h"
#include "SkTLazy.h"
enum class SkSVGAttribute {
kD,
kFill,
+ kHeight,
kStroke,
kTransform,
+ kWidth,
+ kX,
+ kY,
kUnknown,
};
@@ -26,15 +30,15 @@ class SkSVGPresentationAttributes {
public:
SkSVGPresentationAttributes();
- void setFill(SkColor);
- void setStroke(SkColor);
+ void setFill(const SkSVGColor&);
+ void setStroke(const SkSVGColor&);
void applyTo(SkTCopyOnFirstWrite<SkSVGRenderContext>&) const;
private:
// Color only for now.
- SkColor fFill;
- SkColor fStroke;
+ SkSVGColor fFill;
+ SkSVGColor fStroke;
unsigned fFillIsSet : 1;
unsigned fStrokeIsSet : 1;