OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPath_DEFINED | 8 #ifndef SkPath_DEFINED |
9 #define SkPath_DEFINED | 9 #define SkPath_DEFINED |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 /** Returns true if the path is empty (contains no lines or curves) | 181 /** Returns true if the path is empty (contains no lines or curves) |
182 | 182 |
183 @return true if the path is empty (contains no lines or curves) | 183 @return true if the path is empty (contains no lines or curves) |
184 */ | 184 */ |
185 bool isEmpty() const { | 185 bool isEmpty() const { |
186 SkDEBUGCODE(this->validate();) | 186 SkDEBUGCODE(this->validate();) |
187 return 0 == fPathRef->countVerbs(); | 187 return 0 == fPathRef->countVerbs(); |
188 } | 188 } |
189 | 189 |
| 190 /** Return true if the last contour of this path ends with a close verb. |
| 191 */ |
| 192 bool isLastContourClosed() const; |
| 193 |
190 /** | 194 /** |
191 * Returns true if all of the points in this path are finite, meaning there | 195 * Returns true if all of the points in this path are finite, meaning there |
192 * are no infinities and no NaNs. | 196 * are no infinities and no NaNs. |
193 */ | 197 */ |
194 bool isFinite() const { | 198 bool isFinite() const { |
195 SkDEBUGCODE(this->validate();) | 199 SkDEBUGCODE(this->validate();) |
196 return fPathRef->isFinite(); | 200 return fPathRef->isFinite(); |
197 } | 201 } |
198 | 202 |
199 /** Returns true if the path is volatile (i.e. should not be cached by devic
es.) | 203 /** Returns true if the path is volatile (i.e. should not be cached by devic
es.) |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 | 1099 |
1096 friend class SkAutoPathBoundsUpdate; | 1100 friend class SkAutoPathBoundsUpdate; |
1097 friend class SkAutoDisableOvalCheck; | 1101 friend class SkAutoDisableOvalCheck; |
1098 friend class SkAutoDisableDirectionCheck; | 1102 friend class SkAutoDisableDirectionCheck; |
1099 friend class SkBench_AddPathTest; // perf test reversePathTo | 1103 friend class SkBench_AddPathTest; // perf test reversePathTo |
1100 friend class PathTest_Private; // unit test reversePathTo | 1104 friend class PathTest_Private; // unit test reversePathTo |
1101 friend class ForceIsRRect_Private; // unit test isRRect | 1105 friend class ForceIsRRect_Private; // unit test isRRect |
1102 }; | 1106 }; |
1103 | 1107 |
1104 #endif | 1108 #endif |
OLD | NEW |