29#if DEBUG_ADD_INTERSECTING_TS
62 for (
int n = 1; n < pts; ++n) {
66 for (
int n = 1; n < pts; ++n) {
82 for (
int n = 1; n < pts; ++n) {
86 for (
int n = 1; n < pts; ++n) {
102 for (
int n = 1; n < pts; ++n) {
106 for (
int n = 1; n < pts; ++n) {
122 for (
int n = 1; n < pts; ++n) {
126 for (
int n = 1; n < pts; ++n) {
143 for (
int n = 1; n < pts; ++n) {
147 for (
int n = 1; n < pts; ++n) {
163 for (
int n = 1; n < pts; ++n) {
167 for (
int n = 1; n < pts; ++n) {
183 for (
int n = 1; n < pts; ++n) {
187 for (
int n = 1; n < pts; ++n) {
203 for (
int n = 1; n < pts; ++n) {
207 for (
int n = 1; n < pts; ++n) {
223 for (
int n = 1; n < pts; ++n) {
227 for (
int n = 1; n < pts; ++n) {
290 test->debugValidate();
291 next->debugValidate();
312 pts = ts.lineHorizontal(wn.
pts(), wt.
left(),
317 pts = ts.quadHorizontal(wn.
pts(), wt.
left(),
327 pts = ts.cubicHorizontal(wn.
pts(), wt.
left(),
341 pts = ts.lineVertical(wn.
pts(), wt.
top(),
347 pts = ts.quadVertical(wn.
pts(), wt.
top(),
359 pts = ts.cubicVertical(wn.
pts(), wt.
top(),
371 pts = ts.lineHorizontal(wt.
pts(), wn.
left(),
376 pts = ts.lineVertical(wt.
pts(), wn.
top(),
381 pts = ts.lineLine(wt.
pts(), wn.
pts());
386 pts = ts.quadLine(wn.
pts(), wt.
pts());
396 pts = ts.cubicLine(wn.
pts(), wt.
pts());
406 pts = ts.quadHorizontal(wt.
pts(), wn.
left(),
411 pts = ts.quadVertical(wt.
pts(), wn.
top(),
416 pts = ts.quadLine(wt.
pts(), wn.
pts());
420 pts = ts.intersect(quad1.
set(wt.
pts()), quad2.
set(wn.
pts()));
433 pts = ts.intersect(cubic2.
set(wn.
pts()), quad1.
set(wt.
pts()));
471 pts = ts.intersect(cubic2.
set(wn.
pts()
483 pts = ts.cubicHorizontal(wt.
pts(), wn.
left(),
488 pts = ts.cubicVertical(wt.
pts(), wn.
top(),
493 pts = ts.cubicLine(wt.
pts(), wn.
pts());
497 pts = ts.intersect(cubic1.
set(wt.
pts()), quad2.
set(wn.
pts()));
502 pts = ts.intersect(cubic1.
set(wt.
pts()
510 pts = ts.intersect(cubic1.
set(wt.
pts()), cubic2.
set(wn.
pts()));
521#if DEBUG_T_SECT_LOOP_COUNT
522 test->globalState()->debugAddLoopCount(&ts, wt, wn);
526 for (
int pt = 0; pt < pts; ++pt) {
527 SkASSERT(ts[0][pt] >= 0 && ts[0][pt] <= 1);
528 SkASSERT(ts[1][pt] >= 0 && ts[1][pt] <= 1);
534 SkPoint iPt = ts.pt(pt).asSkPoint();
545 testTAt->
addOpp(nextTAt, oppPrev);
547 if (testTAt->
fPt != nextTAt->
fPt) {
554 if (!ts.isCoincident(pt)) {
558 coinPtT[0] = testTAt;
559 coinPtT[1] = nextTAt;
563 if (coinPtT[0]->span() == testTAt->
span()) {
567 if (coinPtT[1]->span() == nextTAt->
span()) {
573 swap(coinPtT[0], coinPtT[1]);
574 swap(testTAt, nextTAt);
577 || coinPtT[0]->
span()->
t() < testTAt->
span()->
t());
578 if (coinPtT[0]->span()->deleted()) {
586 coincidence->
add(coinPtT[0], testTAt, coinPtT[1], nextTAt);
static float next(float f)
static void debugShowConicQuadIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowQuadIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowQuadLineIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowCubicIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
bool AddIntersectTs(SkOpContour *test, SkOpContour *next, SkOpCoincidence *coincidence)
static void debugShowCubicConicIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowLineIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowConicLineIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowConicIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowCubicLineIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
static void debugShowCubicQuadIntersection(int, const SkIntersectionHelper &, const SkIntersectionHelper &, const SkIntersections &)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define CONIC_DEBUG_DATA(c, w)
#define SkDEBUGPARAMS(...)
#define PT_DEBUG_DATA(i, n)
#define LINE_DEBUG_DATA(l)
#define T_DEBUG_STR(t, n)
#define CUBIC_DEBUG_DATA(c)
#define QUAD_DEBUG_DATA(q)
bool AlmostLessUlps(float a, float b)
#define SkOPOBJASSERT(obj, cond)
void swap(sk_sp< T > &a, sk_sp< T > &b)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
const SkPathOpsBounds & bounds() const
bool startAfter(const SkIntersectionHelper &after)
SkOpSegment * segment() const
void init(SkOpContour *contour)
@ kHorizontalLine_Segment
SegmentType segmentType() const
const SkPoint * pts() const
void add(SkOpPtT *coinPtTStart, SkOpPtT *coinPtTEnd, SkOpPtT *oppPtTStart, SkOpPtT *oppPtTEnd)
SkOpGlobalState * globalState()
const SkOpSpanBase * span() const
SkOpPtT * oppPrev(const SkOpPtT *opp) const
void addOpp(SkOpPtT *opp, SkOpPtT *oppPrev)
bool contains(const SkOpPtT *) const
void debugValidate() const
bool mergeMatches(SkOpSpanBase *opp)
SIN Vec< N, float > floor(const Vec< N, float > &x)
const SkDConic & set(const SkPoint pts[kPointCount], SkScalar weight SkDEBUGPARAMS(SkOpGlobalState *state=nullptr))
const SkDCubic & set(const SkPoint pts[kPointCount] SkDEBUGPARAMS(SkOpGlobalState *state=nullptr))
const SkDQuad & set(const SkPoint pts[kPointCount] SkDEBUGPARAMS(SkOpGlobalState *state=nullptr))
static bool Intersects(const SkPathOpsBounds &a, const SkPathOpsBounds &b)