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 SkGeometry_DEFINED | 8 #ifndef SkGeometry_DEFINED |
9 #define SkGeometry_DEFINED | 9 #define SkGeometry_DEFINED |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 * Given a t-value [0...1] return its position and/or tangent. | 212 * Given a t-value [0...1] return its position and/or tangent. |
213 * If pos is not null, return its position at the t-value. | 213 * If pos is not null, return its position at the t-value. |
214 * If tangent is not null, return its tangent at the t-value. NOTE the | 214 * If tangent is not null, return its tangent at the t-value. NOTE the |
215 * tangent value's length is arbitrary, and only its direction should | 215 * tangent value's length is arbitrary, and only its direction should |
216 * be used. | 216 * be used. |
217 */ | 217 */ |
218 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const; | 218 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const; |
219 void chopAt(SkScalar t, SkConic dst[2]) const; | 219 void chopAt(SkScalar t, SkConic dst[2]) const; |
220 void chop(SkConic dst[2]) const; | 220 void chop(SkConic dst[2]) const; |
221 | 221 |
| 222 SkPoint evalAt(SkScalar t) const; |
| 223 SkVector evalTangentAt(SkScalar t) const; |
| 224 void chop2(SkConic dst[2]) const; |
| 225 |
222 void computeAsQuadError(SkVector* err) const; | 226 void computeAsQuadError(SkVector* err) const; |
223 bool asQuadTol(SkScalar tol) const; | 227 bool asQuadTol(SkScalar tol) const; |
224 | 228 |
225 /** | 229 /** |
226 * return the power-of-2 number of quads needed to approximate this conic | 230 * return the power-of-2 number of quads needed to approximate this conic |
227 * with a sequence of quads. Will be >= 0. | 231 * with a sequence of quads. Will be >= 0. |
228 */ | 232 */ |
229 int computeQuadPOW2(SkScalar tol) const; | 233 int computeQuadPOW2(SkScalar tol) const; |
230 | 234 |
231 /** | 235 /** |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 private: | 305 private: |
302 enum { | 306 enum { |
303 kQuadCount = 8, // should handle most conics | 307 kQuadCount = 8, // should handle most conics |
304 kPointCount = 1 + 2 * kQuadCount, | 308 kPointCount = 1 + 2 * kQuadCount, |
305 }; | 309 }; |
306 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; | 310 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; |
307 int fQuadCount; // #quads for current usage | 311 int fQuadCount; // #quads for current usage |
308 }; | 312 }; |
309 | 313 |
310 #endif | 314 #endif |
OLD | NEW |