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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/include/core/SkPoint.h ('k') | trunk/tests/PointTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkRect_DEFINED 10 #ifndef SkRect_DEFINED
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 } 762 }
763 763
764 764
765 /** 765 /**
766 * Swap top/bottom or left/right if there are flipped (i.e. if width() 766 * Swap top/bottom or left/right if there are flipped (i.e. if width()
767 * or height() would have returned a negative value.) This should be called 767 * or height() would have returned a negative value.) This should be called
768 * if the edges are computed separately, and may have crossed over each 768 * if the edges are computed separately, and may have crossed over each
769 * other. When this returns, left <= right && top <= bottom 769 * other. When this returns, left <= right && top <= bottom
770 */ 770 */
771 void sort(); 771 void sort();
772
773 /**
774 * cast-safe way to treat the rect as an array of (4) SkScalars.
775 */
776 const SkScalar* asScalars() const { return &fLeft; }
772 }; 777 };
773 778
774 #endif 779 #endif
OLDNEW
« 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