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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } | 337 } |
338 | 338 |
339 void toPartialForward(SkPathWriter* path) const { | 339 void toPartialForward(SkPathWriter* path) const { |
340 const SkOpSegment* segment = &fHead; | 340 const SkOpSegment* segment = &fHead; |
341 do { | 341 do { |
342 segment->addCurveTo(segment->head(), segment->tail(), path, true); | 342 segment->addCurveTo(segment->head(), segment->tail(), path, true); |
343 } while ((segment = segment->next())); | 343 } while ((segment = segment->next())); |
344 } | 344 } |
345 | 345 |
346 void toPath(SkPathWriter* path) const; | 346 void toPath(SkPathWriter* path) const; |
347 void topSortableSegment(const SkPoint& topLeft, SkPoint* bestXY, SkOpSegment
** topStart); | 347 void topSortableSegment(const SkDPoint& topLeft, SkDPoint* bestXY, SkOpSegme
nt** topStart); |
348 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr); | 348 SkOpSegment* undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr); |
349 | 349 |
350 private: | 350 private: |
351 SkOpGlobalState* fState; | 351 SkOpGlobalState* fState; |
352 SkOpSegment fHead; | 352 SkOpSegment fHead; |
353 SkOpSegment* fTail; | 353 SkOpSegment* fTail; |
354 SkOpContour* fNext; | 354 SkOpContour* fNext; |
355 SkTDArray<SkOpSegment*> fSortedSegments; // set by find top segment | 355 SkTDArray<SkOpSegment*> fSortedSegments; // set by find top segment |
356 SkPathOpsBounds fBounds; | 356 SkPathOpsBounds fBounds; |
357 int fCount; | 357 int fCount; |
358 int fFirstSorted; | 358 int fFirstSorted; |
359 bool fDone; // set by find top segment | 359 bool fDone; // set by find top segment |
360 bool fOperand; // true for the second argument to a binary operator | 360 bool fOperand; // true for the second argument to a binary operator |
361 bool fXor; // set if original path had even-odd fill | 361 bool fXor; // set if original path had even-odd fill |
362 bool fOppXor; // set if opposite path had even-odd fill | 362 bool fOppXor; // set if opposite path had even-odd fill |
363 SkDEBUGCODE(int fID); | 363 SkDEBUGCODE(int fID); |
364 SkDEBUGCODE(int fIndent); | 364 SkDEBUGCODE(int fIndent); |
365 }; | 365 }; |
366 | 366 |
367 #endif | 367 #endif |
OLD | NEW |