Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: include/core/SkPath.h

Issue 694503003: Implement conics for NVPR (Closed) Base URL: https://skia.googlesource.com/skia.git@hairline-test-fix-unskip-nvpr
Patch Set: cleanup Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkPathRef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPath.h
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index f5a6d4a2e7e43a24c1993dc09f082a72cfa91557..18c3af4ac16c7a1c77ec1130ff99f9603328f67b 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -280,6 +280,17 @@ public:
*/
int getVerbs(uint8_t verbs[], int max) const;
+ /** Return the number of conic weights in the path
+ */
+ int countConicWeights() const;
reed1 2014/11/12 14:06:39 ick ich, do we really need to make these two apis
Kimmo Kinnunen 2014/11/19 16:25:39 Done.
+
+ /** Return the weight of index'th conic. If the index is out of range
+ (i.e. is not 0 <= index < countConicWeights()) then the returned weight
+ will be zero.
+ */
+ SkScalar getConicWeight(int index) const;
+
+
//! Swap contents of this and other. Guaranteed not to throw
void swap(SkPath& other);
@@ -837,7 +848,7 @@ public:
kMove_Verb, //!< iter.next returns 1 point
kLine_Verb, //!< iter.next returns 2 points
kQuad_Verb, //!< iter.next returns 3 points
- kConic_Verb, //!< iter.next returns 3 points + iter.conicWeight()
+ kConic_Verb, //!< iter.next returns 2 points + iter.conicWeight()
kCubic_Verb, //!< iter.next returns 4 points
kClose_Verb, //!< iter.next returns 1 point (contour's moveTo pt)
kDone_Verb, //!< iter.next returns 0 points
« no previous file with comments | « no previous file | include/core/SkPathRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698