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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 /** | 210 /** |
211 * Given a t-value [0...1] return its position and/or tangent. | 211 * Given a t-value [0...1] return its position and/or tangent. |
212 * If pos is not null, return its position at the t-value. | 212 * If pos is not null, return its position at the t-value. |
213 * If tangent is not null, return its tangent at the t-value. NOTE the | 213 * If tangent is not null, return its tangent at the t-value. NOTE the |
214 * tangent value's length is arbitrary, and only its direction should | 214 * tangent value's length is arbitrary, and only its direction should |
215 * be used. | 215 * be used. |
216 */ | 216 */ |
217 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = nullptr) const; | 217 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = nullptr) const; |
218 void chopAt(SkScalar t, SkConic dst[2]) const; | 218 bool SK_WARN_UNUSED_RESULT chopAt(SkScalar t, SkConic dst[2]) const; |
219 void chopAt(SkScalar t1, SkScalar t2, SkConic* dst) const; | 219 void chopAt(SkScalar t1, SkScalar t2, SkConic* dst) const; |
220 void chop(SkConic dst[2]) const; | 220 void chop(SkConic dst[2]) const; |
221 | 221 |
222 SkPoint evalAt(SkScalar t) const; | 222 SkPoint evalAt(SkScalar t) const; |
223 SkVector evalTangentAt(SkScalar t) const; | 223 SkVector evalTangentAt(SkScalar t) const; |
224 | 224 |
225 void computeAsQuadError(SkVector* err) const; | 225 void computeAsQuadError(SkVector* err) const; |
226 bool asQuadTol(SkScalar tol) const; | 226 bool asQuadTol(SkScalar tol) const; |
227 | 227 |
228 /** | 228 /** |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 private: | 400 private: |
401 enum { | 401 enum { |
402 kQuadCount = 8, // should handle most conics | 402 kQuadCount = 8, // should handle most conics |
403 kPointCount = 1 + 2 * kQuadCount, | 403 kPointCount = 1 + 2 * kQuadCount, |
404 }; | 404 }; |
405 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; | 405 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; |
406 int fQuadCount; // #quads for current usage | 406 int fQuadCount; // #quads for current usage |
407 }; | 407 }; |
408 | 408 |
409 #endif | 409 #endif |
OLD | NEW |