diff options
author | 2012-01-12 18:17:11 +0000 | |
---|---|---|
committer | 2012-01-12 18:17:11 +0000 | |
commit | d335d1d784167f8b9a4bf8a35e04d8e82d0a9507 (patch) | |
tree | 229646d2b39771aa5de0f4481799d40091b18a2c /include/core/SkPath.h | |
parent | 51a283b4add1827db03debfc382c8854773dba3d (diff) |
automatically inject a moveTo if we see a close followed by a line/quad/cubic
git-svn-id: http://skia.googlecode.com/svn/trunk@3027 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPath.h')
-rw-r--r-- | include/core/SkPath.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h index 859486cb4e..ec79a49248 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -740,6 +740,7 @@ private: SkTDArray<SkPoint> fPts; SkTDArray<uint8_t> fVerbs; mutable SkRect fBounds; + int fLastMoveToIndex; uint8_t fFillType; uint8_t fSegmentMask; mutable uint8_t fBoundsIsDirty; @@ -767,6 +768,14 @@ private: */ void reversePathTo(const SkPath&); + // called before we add points for lineTo, quadTo, cubicTo, checking to see + // if we need to inject a leading moveTo first + // + // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) + // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previous moveTo) + // + inline void injectMoveToIfNeeded(); + friend const SkPoint* sk_get_path_points(const SkPath&, int index); friend class SkAutoPathBoundsUpdate; }; |