| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 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 #include "SkOpContour.h" | 7 #include "SkOpContour.h" |
| 8 #include "SkPath.h" | 8 #include "SkPath.h" |
| 9 | 9 |
| 10 #ifdef SK_DEBUG | 10 #ifdef SK_DEBUG |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 int addSelfT(const SkPoint& pt, double newT) { | 49 int addSelfT(const SkPoint& pt, double newT) { |
| 50 return fContour->addSelfT(fIndex, pt, newT); | 50 return fContour->addSelfT(fIndex, pt, newT); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool advance() { | 53 bool advance() { |
| 54 return ++fIndex < fLast; | 54 return ++fIndex < fLast; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void alignTPt(SkIntersectionHelper& other, bool swap, int index, |
| 58 SkIntersections* ts, SkPoint* point) { |
| 59 fContour->alignTPt(fIndex, other.fContour, other.fIndex, swap, index, ts
, point); |
| 60 } |
| 61 |
| 57 SkScalar bottom() const { | 62 SkScalar bottom() const { |
| 58 return bounds().fBottom; | 63 return bounds().fBottom; |
| 59 } | 64 } |
| 60 | 65 |
| 61 const SkPathOpsBounds& bounds() const { | 66 const SkPathOpsBounds& bounds() const { |
| 62 return fContour->segments()[fIndex].bounds(); | 67 return fContour->segments()[fIndex].bounds(); |
| 63 } | 68 } |
| 64 | 69 |
| 65 void init(SkOpContour* contour) { | 70 void init(SkOpContour* contour) { |
| 66 fContour = contour; | 71 fContour = contour; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 147 } |
| 143 | 148 |
| 144 private: | 149 private: |
| 145 // utility callable by the user from the debugger when the implementation co
de is linked in | 150 // utility callable by the user from the debugger when the implementation co
de is linked in |
| 146 void dump() const; | 151 void dump() const; |
| 147 | 152 |
| 148 SkOpContour* fContour; | 153 SkOpContour* fContour; |
| 149 int fIndex; | 154 int fIndex; |
| 150 int fLast; | 155 int fLast; |
| 151 }; | 156 }; |
| OLD | NEW |