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

Unified Diff: src/core/SkPath.cpp

Issue 140953003: add alternative to isRect named asRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 6692a0f94ed134b996b0b5ff28cb8a2e7f0bfb03..1a20d9933245f97a8c2676879e9d307e3a1f7415 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -504,6 +504,11 @@ bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts
return result;
}
+SkPath::PathAsRect SkPath::asRect(Direction* direction) const {
+ bool isClosed = false;
+ return (PathAsRect) (isRect(&isClosed, direction) + isClosed);
reed1 2014/01/23 18:34:20 If we're going to be tricky about selecting which
caryclark 2014/01/23 19:03:23 Done.
+}
+
bool SkPath::isRect(SkRect* rect) const {
SkDEBUGCODE(this->validate();)
int currVerb = 0;
« include/core/SkPath.h ('K') | « include/core/SkPath.h ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698