diff options
author | 2018-01-04 11:27:09 -0500 | |
---|---|---|
committer | 2018-01-04 17:55:04 +0000 | |
commit | 02a32b0fa432a720d7b41c263756a7bac53b020b (patch) | |
tree | f9ee98954979600cc56327702de3f939f22854b0 /experimental/skotty/SkottyProperties.h | |
parent | 6dbff086f0a20e433e2d687359bdb54219b538f7 (diff) |
[skotty] Add polystar support
TBR=
Change-Id: Ifcf6beb75eaf08a150785b72e322bb30ab84b779
Reviewed-on: https://skia-review.googlesource.com/90902
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/skotty/SkottyProperties.h')
-rw-r--r-- | experimental/skotty/SkottyProperties.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/experimental/skotty/SkottyProperties.h b/experimental/skotty/SkottyProperties.h index 6147dd4d63..8730f61352 100644 --- a/experimental/skotty/SkottyProperties.h +++ b/experimental/skotty/SkottyProperties.h @@ -21,6 +21,7 @@ class SkPath; namespace sksg { +class Path; class RRect; class RenderNode; class Transform; @@ -111,6 +112,31 @@ private: using INHERITED = SkRefCnt; }; +class CompositePolyStar final : public SkRefCnt { +public: + enum class Type { + kStar, kPoly, + }; + + CompositePolyStar(sk_sp<sksg::Path>, Type); + + COMPOSITE_PROPERTY(Position , SkPoint , SkPoint::Make(0, 0)) + COMPOSITE_PROPERTY(PointCount , SkScalar, 0) + COMPOSITE_PROPERTY(InnerRadius , SkScalar, 0) + COMPOSITE_PROPERTY(OuterRadius , SkScalar, 0) + COMPOSITE_PROPERTY(InnerRoundness, SkScalar, 0) + COMPOSITE_PROPERTY(OuterRoundness, SkScalar, 0) + COMPOSITE_PROPERTY(Rotation , SkScalar, 0) + +private: + void apply(); + + sk_sp<sksg::Path> fPathNode; + Type fType; + + using INHERITED = SkRefCnt; +}; + class CompositeTransform final : public SkRefCnt { public: explicit CompositeTransform(sk_sp<sksg::RenderNode>); |