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

Unified Diff: include/core/SkRRect.h

Issue 1278323002: api helpers inspired by blink use-cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « include/core/SkMatrix.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRRect.h
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
index b9c3a79763fceba17e34f9400758b8088163de2b..37766219df3a50f182c422da76c4c33826822523 100644
--- a/include/core/SkRRect.h
+++ b/include/core/SkRRect.h
@@ -134,6 +134,12 @@ public:
SkDEBUGCODE(this->validate();)
}
+ static SkRRect MakeRect(const SkRect& r) {
+ SkRRect rr;
+ rr.setRect(r);
+ return rr;
+ }
+
/**
* Set this RR to match the supplied oval. All x radii will equal half the
* width and all y radii will equal half the height.
« no previous file with comments | « include/core/SkMatrix.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698