OLD | NEW |
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 Loading... |
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 |
OLD | NEW |