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 #include "SkBuffer.h" | 8 #include "SkBuffer.h" |
9 #include "SkErrorInternals.h" | 9 #include "SkErrorInternals.h" |
10 #include "SkGeometry.h" | 10 #include "SkGeometry.h" |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 SkPathRef::Editor ed(&fPathRef, count+close, count); | 856 SkPathRef::Editor ed(&fPathRef, count+close, count); |
857 | 857 |
858 ed.growForVerb(kMove_Verb)->set(pts[0].fX, pts[0].fY); | 858 ed.growForVerb(kMove_Verb)->set(pts[0].fX, pts[0].fY); |
859 if (count > 1) { | 859 if (count > 1) { |
860 SkPoint* p = ed.growForRepeatedVerb(kLine_Verb, count - 1); | 860 SkPoint* p = ed.growForRepeatedVerb(kLine_Verb, count - 1); |
861 memcpy(p, &pts[1], (count-1) * sizeof(SkPoint)); | 861 memcpy(p, &pts[1], (count-1) * sizeof(SkPoint)); |
862 } | 862 } |
863 | 863 |
864 if (close) { | 864 if (close) { |
865 ed.growForVerb(kClose_Verb); | 865 ed.growForVerb(kClose_Verb); |
| 866 fLastMoveToIndex ^= ~fLastMoveToIndex >> (8 * sizeof(fLastMoveToIndex) -
1); |
866 } | 867 } |
867 | 868 |
868 DIRTY_AFTER_EDIT; | 869 DIRTY_AFTER_EDIT; |
869 SkDEBUGCODE(this->validate();) | 870 SkDEBUGCODE(this->validate();) |
870 } | 871 } |
871 | 872 |
872 #include "SkGeometry.h" | 873 #include "SkGeometry.h" |
873 | 874 |
874 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar
sweepAngle, | 875 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar
sweepAngle, |
875 SkPoint* pt) { | 876 SkPoint* pt) { |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 switch (this->getFillType()) { | 2792 switch (this->getFillType()) { |
2792 case SkPath::kEvenOdd_FillType: | 2793 case SkPath::kEvenOdd_FillType: |
2793 case SkPath::kInverseEvenOdd_FillType: | 2794 case SkPath::kInverseEvenOdd_FillType: |
2794 w &= 1; | 2795 w &= 1; |
2795 break; | 2796 break; |
2796 default: | 2797 default: |
2797 break; | 2798 break; |
2798 } | 2799 } |
2799 return SkToBool(w); | 2800 return SkToBool(w); |
2800 } | 2801 } |
OLD | NEW |