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 #include "SkBuffer.h" | 10 #include "SkBuffer.h" |
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 } while (start == stop); | 1223 } while (start == stop); |
1224 } | 1224 } |
1225 } | 1225 } |
1226 | 1226 |
1227 SkMatrix matrix; | 1227 SkMatrix matrix; |
1228 | 1228 |
1229 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height())); | 1229 matrix.setScale(SkScalarHalf(oval.width()), SkScalarHalf(oval.height())); |
1230 matrix.postTranslate(oval.centerX(), oval.centerY()); | 1230 matrix.postTranslate(oval.centerX(), oval.centerY()); |
1231 | 1231 |
1232 return SkBuildQuadArc(start, stop, | 1232 return SkBuildQuadArc(start, stop, |
1233 sweepAngle > 0 ? kCW_SkRotationDirection : kCCW_SkRotationDirection, | 1233 sweepAngle > 0 ? kCW_SkRotationDirection : |
| 1234 kCCW_SkRotationDirection, |
1234 &matrix, pts); | 1235 &matrix, pts); |
1235 } | 1236 } |
1236 | 1237 |
1237 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, | 1238 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, |
1238 bool forceMoveTo) { | 1239 bool forceMoveTo) { |
1239 if (oval.width() < 0 || oval.height() < 0) { | 1240 if (oval.width() < 0 || oval.height() < 0) { |
1240 return; | 1241 return; |
1241 } | 1242 } |
1242 | 1243 |
1243 SkPoint pts[kSkBuildQuadArcStorage]; | 1244 SkPoint pts[kSkBuildQuadArcStorage]; |
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2929 switch (this->getFillType()) { | 2930 switch (this->getFillType()) { |
2930 case SkPath::kEvenOdd_FillType: | 2931 case SkPath::kEvenOdd_FillType: |
2931 case SkPath::kInverseEvenOdd_FillType: | 2932 case SkPath::kInverseEvenOdd_FillType: |
2932 w &= 1; | 2933 w &= 1; |
2933 break; | 2934 break; |
2934 default: | 2935 default: |
2935 break; | 2936 break; |
2936 } | 2937 } |
2937 return SkToBool(w); | 2938 return SkToBool(w); |
2938 } | 2939 } |
OLD | NEW |