aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGValue.h
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-08-11 09:16:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-11 09:16:29 -0700
commit2d961e086bb40b371b1a667536fa089794847368 (patch)
tree89c6986af025e9d5c87791e4977838331bbd575b /experimental/svg/model/SkSVGValue.h
parent90b5cc31f373e831c942bfd3113b44486546846b (diff)
[SVGDom] Add more presentation attributes.
Implement proper presentation attribute inheritance, and add support for * fill-opacity * stroke-linecap * stroke-linejoin * stroke-opacity * stroke-width R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234153002 Review-Url: https://codereview.chromium.org/2234153002
Diffstat (limited to 'experimental/svg/model/SkSVGValue.h')
-rw-r--r--experimental/svg/model/SkSVGValue.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGValue.h b/experimental/svg/model/SkSVGValue.h
index 00715e2a5b..583e60291d 100644
--- a/experimental/svg/model/SkSVGValue.h
+++ b/experimental/svg/model/SkSVGValue.h
@@ -19,6 +19,10 @@ public:
enum class Type {
kColor,
kLength,
+ kLineCap,
+ kLineJoin,
+ kNumber,
+ kPaint,
kPath,
kTransform,
kViewBox,
@@ -50,6 +54,7 @@ public:
, fWrappedValue(v) { }
operator const T&() const { return fWrappedValue; }
+ const T* operator->() const { return &fWrappedValue; }
private:
// Stack-only
@@ -66,5 +71,9 @@ using SkSVGLengthValue = SkSVGWrapperValue<SkSVGLength , SkSVGValue::Ty
using SkSVGPathValue = SkSVGWrapperValue<SkPath , SkSVGValue::Type::kPath >;
using SkSVGTransformValue = SkSVGWrapperValue<SkSVGTransformType, SkSVGValue::Type::kTransform>;
using SkSVGViewBoxValue = SkSVGWrapperValue<SkSVGViewBoxType , SkSVGValue::Type::kViewBox >;
+using SkSVGPaintValue = SkSVGWrapperValue<SkSVGPaint , SkSVGValue::Type::kPaint >;
+using SkSVGLineCapValue = SkSVGWrapperValue<SkSVGLineCap , SkSVGValue::Type::kLineCap >;
+using SkSVGLineJoinValue = SkSVGWrapperValue<SkSVGLineJoin , SkSVGValue::Type::kLineJoin >;
+using SkSVGNumberValue = SkSVGWrapperValue<SkSVGNumberType , SkSVGValue::Type::kNumber >;
#endif // SkSVGValue_DEFINED