diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-08 16:07:54 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-08 16:07:54 +0000 |
commit | c7d0ea3cd328566958bfcb86b4488dcbb94dd5ec (patch) | |
tree | 1841590bd86b2f5055e82b900edb88963386916e /include/core/SkPoint.h | |
parent | a22407283650ae570d8f93db0f4f6df266812716 (diff) |
add asScalars() to document when we want to treat SkPoint or SkRect as an array
of SkScalars.
Review URL: https://codereview.chromium.org/12530010
git-svn-id: http://skia.googlecode.com/svn/trunk@8041 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPoint.h')
-rw-r--r-- | include/core/SkPoint.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h index a6a8e730c2..5eca72f6b6 100644 --- a/include/core/SkPoint.h +++ b/include/core/SkPoint.h @@ -504,6 +504,11 @@ struct SK_API SkPoint { fY = -tmp; } } + + /** + * cast-safe way to treat the point as an array of (2) SkScalars. + */ + const SkScalar* asScalars() const { return &fX; } }; typedef SkPoint SkVector; |