| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } while ((segment = segment->next())); | 390 } while ((segment = segment->next())); |
| 391 } | 391 } |
| 392 | 392 |
| 393 const SkPoint& start() const { | 393 const SkPoint& start() const { |
| 394 return fHead.pts()[0]; | 394 return fHead.pts()[0]; |
| 395 } | 395 } |
| 396 | 396 |
| 397 void toPartialBackward(SkPathWriter* path) const { | 397 void toPartialBackward(SkPathWriter* path) const { |
| 398 const SkOpSegment* segment = fTail; | 398 const SkOpSegment* segment = fTail; |
| 399 do { | 399 do { |
| 400 segment->addCurveTo(segment->tail(), segment->head(), path, true); | 400 SkAssertResult(segment->addCurveTo(segment->tail(), segment->head(),
path)); |
| 401 } while ((segment = segment->prev())); | 401 } while ((segment = segment->prev())); |
| 402 } | 402 } |
| 403 | 403 |
| 404 void toPartialForward(SkPathWriter* path) const { | 404 void toPartialForward(SkPathWriter* path) const { |
| 405 const SkOpSegment* segment = &fHead; | 405 const SkOpSegment* segment = &fHead; |
| 406 do { | 406 do { |
| 407 segment->addCurveTo(segment->head(), segment->tail(), path, true); | 407 SkAssertResult(segment->addCurveTo(segment->head(), segment->tail(),
path)); |
| 408 } while ((segment = segment->next())); | 408 } while ((segment = segment->next())); |
| 409 } | 409 } |
| 410 | 410 |
| 411 void toReversePath(SkPathWriter* path) const; | 411 void toReversePath(SkPathWriter* path) const; |
| 412 void toPath(SkPathWriter* path) const; | 412 void toPath(SkPathWriter* path) const; |
| 413 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr); | 413 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr); |
| 414 | 414 |
| 415 private: | 415 private: |
| 416 SkOpGlobalState* fState; | 416 SkOpGlobalState* fState; |
| 417 SkOpSegment fHead; | 417 SkOpSegment fHead; |
| 418 SkOpSegment* fTail; | 418 SkOpSegment* fTail; |
| 419 SkOpContour* fNext; | 419 SkOpContour* fNext; |
| 420 SkPathOpsBounds fBounds; | 420 SkPathOpsBounds fBounds; |
| 421 int fCcw; | 421 int fCcw; |
| 422 int fCount; | 422 int fCount; |
| 423 int fFirstSorted; | 423 int fFirstSorted; |
| 424 bool fDone; // set by find top segment | 424 bool fDone; // set by find top segment |
| 425 bool fOperand; // true for the second argument to a binary operator | 425 bool fOperand; // true for the second argument to a binary operator |
| 426 bool fReverse; // true if contour should be reverse written to path (used o
nly by fix winding) | 426 bool fReverse; // true if contour should be reverse written to path (used o
nly by fix winding) |
| 427 bool fXor; // set if original path had even-odd fill | 427 bool fXor; // set if original path had even-odd fill |
| 428 bool fOppXor; // set if opposite path had even-odd fill | 428 bool fOppXor; // set if opposite path had even-odd fill |
| 429 SkDEBUGCODE(int fID); | 429 SkDEBUGCODE(int fID); |
| 430 SkDEBUGCODE(mutable int fDebugIndent); | 430 SkDEBUGCODE(mutable int fDebugIndent); |
| 431 }; | 431 }; |
| 432 | 432 |
| 433 class SkOpContourHead : public SkOpContour { | 433 class SkOpContourHead : public SkOpContour { |
| 434 }; | 434 }; |
| 435 | 435 |
| 436 #endif | 436 #endif |
| OLD | NEW |