michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef SkOpSpan_DEFINED michael@0: #define SkOpSpan_DEFINED michael@0: michael@0: #include "SkPoint.h" michael@0: michael@0: class SkOpSegment; michael@0: michael@0: struct SkOpSpan { michael@0: SkOpSegment* fOther; michael@0: SkPoint fPt; // computed when the curves are intersected michael@0: double fT; michael@0: double fOtherT; // value at fOther[fOtherIndex].fT michael@0: int fOtherIndex; // can't be used during intersection michael@0: int fWindSum; // accumulated from contours surrounding this one. michael@0: int fOppSum; // for binary operators: the opposite winding sum michael@0: int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident michael@0: int fOppValue; // normally 0 -- when binary coincident edges combine, opp value goes here michael@0: bool fDone; // if set, this span to next higher T has been processed michael@0: bool fUnsortableStart; // set when start is part of an unsortable pair michael@0: bool fUnsortableEnd; // set when end is part of an unsortable pair michael@0: bool fSmall; // if set, consecutive points are almost equal michael@0: bool fTiny; // if set, span may still be considered once for edge following michael@0: bool fLoop; // set when a cubic loops back to this point michael@0: michael@0: #ifdef SK_DEBUG michael@0: void dump() const; michael@0: #endif michael@0: }; michael@0: michael@0: #endif