| 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 SkPath_DEFINED | 8 #ifndef SkPath_DEFINED |
| 9 #define SkPath_DEFINED | 9 #define SkPath_DEFINED |
| 10 | 10 |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 540 } |
| 541 | 541 |
| 542 /** | 542 /** |
| 543 * Chop a conic into N quads, stored continguously in pts[], where | 543 * Chop a conic into N quads, stored continguously in pts[], where |
| 544 * N = 1 << pow2. The amount of storage needed is (1 + 2 * N) | 544 * N = 1 << pow2. The amount of storage needed is (1 + 2 * N) |
| 545 */ | 545 */ |
| 546 static int ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const S
kPoint& p2, | 546 static int ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const S
kPoint& p2, |
| 547 SkScalar w, SkPoint pts[], int pow2); | 547 SkScalar w, SkPoint pts[], int pow2); |
| 548 | 548 |
| 549 /** | 549 /** |
| 550 * Given 3 points on a quadratic bezier, use degree elevation to |
| 551 * convert it into the cubic fitting the same curve. The new cubic |
| 552 * curve is returned in dst[0..3]. |
| 553 */ |
| 554 static void ConvertQuadToCubic(const SkPoint src[3], SkPoint dst[4]); |
| 555 |
| 556 /** |
| 550 * Returns true if the path specifies a rectangle. | 557 * Returns true if the path specifies a rectangle. |
| 551 * | 558 * |
| 552 * If this returns false, then all output parameters are ignored, and left | 559 * If this returns false, then all output parameters are ignored, and left |
| 553 * unchanged. If this returns true, then each of the output parameters | 560 * unchanged. If this returns true, then each of the output parameters |
| 554 * are checked for NULL. If they are not, they return their value. | 561 * are checked for NULL. If they are not, they return their value. |
| 555 * | 562 * |
| 556 * @param rect If not null, set to the bounds of the rectangle. | 563 * @param rect If not null, set to the bounds of the rectangle. |
| 557 * Note : this bounds may be smaller than the path's bounds, si
nce it is just | 564 * Note : this bounds may be smaller than the path's bounds, si
nce it is just |
| 558 * the bounds of the "drawable" parts of the path. e.g. a trail
ing MoveTo would | 565 * the bounds of the "drawable" parts of the path. e.g. a trail
ing MoveTo would |
| 559 * be ignored in this rect, but not by the path's bounds | 566 * be ignored in this rect, but not by the path's bounds |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 | 1102 |
| 1096 friend class SkAutoPathBoundsUpdate; | 1103 friend class SkAutoPathBoundsUpdate; |
| 1097 friend class SkAutoDisableOvalCheck; | 1104 friend class SkAutoDisableOvalCheck; |
| 1098 friend class SkAutoDisableDirectionCheck; | 1105 friend class SkAutoDisableDirectionCheck; |
| 1099 friend class SkBench_AddPathTest; // perf test reversePathTo | 1106 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1100 friend class PathTest_Private; // unit test reversePathTo | 1107 friend class PathTest_Private; // unit test reversePathTo |
| 1101 friend class ForceIsRRect_Private; // unit test isRRect | 1108 friend class ForceIsRRect_Private; // unit test isRRect |
| 1102 }; | 1109 }; |
| 1103 | 1110 |
| 1104 #endif | 1111 #endif |
| OLD | NEW |