| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 0 dst[0..2] is the original quad | 69 0 dst[0..2] is the original quad |
| 70 1 dst[0..2] and dst[2..4] are the two new quads | 70 1 dst[0..2] and dst[2..4] are the two new quads |
| 71 */ | 71 */ |
| 72 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]); | 72 int SkChopQuadAtYExtrema(const SkPoint src[3], SkPoint dst[5]); |
| 73 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]); | 73 int SkChopQuadAtXExtrema(const SkPoint src[3], SkPoint dst[5]); |
| 74 | 74 |
| 75 /** Given 3 points on a quadratic bezier, if the point of maximum | 75 /** Given 3 points on a quadratic bezier, if the point of maximum |
| 76 curvature exists on the segment, returns the t value for this | 76 curvature exists on the segment, returns the t value for this |
| 77 point along the curve. Otherwise it will return a value of 0. | 77 point along the curve. Otherwise it will return a value of 0. |
| 78 */ | 78 */ |
| 79 float SkFindQuadMaxCurvature(const SkPoint src[3]); | 79 SkScalar SkFindQuadMaxCurvature(const SkPoint src[3]); |
| 80 | 80 |
| 81 /** Given 3 points on a quadratic bezier, divide it into 2 quadratics | 81 /** Given 3 points on a quadratic bezier, divide it into 2 quadratics |
| 82 if the point of maximum curvature exists on the quad segment. | 82 if the point of maximum curvature exists on the quad segment. |
| 83 Depending on what is returned, dst[] is treated as follows | 83 Depending on what is returned, dst[] is treated as follows |
| 84 1 dst[0..2] is the original quad | 84 1 dst[0..2] is the original quad |
| 85 2 dst[0..2] and dst[2..4] are the two new quads | 85 2 dst[0..2] and dst[2..4] are the two new quads |
| 86 If dst == null, it is ignored and only the count is returned. | 86 If dst == null, it is ignored and only the count is returned. |
| 87 */ | 87 */ |
| 88 int SkChopQuadAtMaxCurvature(const SkPoint src[3], SkPoint dst[5]); | 88 int SkChopQuadAtMaxCurvature(const SkPoint src[3], SkPoint dst[5]); |
| 89 | 89 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 private: | 307 private: |
| 308 enum { | 308 enum { |
| 309 kQuadCount = 8, // should handle most conics | 309 kQuadCount = 8, // should handle most conics |
| 310 kPointCount = 1 + 2 * kQuadCount, | 310 kPointCount = 1 + 2 * kQuadCount, |
| 311 }; | 311 }; |
| 312 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; | 312 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; |
| 313 int fQuadCount; // #quads for current usage | 313 int fQuadCount; // #quads for current usage |
| 314 }; | 314 }; |
| 315 | 315 |
| 316 #endif | 316 #endif |
| OLD | NEW |