| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkOpContour_DEFINED | 7 #ifndef SkOpContour_DEFINED |
| 8 #define SkOpContour_DEFINED | 8 #define SkOpContour_DEFINED |
| 9 | 9 |
| 10 #include "SkOpSegment.h" | 10 #include "SkOpSegment.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const SkPoint& pt, double newT) { | 83 const SkPoint& pt, double newT) { |
| 84 return fSegments[segIndex].addUnsortableT(&other->fSegments[otherIndex],
start, pt, newT); | 84 return fSegments[segIndex].addUnsortableT(&other->fSegments[otherIndex],
start, pt, newT); |
| 85 } | 85 } |
| 86 | 86 |
| 87 const SkPathOpsBounds& bounds() const { | 87 const SkPathOpsBounds& bounds() const { |
| 88 return fBounds; | 88 return fBounds; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void calcCoincidentWinding(); | 91 void calcCoincidentWinding(); |
| 92 | 92 |
| 93 void checkEnds() { |
| 94 if (!fContainsCurves) { |
| 95 return; |
| 96 } |
| 97 int segmentCount = fSegments.count(); |
| 98 for (int sIndex = 0; sIndex < segmentCount; ++sIndex) { |
| 99 SkOpSegment* segment = &fSegments[sIndex]; |
| 100 if (segment->verb() == SkPath::kLine_Verb) { |
| 101 continue; |
| 102 } |
| 103 fSegments[sIndex].checkEnds(); |
| 104 } |
| 105 } |
| 106 |
| 93 void complete() { | 107 void complete() { |
| 94 setBounds(); | 108 setBounds(); |
| 95 fContainsIntercepts = false; | 109 fContainsIntercepts = false; |
| 96 } | 110 } |
| 97 | 111 |
| 98 bool containsCubics() const { | 112 bool containsCubics() const { |
| 99 return fContainsCubics; | 113 return fContainsCubics; |
| 100 } | 114 } |
| 101 | 115 |
| 102 bool crosses(const SkOpContour* crosser) const { | 116 bool crosses(const SkOpContour* crosser) const { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool fDone; | 246 bool fDone; |
| 233 bool fOperand; // true for the second argument to a binary operator | 247 bool fOperand; // true for the second argument to a binary operator |
| 234 bool fXor; | 248 bool fXor; |
| 235 bool fOppXor; | 249 bool fOppXor; |
| 236 #if DEBUG_DUMP | 250 #if DEBUG_DUMP |
| 237 int fID; | 251 int fID; |
| 238 #endif | 252 #endif |
| 239 }; | 253 }; |
| 240 | 254 |
| 241 #endif | 255 #endif |
| OLD | NEW |