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 SkGeometry_DEFINED | 10 #ifndef SkGeometry_DEFINED |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 * tangent value's length is arbitrary, and only its direction should | 223 * tangent value's length is arbitrary, and only its direction should |
224 * be used. | 224 * be used. |
225 */ | 225 */ |
226 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const; | 226 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const; |
227 void chopAt(SkScalar t, SkConic dst[2]) const; | 227 void chopAt(SkScalar t, SkConic dst[2]) const; |
228 void chop(SkConic dst[2]) const; | 228 void chop(SkConic dst[2]) const; |
229 | 229 |
230 void computeAsQuadError(SkVector* err) const; | 230 void computeAsQuadError(SkVector* err) const; |
231 bool asQuadTol(SkScalar tol) const; | 231 bool asQuadTol(SkScalar tol) const; |
232 | 232 |
| 233 /** |
| 234 * return the power-of-2 number of quads needed to approximate this conic |
| 235 * with a sequence of quads. Will be >= 0. |
| 236 */ |
233 int computeQuadPOW2(SkScalar tol) const; | 237 int computeQuadPOW2(SkScalar tol) const; |
| 238 |
| 239 /** |
| 240 * Chop this conic into N quads, stored continguously in pts[], where |
| 241 * N = 1 << pow2. The amount of storage needed is (1 + 2 * N) |
| 242 */ |
234 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; | 243 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; |
235 | 244 |
236 bool findXExtrema(SkScalar* t) const; | 245 bool findXExtrema(SkScalar* t) const; |
237 bool findYExtrema(SkScalar* t) const; | 246 bool findYExtrema(SkScalar* t) const; |
238 bool chopAtXExtrema(SkConic dst[2]) const; | 247 bool chopAtXExtrema(SkConic dst[2]) const; |
239 bool chopAtYExtrema(SkConic dst[2]) const; | 248 bool chopAtYExtrema(SkConic dst[2]) const; |
240 | 249 |
241 void computeTightBounds(SkRect* bounds) const; | 250 void computeTightBounds(SkRect* bounds) const; |
242 void computeFastBounds(SkRect* bounds) const; | 251 void computeFastBounds(SkRect* bounds) const; |
243 }; | 252 }; |
244 | 253 |
245 #endif | 254 #endif |
OLD | NEW |