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