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

Unified Diff: trunk/include/core/SkPoint.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 | « no previous file | trunk/include/core/SkRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/include/core/SkPoint.h
===================================================================
--- trunk/include/core/SkPoint.h (revision 8035)
+++ trunk/include/core/SkPoint.h (working copy)
@@ -504,6 +504,11 @@
fY = -tmp;
}
}
+
+ /**
+ * cast-safe way to treat the point as an array of (2) SkScalars.
+ */
+ const SkScalar* asScalars() const { return &fX; }
};
typedef SkPoint SkVector;
« no previous file with comments | « no previous file | trunk/include/core/SkRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698