diff options
author | 2016-12-08 09:26:47 -0500 | |
---|---|---|
committer | 2016-12-08 15:00:18 +0000 | |
commit | ce8840e3842f3a702c5d7bf440ff730bdfaf8e70 (patch) | |
tree | 0a94cdeb3d2d8632644490b70fdb0c40d185b8ec /experimental/svg/model/SkSVGLine.h | |
parent | c5a8366d9922902cffbd351fdd15755dd2ac99bf (diff) |
[SVGDom] ClipPath support
* clip-path attribute handling
* clipPath container element
* asPath() SkSVGNode virtual for capturing subtree geometry
R=robertphillips@google.com,stephana@google.com
Change-Id: I9597534fe3047b631da6309eafac055dff5696e9
Reviewed-on: https://skia-review.googlesource.com/5650
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/svg/model/SkSVGLine.h')
-rw-r--r-- | experimental/svg/model/SkSVGLine.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGLine.h b/experimental/svg/model/SkSVGLine.h index 524fc2ac0e..0f15ca5ac7 100644 --- a/experimental/svg/model/SkSVGLine.h +++ b/experimental/svg/model/SkSVGLine.h @@ -11,6 +11,8 @@ #include "SkSVGShape.h" #include "SkSVGTypes.h" +struct SkPoint; + class SkSVGLine final : public SkSVGShape { public: virtual ~SkSVGLine() = default; @@ -27,9 +29,14 @@ protected: void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&, SkPath::FillType) const override; + SkPath onAsPath(const SkSVGRenderContext&) const override; + private: SkSVGLine(); + // resolve and return the two endpoints + std::tuple<SkPoint, SkPoint> resolve(const SkSVGLengthContext&) const; + SkSVGLength fX1 = SkSVGLength(0); SkSVGLength fY1 = SkSVGLength(0); SkSVGLength fX2 = SkSVGLength(0); |