1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/pathops/SkOpSpan.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +/* 1.5 + * Copyright 2012 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 +#ifndef SkOpSpan_DEFINED 1.11 +#define SkOpSpan_DEFINED 1.12 + 1.13 +#include "SkPoint.h" 1.14 + 1.15 +class SkOpSegment; 1.16 + 1.17 +struct SkOpSpan { 1.18 + SkOpSegment* fOther; 1.19 + SkPoint fPt; // computed when the curves are intersected 1.20 + double fT; 1.21 + double fOtherT; // value at fOther[fOtherIndex].fT 1.22 + int fOtherIndex; // can't be used during intersection 1.23 + int fWindSum; // accumulated from contours surrounding this one. 1.24 + int fOppSum; // for binary operators: the opposite winding sum 1.25 + int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident 1.26 + int fOppValue; // normally 0 -- when binary coincident edges combine, opp value goes here 1.27 + bool fDone; // if set, this span to next higher T has been processed 1.28 + bool fUnsortableStart; // set when start is part of an unsortable pair 1.29 + bool fUnsortableEnd; // set when end is part of an unsortable pair 1.30 + bool fSmall; // if set, consecutive points are almost equal 1.31 + bool fTiny; // if set, span may still be considered once for edge following 1.32 + bool fLoop; // set when a cubic loops back to this point 1.33 + 1.34 +#ifdef SK_DEBUG 1.35 + void dump() const; 1.36 +#endif 1.37 +}; 1.38 + 1.39 +#endif