Index: include/core/SkPath.h |
diff --git a/include/core/SkPath.h b/include/core/SkPath.h |
index 2200e03c0c240d3ad6e63c97ac0e9f3db316edb3..733e183a2a82863fb4b8a510d8696fadaff338cc 100644 |
--- a/include/core/SkPath.h |
+++ b/include/core/SkPath.h |
@@ -568,6 +568,21 @@ public: |
/** |
* Add a closed rectangle contour to the path |
+ * @param rect The rectangle to add as a closed contour to the path |
+ * @param dir The direction to wind the rectangle's contour. |
+ * @param start Starting point for the contour (initial moveTo), expressed as |
+ * a corner index, starting in the upper-left position, clock-wise: |
+ * |
+ * 0 1 |
+ * *-------* |
+ * | | |
+ * *-------* |
+ * 3 2 |
+ */ |
+ void addRect(const SkRect& rect, Direction dir, unsigned start); |
+ |
+ /** |
+ * Add a closed rectangle contour to the path |
* |
* @param left The left side of a rectangle to add as a closed contour |
* to the path |
@@ -591,6 +606,24 @@ public: |
void addOval(const SkRect& oval, Direction dir = kCW_Direction); |
/** |
+ * Add a closed oval contour to the path |
+ * |
+ * @param oval The bounding oval to add as a closed contour to the path |
+ * @param dir The direction to wind the oval's contour. |
+ * @param start Starting point for the contour (initial moveTo), expressed |
+ * as an index of the ellipse vertices in 90/0/270/180deg order: |
reed1
2015/11/17 15:02:51
Might add that the 0->1->2->3 ordering is in CW di
f(malita)
2015/11/17 15:35:15
Done.
|
+ * |
+ * 0 |
+ * -*- |
+ * | | |
+ * 3 * * 1 |
+ * | | |
+ * -*- |
+ * 2 |
+ */ |
+ void addOval(const SkRect& oval, Direction dir, unsigned start); |
+ |
+ /** |
* Add a closed circle contour to the path |
* |
* @param x The x-coordinate of the center of a circle to add as a |
@@ -644,6 +677,23 @@ public: |
void addRRect(const SkRRect& rrect, Direction dir = kCW_Direction); |
reed1
2015/11/17 15:02:51
Document where our starting point is?
f(malita)
2015/11/17 15:35:15
Done.
|
/** |
+ * Add an SkRRect contour to the path |
+ * @param rrect The rounded rect to add as a closed contour |
+ * @param dir The winding direction for the new contour. |
+ * @param start Starting point for the contour (initial moveTo), expressed as |
+ * an index of the radii minor/major points, ordered clock-wise: |
+ * |
+ * 0 1 |
+ * *----* |
+ * 7 * * 2 |
+ * | | |
+ * 6 * * 3 |
+ * *----* |
+ * 5 4 |
+ */ |
+ void addRRect(const SkRRect& rrect, Direction dir, unsigned startIndex); |
+ |
+ /** |
* Add a new contour made of just lines. This is just a fast version of |
* the following: |
* this->moveTo(pts[0]); |