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

Unified Diff: trunk/include/core/SkRect.h

Issue 12530010: add asScalars() to document when we want to treat SkPoint or SkRect as an array (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 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 | « trunk/include/core/SkPoint.h ('k') | trunk/tests/PointTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/include/core/SkRect.h
===================================================================
--- trunk/include/core/SkRect.h (revision 8035)
+++ trunk/include/core/SkRect.h (working copy)
@@ -769,6 +769,11 @@
* other. When this returns, left <= right && top <= bottom
*/
void sort();
+
+ /**
+ * cast-safe way to treat the rect as an array of (4) SkScalars.
+ */
+ const SkScalar* asScalars() const { return &fLeft; }
};
#endif
« no previous file with comments | « trunk/include/core/SkPoint.h ('k') | trunk/tests/PointTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698