| 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 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 // | 1136 // |
| 1137 inline void injectMoveToIfNeeded(); | 1137 inline void injectMoveToIfNeeded(); |
| 1138 | 1138 |
| 1139 inline bool hasOnlyMoveTos() const; | 1139 inline bool hasOnlyMoveTos() const; |
| 1140 | 1140 |
| 1141 Convexity internalGetConvexity() const; | 1141 Convexity internalGetConvexity() const; |
| 1142 | 1142 |
| 1143 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, | 1143 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, |
| 1144 bool* isClosed, Direction* direction) const; | 1144 bool* isClosed, Direction* direction) const; |
| 1145 | 1145 |
| 1146 // called by stroker to see if all points are equal and worthy of a cap |
| 1147 // equivalent to a short-circuit version of getBounds().isEmpty() |
| 1148 bool isZeroLength() const; |
| 1149 |
| 1146 /** Returns if the path can return a bound at no cost (true) or will have to | 1150 /** Returns if the path can return a bound at no cost (true) or will have to |
| 1147 perform some computation (false). | 1151 perform some computation (false). |
| 1148 */ | 1152 */ |
| 1149 bool hasComputedBounds() const { | 1153 bool hasComputedBounds() const { |
| 1150 SkDEBUGCODE(this->validate();) | 1154 SkDEBUGCODE(this->validate();) |
| 1151 return fPathRef->hasComputedBounds(); | 1155 return fPathRef->hasComputedBounds(); |
| 1152 } | 1156 } |
| 1153 | 1157 |
| 1154 | 1158 |
| 1155 // 'rect' needs to be sorted | 1159 // 'rect' needs to be sorted |
| 1156 void setBounds(const SkRect& rect) { | 1160 void setBounds(const SkRect& rect) { |
| 1157 SkPathRef::Editor ed(&fPathRef); | 1161 SkPathRef::Editor ed(&fPathRef); |
| 1158 | 1162 |
| 1159 ed.setBounds(rect); | 1163 ed.setBounds(rect); |
| 1160 } | 1164 } |
| 1161 | 1165 |
| 1162 void setPt(int index, SkScalar x, SkScalar y); | 1166 void setPt(int index, SkScalar x, SkScalar y); |
| 1163 | 1167 |
| 1164 friend class SkAutoPathBoundsUpdate; | 1168 friend class SkAutoPathBoundsUpdate; |
| 1165 friend class SkAutoDisableOvalCheck; | 1169 friend class SkAutoDisableOvalCheck; |
| 1166 friend class SkAutoDisableDirectionCheck; | 1170 friend class SkAutoDisableDirectionCheck; |
| 1167 friend class SkBench_AddPathTest; // perf test reversePathTo | 1171 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1168 friend class PathTest_Private; // unit test reversePathTo | 1172 friend class PathTest_Private; // unit test reversePathTo |
| 1169 friend class ForceIsRRect_Private; // unit test isRRect | 1173 friend class ForceIsRRect_Private; // unit test isRRect |
| 1170 }; | 1174 }; |
| 1171 | 1175 |
| 1172 #endif | 1176 #endif |
| OLD | NEW |