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 19 matching lines...) Expand all Loading... | |
30 SkPath(); | 30 SkPath(); |
31 SkPath(const SkPath&); | 31 SkPath(const SkPath&); |
32 ~SkPath(); | 32 ~SkPath(); |
33 | 33 |
34 SkPath& operator=(const SkPath&); | 34 SkPath& operator=(const SkPath&); |
35 friend SK_API bool operator==(const SkPath&, const SkPath&); | 35 friend SK_API bool operator==(const SkPath&, const SkPath&); |
36 friend bool operator!=(const SkPath& a, const SkPath& b) { | 36 friend bool operator!=(const SkPath& a, const SkPath& b) { |
37 return !(a == b); | 37 return !(a == b); |
38 } | 38 } |
39 | 39 |
40 /** Return true if the paths contain an equal array of verbs and weights. Pa ths | |
41 * with equal verb counts can be readily interpolated. If the paths contain one | |
42 * or more conics, the conics' weights must also match. | |
43 * | |
44 * @param compare The path to compare. | |
45 * | |
46 * @return true if the paths have the same verbs and weights. | |
47 */ | |
48 bool isInterpolatable(const SkPath& compare) const; | |
49 | |
robertphillips
2016/02/17 21:32:00
identically ?
caryclark
2016/02/17 21:39:21
If I can't spell it, I shouldn't use it (done)
| |
50 /** Interpolate between two paths with indentically-sized point arrays. | |
robertphillips
2016/02/17 21:08:49
conains ?
caryclark
2016/02/17 21:39:21
Done.
| |
51 * The out path conains the verbs and weights of this path. | |
52 * The out points are a weighted average of this path and the ending path. | |
53 * | |
54 * @param ending The path to interpolate between. | |
55 * @param weight The weight, from 0 to 1. The output points are set to | |
56 * (this->points * weight) + ending->points * (1 - weight). | |
57 * @return true if the paths could be interpolated. | |
58 */ | |
59 bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const; | |
60 | |
40 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 61 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
41 /** Returns true if the caller is the only owner of the underlying path data */ | 62 /** Returns true if the caller is the only owner of the underlying path data */ |
42 bool unique() const { return fPathRef->unique(); } | 63 bool unique() const { return fPathRef->unique(); } |
43 #endif | 64 #endif |
44 | 65 |
45 enum FillType { | 66 enum FillType { |
46 /** Specifies that "inside" is computed by a non-zero sum of signed | 67 /** Specifies that "inside" is computed by a non-zero sum of signed |
47 edge crossings | 68 edge crossings |
48 */ | 69 */ |
49 kWinding_FillType, | 70 kWinding_FillType, |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1143 | 1164 |
1144 friend class SkAutoPathBoundsUpdate; | 1165 friend class SkAutoPathBoundsUpdate; |
1145 friend class SkAutoDisableOvalCheck; | 1166 friend class SkAutoDisableOvalCheck; |
1146 friend class SkAutoDisableDirectionCheck; | 1167 friend class SkAutoDisableDirectionCheck; |
1147 friend class SkBench_AddPathTest; // perf test reversePathTo | 1168 friend class SkBench_AddPathTest; // perf test reversePathTo |
1148 friend class PathTest_Private; // unit test reversePathTo | 1169 friend class PathTest_Private; // unit test reversePathTo |
1149 friend class ForceIsRRect_Private; // unit test isRRect | 1170 friend class ForceIsRRect_Private; // unit test isRRect |
1150 }; | 1171 }; |
1151 | 1172 |
1152 #endif | 1173 #endif |
OLD | NEW |