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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 0 <= t <= 1.0 | 88 0 <= t <= 1.0 |
89 */ | 89 */ |
90 void SkEvalCubicAt(const SkPoint src[4], SkScalar t, SkPoint* locOrNull, | 90 void SkEvalCubicAt(const SkPoint src[4], SkScalar t, SkPoint* locOrNull, |
91 SkVector* tangentOrNull, SkVector* curvatureOrNull); | 91 SkVector* tangentOrNull, SkVector* curvatureOrNull); |
92 | 92 |
93 /** Given a src cubic bezier, chop it at the specified t value, | 93 /** Given a src cubic bezier, chop it at the specified t value, |
94 where 0 < t < 1, and return the two new cubics in dst: | 94 where 0 < t < 1, and return the two new cubics in dst: |
95 dst[0..3] and dst[3..6] | 95 dst[0..3] and dst[3..6] |
96 */ | 96 */ |
97 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t); | 97 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t); |
| 98 void SkChopCubicAt2(const SkPoint src[4], SkPoint dst[7], SkScalar t); |
| 99 |
98 /** Given a src cubic bezier, chop it at the specified t values, | 100 /** Given a src cubic bezier, chop it at the specified t values, |
99 where 0 < t < 1, and return the new cubics in dst: | 101 where 0 < t < 1, and return the new cubics in dst: |
100 dst[0..3],dst[3..6],...,dst[3*t_count..3*(t_count+1)] | 102 dst[0..3],dst[3..6],...,dst[3*t_count..3*(t_count+1)] |
101 */ | 103 */ |
102 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar t[], | 104 void SkChopCubicAt(const SkPoint src[4], SkPoint dst[], const SkScalar t[], |
103 int t_count); | 105 int t_count); |
104 | 106 |
105 /** Given a src cubic bezier, chop it at the specified t == 1/2, | 107 /** Given a src cubic bezier, chop it at the specified t == 1/2, |
106 The new cubics are returned in dst[0..3] and dst[3..6] | 108 The new cubics are returned in dst[0..3] and dst[3..6] |
107 */ | 109 */ |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 private: | 307 private: |
306 enum { | 308 enum { |
307 kQuadCount = 8, // should handle most conics | 309 kQuadCount = 8, // should handle most conics |
308 kPointCount = 1 + 2 * kQuadCount, | 310 kPointCount = 1 + 2 * kQuadCount, |
309 }; | 311 }; |
310 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; | 312 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; |
311 int fQuadCount; // #quads for current usage | 313 int fQuadCount; // #quads for current usage |
312 }; | 314 }; |
313 | 315 |
314 #endif | 316 #endif |
OLD | NEW |