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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 const SkPoint* pts() const { | 170 const SkPoint* pts() const { |
171 return fPts; | 171 return fPts; |
172 } | 172 } |
173 | 173 |
174 void reset() { | 174 void reset() { |
175 init(NULL, (SkPath::Verb) -1, false, false); | 175 init(NULL, (SkPath::Verb) -1, false, false); |
176 fBounds.set(SK_ScalarMax, SK_ScalarMax, SK_ScalarMax, SK_ScalarMax); | 176 fBounds.set(SK_ScalarMax, SK_ScalarMax, SK_ScalarMax, SK_ScalarMax); |
177 fTs.reset(); | 177 fTs.reset(); |
178 } | 178 } |
179 | 179 |
| 180 bool reversePoints(const SkPoint& p1, const SkPoint& p2) const; |
| 181 |
180 void setOppXor(bool isOppXor) { | 182 void setOppXor(bool isOppXor) { |
181 fOppXor = isOppXor; | 183 fOppXor = isOppXor; |
182 } | 184 } |
183 | 185 |
184 void setUpWinding(int index, int endIndex, int* maxWinding, int* sumWinding)
{ | 186 void setUpWinding(int index, int endIndex, int* maxWinding, int* sumWinding)
{ |
185 int deltaSum = spanSign(index, endIndex); | 187 int deltaSum = spanSign(index, endIndex); |
186 *maxWinding = *sumWinding; | 188 *maxWinding = *sumWinding; |
187 *sumWinding -= deltaSum; | 189 *sumWinding -= deltaSum; |
188 } | 190 } |
189 | 191 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 bool fSmall; // set if some span is small | 546 bool fSmall; // set if some span is small |
545 bool fTiny; // set if some span is tiny | 547 bool fTiny; // set if some span is tiny |
546 #if defined(SK_DEBUG) || !FORCE_RELEASE | 548 #if defined(SK_DEBUG) || !FORCE_RELEASE |
547 int fID; | 549 int fID; |
548 #endif | 550 #endif |
549 | 551 |
550 friend class PathOpsSegmentTester; | 552 friend class PathOpsSegmentTester; |
551 }; | 553 }; |
552 | 554 |
553 #endif | 555 #endif |
OLD | NEW |