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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 | 637 |
638 int count = fPathRef->countPoints(); | 638 int count = fPathRef->countPoints(); |
639 if (count == 0) { | 639 if (count == 0) { |
640 this->moveTo(x, y); | 640 this->moveTo(x, y); |
641 } else { | 641 } else { |
642 SkPathRef::Editor ed(&fPathRef); | 642 SkPathRef::Editor ed(&fPathRef); |
643 ed.atPoint(count-1)->set(x, y); | 643 ed.atPoint(count-1)->set(x, y); |
644 } | 644 } |
645 } | 645 } |
646 | 646 |
| 647 int SkPath::countConicWeights() const { |
| 648 return fPathRef->countWeights(); |
| 649 } |
| 650 |
| 651 SkScalar SkPath::getConicWeight(int index) const { |
| 652 if ((unsigned)index < (unsigned)fPathRef->countWeights()) { |
| 653 return fPathRef->atConicWeight(index); |
| 654 } |
| 655 return SkIntToScalar(0); |
| 656 } |
| 657 |
647 void SkPath::setConvexity(Convexity c) { | 658 void SkPath::setConvexity(Convexity c) { |
648 if (fConvexity != c) { | 659 if (fConvexity != c) { |
649 fConvexity = c; | 660 fConvexity = c; |
650 } | 661 } |
651 } | 662 } |
652 | 663 |
653 ////////////////////////////////////////////////////////////////////////////// | 664 ////////////////////////////////////////////////////////////////////////////// |
654 // Construction methods | 665 // Construction methods |
655 | 666 |
656 #define DIRTY_AFTER_EDIT \ | 667 #define DIRTY_AFTER_EDIT \ |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 switch (this->getFillType()) { | 2875 switch (this->getFillType()) { |
2865 case SkPath::kEvenOdd_FillType: | 2876 case SkPath::kEvenOdd_FillType: |
2866 case SkPath::kInverseEvenOdd_FillType: | 2877 case SkPath::kInverseEvenOdd_FillType: |
2867 w &= 1; | 2878 w &= 1; |
2868 break; | 2879 break; |
2869 default: | 2880 default: |
2870 break; | 2881 break; |
2871 } | 2882 } |
2872 return SkToBool(w); | 2883 return SkToBool(w); |
2873 } | 2884 } |
OLD | NEW |