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 SkPath_DEFINED | 10 #ifndef SkPath_DEFINED |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 * see if this value actually agrees with the return value that would be | 126 * see if this value actually agrees with the return value that would be |
127 * computed by getConvexity(). | 127 * computed by getConvexity(). |
128 * | 128 * |
129 * Note: even if this is set to a "known" value, if the path is later | 129 * Note: even if this is set to a "known" value, if the path is later |
130 * changed (e.g. lineTo(), addRect(), etc.) then the cached value will be | 130 * changed (e.g. lineTo(), addRect(), etc.) then the cached value will be |
131 * reset to kUnknown_Convexity. | 131 * reset to kUnknown_Convexity. |
132 */ | 132 */ |
133 void setConvexity(Convexity); | 133 void setConvexity(Convexity); |
134 | 134 |
135 /** | 135 /** |
136 * DEPRECATED: use getConvexity() | |
137 * Returns true if the path is flagged as being convex. This is not a | 136 * Returns true if the path is flagged as being convex. This is not a |
138 * confirmed by any analysis, it is just the value set earlier. | 137 * confirmed by any analysis, it is just the value set earlier. |
139 */ | 138 */ |
140 bool isConvex() const { | 139 bool isConvex() const { |
141 return kConvex_Convexity == this->getConvexity(); | 140 return kConvex_Convexity == this->getConvexity(); |
142 } | 141 } |
143 | 142 |
144 /** | 143 /** |
145 * DEPRECATED: use setConvexity() | |
146 * Set the isConvex flag to true or false. Convex paths may draw faster if | 144 * Set the isConvex flag to true or false. Convex paths may draw faster if |
147 * this flag is set, though setting this to true on a path that is in fact | 145 * this flag is set, though setting this to true on a path that is in fact |
148 * not convex can give undefined results when drawn. Paths default to | 146 * not convex can give undefined results when drawn. Paths default to |
149 * isConvex == false | 147 * isConvex == false |
150 */ | 148 */ |
| 149 SK_ATTR_DEPRECATED("use setConvexity") |
151 void setIsConvex(bool isConvex) { | 150 void setIsConvex(bool isConvex) { |
152 this->setConvexity(isConvex ? kConvex_Convexity : kConcave_Convexity); | 151 this->setConvexity(isConvex ? kConvex_Convexity : kConcave_Convexity); |
153 } | 152 } |
154 | 153 |
155 /** Returns true if the path is an oval. | 154 /** Returns true if the path is an oval. |
156 * | 155 * |
157 * @param rect returns the bounding rect of this oval. It's a circle | 156 * @param rect returns the bounding rect of this oval. It's a circle |
158 * if the height and width are the same. | 157 * if the height and width are the same. |
159 * | 158 * |
160 * @return true if this path is an oval. | 159 * @return true if this path is an oval. |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO
O | 1015 #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TO
O |
1017 friend class SkPathRef; // just for SerializationOffsets | 1016 friend class SkPathRef; // just for SerializationOffsets |
1018 #endif | 1017 #endif |
1019 friend class SkAutoPathBoundsUpdate; | 1018 friend class SkAutoPathBoundsUpdate; |
1020 friend class SkAutoDisableOvalCheck; | 1019 friend class SkAutoDisableOvalCheck; |
1021 friend class SkAutoDisableDirectionCheck; | 1020 friend class SkAutoDisableDirectionCheck; |
1022 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo | 1021 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo |
1023 }; | 1022 }; |
1024 | 1023 |
1025 #endif | 1024 #endif |
OLD | NEW |