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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 const SkPathOpsBounds& bounds() const { | 101 const SkPathOpsBounds& bounds() const { |
102 return fBounds; | 102 return fBounds; |
103 } | 103 } |
104 | 104 |
105 void bumpCount() { | 105 void bumpCount() { |
106 ++fCount; | 106 ++fCount; |
107 } | 107 } |
108 | 108 |
109 void calcAngles(); | 109 void calcAngles(); |
110 bool collapsed() const; | 110 bool collapsed() const; |
| 111 bool collapsed(double startT, double endT) const; |
111 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, | 112 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, |
112 SkOpAngle::IncludeType ); | 113 SkOpAngle::IncludeType ); |
113 static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle, | 114 static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle, |
114 SkOpAngle::IncludeType ); | 115 SkOpAngle::IncludeType ); |
115 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp
e includeType); | 116 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp
e includeType); |
116 | 117 |
117 void clearAll(); | 118 void clearAll(); |
118 void clearOne(SkOpSpan* span); | 119 void clearOne(SkOpSpan* span); |
119 static void ClearVisited(SkOpSpanBase* span); | 120 static void ClearVisited(SkOpSpanBase* span); |
120 bool contains(double t) const; | 121 bool contains(double t) const; |
121 | 122 |
122 SkOpContour* contour() const { | 123 SkOpContour* contour() const { |
123 return fContour; | 124 return fContour; |
124 } | 125 } |
125 | 126 |
126 int count() const { | 127 int count() const { |
127 return fCount; | 128 return fCount; |
128 } | 129 } |
129 | 130 |
130 void debugAddAngle(double startT, double endT); | 131 void debugAddAngle(double startT, double endT); |
131 const SkOpPtT* debugAddT(double t) const; | 132 #if DEBUG_COINCIDENCE_VERBOSE |
| 133 const SkOpPtT* debugAddT(double t, const char* id, SkPathOpsDebug::GlitchLog
* ) const; |
| 134 #endif |
132 const SkOpAngle* debugAngle(int id) const; | 135 const SkOpAngle* debugAngle(int id) const; |
133 #if DEBUG_ANGLE | 136 #if DEBUG_ANGLE |
134 void debugCheckAngleCoin() const; | 137 void debugCheckAngleCoin() const; |
135 #endif | 138 #endif |
136 #if DEBUG_COINCIDENCE_VERBOSE | 139 #if DEBUG_COINCIDENCE_VERBOSE |
137 void debugCheckHealth(const char* id, SkPathOpsDebug::GlitchLog* ) const; | 140 void debugCheckHealth(const char* id, SkPathOpsDebug::GlitchLog* ) const; |
138 void debugClearAll(const char* id, SkPathOpsDebug::GlitchLog* glitches) cons
t; | 141 void debugClearAll(const char* id, SkPathOpsDebug::GlitchLog* glitches) cons
t; |
139 void debugClearOne(const SkOpSpan* span, const char* id, SkPathOpsDebug::Gli
tchLog* glitches) const; | 142 void debugClearOne(const SkOpSpan* span, const char* id, SkPathOpsDebug::Gli
tchLog* glitches) const; |
140 #endif | 143 #endif |
141 const SkOpCoincidence* debugCoincidence() const; | 144 const SkOpCoincidence* debugCoincidence() const; |
142 SkOpContour* debugContour(int id); | 145 SkOpContour* debugContour(int id) const; |
143 | 146 |
144 int debugID() const { | 147 int debugID() const { |
145 return SkDEBUGRELEASE(fID, -1); | 148 return SkDEBUGRELEASE(fID, -1); |
146 } | 149 } |
147 | 150 |
148 SkOpAngle* debugLastAngle(); | 151 SkOpAngle* debugLastAngle(); |
149 #if DEBUG_COINCIDENCE_VERBOSE | 152 #if DEBUG_COINCIDENCE_VERBOSE |
150 void debugMissingCoincidence(const char* id, SkPathOpsDebug::GlitchLog* glit
ches) const; | 153 void debugMissingCoincidence(const char* id, SkPathOpsDebug::GlitchLog* glit
ches) const; |
151 void debugMoveMultiples(const char* id, SkPathOpsDebug::GlitchLog* glitches)
const; | 154 void debugMoveMultiples(const char* id, SkPathOpsDebug::GlitchLog* glitches)
const; |
152 void debugMoveNearby(const char* id, SkPathOpsDebug::GlitchLog* glitches) co
nst; | 155 void debugMoveNearby(const char* id, SkPathOpsDebug::GlitchLog* glitches) co
nst; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg | 451 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg |
449 mutable SkScalar fDebugBaseMax; | 452 mutable SkScalar fDebugBaseMax; |
450 mutable int fDebugLastIndex; | 453 mutable int fDebugLastIndex; |
451 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign | 454 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign |
452 mutable SkScalar fDebugLastMax; | 455 mutable SkScalar fDebugLastMax; |
453 #endif | 456 #endif |
454 SkDEBUGCODE(int fID); | 457 SkDEBUGCODE(int fID); |
455 }; | 458 }; |
456 | 459 |
457 #endif | 460 #endif |
OLD | NEW |