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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 bool addPartialCoincident(int index, SkOpContour* other, int otherIndex, | 66 bool addPartialCoincident(int index, SkOpContour* other, int otherIndex, |
67 const SkIntersections& ts, int ptIndex, bool swap); | 67 const SkIntersections& ts, int ptIndex, bool swap); |
68 | 68 |
69 int addQuad(const SkPoint pts[3]) { | 69 int addQuad(const SkPoint pts[3]) { |
70 fSegments.push_back().addQuad(pts, fOperand, fXor); | 70 fSegments.push_back().addQuad(pts, fOperand, fXor); |
71 fContainsCurves = true; | 71 fContainsCurves = true; |
72 return fSegments.count(); | 72 return fSegments.count(); |
73 } | 73 } |
74 | 74 |
75 int addT(int segIndex, SkOpContour* other, int otherIndex, const SkPoint& pt
, double newT, | 75 int addT(int segIndex, SkOpContour* other, int otherIndex, const SkPoint& pt
, double newT) { |
76 bool isNear) { | |
77 setContainsIntercepts(); | 76 setContainsIntercepts(); |
78 return fSegments[segIndex].addT(&other->fSegments[otherIndex], pt, newT,
isNear); | 77 return fSegments[segIndex].addT(&other->fSegments[otherIndex], pt, newT)
; |
79 } | 78 } |
80 | 79 |
81 int addSelfT(int segIndex, SkOpContour* other, int otherIndex, const SkPoint
& pt, double newT) { | 80 int addSelfT(int segIndex, SkOpContour* other, int otherIndex, const SkPoint
& pt, double newT) { |
82 setContainsIntercepts(); | 81 setContainsIntercepts(); |
83 return fSegments[segIndex].addSelfT(&other->fSegments[otherIndex], pt, n
ewT); | 82 return fSegments[segIndex].addSelfT(&other->fSegments[otherIndex], pt, n
ewT); |
84 } | 83 } |
85 | 84 |
86 const SkPathOpsBounds& bounds() const { | 85 const SkPathOpsBounds& bounds() const { |
87 return fBounds; | 86 return fBounds; |
88 } | 87 } |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 bool fDone; | 260 bool fDone; |
262 bool fOperand; // true for the second argument to a binary operator | 261 bool fOperand; // true for the second argument to a binary operator |
263 bool fXor; | 262 bool fXor; |
264 bool fOppXor; | 263 bool fOppXor; |
265 #ifdef SK_DEBUG | 264 #ifdef SK_DEBUG |
266 int fID; | 265 int fID; |
267 #endif | 266 #endif |
268 }; | 267 }; |
269 | 268 |
270 #endif | 269 #endif |
OLD | NEW |