| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 664 |
| 665 void SkPath::moveTo(SkScalar x, SkScalar y) { | 665 void SkPath::moveTo(SkScalar x, SkScalar y) { |
| 666 SkDEBUGCODE(this->validate();) | 666 SkDEBUGCODE(this->validate();) |
| 667 | 667 |
| 668 SkPathRef::Editor ed(&fPathRef); | 668 SkPathRef::Editor ed(&fPathRef); |
| 669 | 669 |
| 670 // remember our index | 670 // remember our index |
| 671 fLastMoveToIndex = fPathRef->countPoints(); | 671 fLastMoveToIndex = fPathRef->countPoints(); |
| 672 | 672 |
| 673 ed.growForVerb(kMove_Verb)->set(x, y); | 673 ed.growForVerb(kMove_Verb)->set(x, y); |
| 674 |
| 675 DIRTY_AFTER_EDIT; |
| 674 } | 676 } |
| 675 | 677 |
| 676 void SkPath::rMoveTo(SkScalar x, SkScalar y) { | 678 void SkPath::rMoveTo(SkScalar x, SkScalar y) { |
| 677 SkPoint pt; | 679 SkPoint pt; |
| 678 this->getLastPt(&pt); | 680 this->getLastPt(&pt); |
| 679 this->moveTo(pt.fX + x, pt.fY + y); | 681 this->moveTo(pt.fX + x, pt.fY + y); |
| 680 } | 682 } |
| 681 | 683 |
| 682 void SkPath::injectMoveToIfNeeded() { | 684 void SkPath::injectMoveToIfNeeded() { |
| 683 if (fLastMoveToIndex < 0) { | 685 if (fLastMoveToIndex < 0) { |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 switch (this->getFillType()) { | 2794 switch (this->getFillType()) { |
| 2793 case SkPath::kEvenOdd_FillType: | 2795 case SkPath::kEvenOdd_FillType: |
| 2794 case SkPath::kInverseEvenOdd_FillType: | 2796 case SkPath::kInverseEvenOdd_FillType: |
| 2795 w &= 1; | 2797 w &= 1; |
| 2796 break; | 2798 break; |
| 2797 default: | 2799 default: |
| 2798 break; | 2800 break; |
| 2799 } | 2801 } |
| 2800 return SkToBool(w); | 2802 return SkToBool(w); |
| 2801 } | 2803 } |
| OLD | NEW |