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

Unified Diff: include/core/SkPath.h

Issue 1261773002: change getBounds to return 0000 iff there are zero points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months 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 fe89766558c4ab5be1710f10f17d6ddc7f8b843b..dc50ae76c317b1ad487da5470ecb6f73c7698bf6 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -273,11 +273,12 @@ public:
//! Swap contents of this and other. Guaranteed not to throw
void swap(SkPath& other);
- /** Returns the bounds of the path's points. If the path contains 0 or 1
- points, the bounds is set to (0,0,0,0), and isEmpty() will return true.
- Note: this bounds may be larger than the actual shape, since curves
- do not extend as far as their control points. Additionally this bound
- can contain trailing MoveTo points (cf. isRect).
+ /**
+ * Returns the bounds of the path's points. If the path contains zero points/verbs, this
+ * will return the "empty" rect [0, 0, 0, 0].
+ * Note: this bounds may be larger than the actual shape, since curves
+ * do not extend as far as their control points. Additionally this bound encompases all points,
+ * even isolated moveTos either preceeding or following the last non-degenerate contour.
*/
const SkRect& getBounds() const {
return fPathRef->getBounds();
« 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