| 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 "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix
); | 1675 SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix
); |
| 1676 | 1676 |
| 1677 if (this != dst) { | 1677 if (this != dst) { |
| 1678 dst->fFillType = fFillType; | 1678 dst->fFillType = fFillType; |
| 1679 dst->fSegmentMask = fSegmentMask; | 1679 dst->fSegmentMask = fSegmentMask; |
| 1680 dst->fConvexity = fConvexity; | 1680 dst->fConvexity = fConvexity; |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 #ifdef SK_BUILD_FOR_ANDROID |
| 1684 if (!matrix.isIdentity()) { |
| 1685 GEN_ID_PTR_INC(dst); |
| 1686 } |
| 1687 #endif |
| 1688 |
| 1683 if (kUnknown_Direction == fDirection) { | 1689 if (kUnknown_Direction == fDirection) { |
| 1684 dst->fDirection = kUnknown_Direction; | 1690 dst->fDirection = kUnknown_Direction; |
| 1685 } else { | 1691 } else { |
| 1686 SkScalar det2x2 = | 1692 SkScalar det2x2 = |
| 1687 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix:
:kMScaleY)) - | 1693 SkScalarMul(matrix.get(SkMatrix::kMScaleX), matrix.get(SkMatrix:
:kMScaleY)) - |
| 1688 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix::
kMSkewY)); | 1694 SkScalarMul(matrix.get(SkMatrix::kMSkewX), matrix.get(SkMatrix::
kMSkewY)); |
| 1689 if (det2x2 < 0) { | 1695 if (det2x2 < 0) { |
| 1690 dst->fDirection = SkPath::OppositeDirection(static_cast<Directio
n>(fDirection)); | 1696 dst->fDirection = SkPath::OppositeDirection(static_cast<Directio
n>(fDirection)); |
| 1691 } else if (det2x2 > 0) { | 1697 } else if (det2x2 > 0) { |
| 1692 dst->fDirection = fDirection; | 1698 dst->fDirection = fDirection; |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2945 switch (this->getFillType()) { | 2951 switch (this->getFillType()) { |
| 2946 case SkPath::kEvenOdd_FillType: | 2952 case SkPath::kEvenOdd_FillType: |
| 2947 case SkPath::kInverseEvenOdd_FillType: | 2953 case SkPath::kInverseEvenOdd_FillType: |
| 2948 w &= 1; | 2954 w &= 1; |
| 2949 break; | 2955 break; |
| 2950 default: | 2956 default: |
| 2951 break; | 2957 break; |
| 2952 } | 2958 } |
| 2953 return SkToBool(w); | 2959 return SkToBool(w); |
| 2954 } | 2960 } |
| OLD | NEW |