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

Unified Diff: include/core/SkPath.h

Issue 834503002: Update stroke path to use rect returned from isRect (to fix trailing moveTo bug) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment Created 6 years 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 | « gm/strokefill.cpp ('k') | src/core/SkPath.cpp » ('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..a87e0afc593409cada3e84bfe900fded9dff2693 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -247,7 +247,7 @@ public:
a rectangle
@return true if the path specifies a rectangle
*/
- bool isRect(SkRect* rect) const;
+ bool isRect(SkRect* rect) const { return this->isRect(rect, NULL, NULL); }
/** Return the number of points in the path
*/
@@ -601,7 +601,23 @@ public:
@param direction If not null, set to the rectangle's direction
@return true if the path specifies a rectangle
*/
- bool isRect(bool* isClosed, Direction* direction) const;
+ bool isRect(bool* isClosed, Direction* direction) const {
+ return this->isRect(NULL, isClosed, direction);
+ }
+
+ /**
+ * Returns true if the path specifies a rectangle.
+ *
+ * If this returns false, then all output parameters are ignored, and left
+ * unchanged. If this returns true, then each of the output parameters
+ * are checked for NULL. If they are not, they return their value.
+ *
+ * @param rect If not null, set to the bounds of the rectangle
+ * @param isClosed If not null, set to true if the path is closed
+ * @param direction If not null, set to the rectangle's direction
+ * @return true if the path specifies a rectangle
+ */
+ bool isRect(SkRect* rect, bool* isClosed, Direction* direction) const;
/** Returns true if the path specifies a pair of nested rectangles. If so, and if
rect is not null, set rect[0] to the outer rectangle and rect[1] to the inner
« no previous file with comments | « gm/strokefill.cpp ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698