| 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 #ifndef SkOpSegment_DEFINE | 7 #ifndef SkOpSegment_DEFINE |
| 8 #define SkOpSegment_DEFINE | 8 #define SkOpSegment_DEFINE |
| 9 | 9 |
| 10 #include "SkOpAngle.h" | 10 #include "SkOpAngle.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 bool isVertical() const { | 261 bool isVertical() const { |
| 262 return fBounds.fLeft == fBounds.fRight; | 262 return fBounds.fLeft == fBounds.fRight; |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool isVertical(SkOpSpanBase* start, SkOpSpanBase* end) const { | 265 bool isVertical(SkOpSpanBase* start, SkOpSpanBase* end) const { |
| 266 return (*CurveIsVertical[fVerb])(fPts, fWeight, start->t(), end->t()); | 266 return (*CurveIsVertical[fVerb])(fPts, fWeight, start->t(), end->t()); |
| 267 } | 267 } |
| 268 | 268 |
| 269 bool isXor() const; | 269 bool isXor() const; |
| 270 | 270 |
| 271 void joinEnds(SkOpSegment* start) { |
| 272 fTail.ptT()->addOpp(start->fHead.ptT(), start->fHead.ptT()); |
| 273 } |
| 274 |
| 271 const SkPoint& lastPt() const { | 275 const SkPoint& lastPt() const { |
| 272 return fPts[SkPathOpsVerbToPoints(fVerb)]; | 276 return fPts[SkPathOpsVerbToPoints(fVerb)]; |
| 273 } | 277 } |
| 274 | 278 |
| 275 void markAllDone(); | 279 void markAllDone(); |
| 276 SkOpSpanBase* markAndChaseDone(SkOpSpanBase* start, SkOpSpanBase* end); | 280 SkOpSpanBase* markAndChaseDone(SkOpSpanBase* start, SkOpSpanBase* end); |
| 277 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding
, | 281 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding
, |
| 278 SkOpSpanBase** lastPtr); | 282 SkOpSpanBase** lastPtr); |
| 279 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding
, | 283 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding
, |
| 280 int oppWinding, SkOpSpanBase** lastPtr); | 284 int oppWinding, SkOpSpanBase** lastPtr); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg | 455 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg |
| 452 mutable SkScalar fDebugBaseMax; | 456 mutable SkScalar fDebugBaseMax; |
| 453 mutable int fDebugLastIndex; | 457 mutable int fDebugLastIndex; |
| 454 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign | 458 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign |
| 455 mutable SkScalar fDebugLastMax; | 459 mutable SkScalar fDebugLastMax; |
| 456 #endif | 460 #endif |
| 457 SkDEBUGCODE(int fID); | 461 SkDEBUGCODE(int fID); |
| 458 }; | 462 }; |
| 459 | 463 |
| 460 #endif | 464 #endif |
| OLD | NEW |