Lines Matching refs:rh
63 SkOpAngle* rh = lh->fNext; in after() local
64 SkASSERT(lh != rh); in after()
68 rh->fPart.fCurve = rh->fOriginalCurvePart; in after()
69 rh->fPart.fCurve.offset(rh->segment()->verb(), fPart.fCurve[0] - rh->fPart.fCurve[0]); in after()
79 rh->segment()->debugID(), rh->debugID(), rh->fSectorStart, rh->fSectorEnd, in after()
80 rh->fStart->t(), rh->fEnd->t()); in after()
81 SkString bugPart[3] = { lh->debugPart(), this->debugPart(), rh->debugPart() }; in after()
89 if (rh->fComputeSector && !rh->computeSector()) { in after()
99 rh->segment()->debugID(), rh->debugID(), rh->fSectorStart, rh->fSectorEnd, in after()
100 rh->fStart->t(), rh->fEnd->t()); in after()
102 bool ltrOverlap = (lh->fSectorMask | rh->fSectorMask) & fSectorMask; in after()
103 bool lrOverlap = lh->fSectorMask & rh->fSectorMask; in after()
107 return COMPARE_RESULT(4, (lh->fSectorEnd > rh->fSectorStart) in after()
108 ^ (fSectorStart > lh->fSectorEnd) ^ (fSectorStart > rh->fSectorStart)); in after()
110 int lrGap = (rh->fSectorStart - lh->fSectorStart + 32) & 0x1f; in after()
123 lrOrder = lh->orderable(rh); in after()
129 SkASSERT((lh->fSectorMask & fSectorMask) || (rh->fSectorMask & fSectorMask) || -1 == lrOrder); in after()
137 if (rh->fSectorMask & fSectorMask) { in after()
138 trOrder = this->orderable(rh); in after()
140 int trGap = (rh->fSectorStart - fSectorStart + 32) & 0x1f; in after()
144 this->alignmentSameSide(rh, &trOrder); in after()
155 SkDEBUGCODE(bool lrOpposite = lh->oppositePlanes(rh)); in after()
161 bool trOpposite = oppositePlanes(rh); in after()
166 bool lrOpposite = lh->oppositePlanes(rh); in after()
172 if (fUnorderable || lh->fUnorderable || rh->fUnorderable) { in after()
174 if (!fPart.isCurve() && !lh->fPart.isCurve() && !rh->fPart.isCurve()) { in after()
178 int lrShare = lh->fOriginalCurvePart[0] == rh->fOriginalCurvePart[0]; in after()
179 int trShare = fOriginalCurvePart[0] == rh->fOriginalCurvePart[0]; in after()
184 int rtOOrder = rh->linesOnOriginalSide(this); in after()
190 int rlOOrder = rh->linesOnOriginalSide(lh); in after()
196 int trOOrder = rh->linesOnOriginalSide(this); in after()
197 int lrOOrder = lh->linesOnOriginalSide(rh); in after()
335 bool SkOpAngle::checkParallel(SkOpAngle* rh) { in checkParallel() argument
344 if (rh->fPart.isOrdered()) { in checkParallel()
345 tweep = rh->fPart.fSweep; in checkParallel()
347 scratch[1] = rh->fPart.fCurve[1] - rh->fPart.fCurve[0]; in checkParallel()
351 if (tangentsDiverge(rh, s0xt0)) { in checkParallel()
357 if (!fEnd->contains(rh->fEnd)) { in checkParallel()
358 if (this->endToSide(rh, &inside)) { in checkParallel()
361 if (rh->endToSide(this, &inside)) { in checkParallel()
365 if (this->midToSide(rh, &inside)) { in checkParallel()
368 if (rh->midToSide(this, &inside)) { in checkParallel()
373 SkDVector m1 = rh->segment()->dPtAtT(rh->midT()) - rh->fPart.fCurve[0]; in checkParallel()
377 rh->fUnorderable = true; in checkParallel()
436 int SkOpAngle::convexHullOverlaps(const SkOpAngle* rh) { in convexHullOverlaps() argument
438 const SkDVector* tweep = rh->fPart.fSweep; in convexHullOverlaps()
469 SkDVector m1 = rh->segment()->dPtAtT(rh->midT()) - rh->fPart.fCurve[0]; in convexHullOverlaps()
477 if (tangentsDiverge(rh, s0xt0)) { in convexHullOverlaps()
503 bool SkOpAngle::endsIntersect(SkOpAngle* rh) { in endsIntersect() argument
505 SkPath::Verb rVerb = rh->segment()->verb(); in endsIntersect()
508 SkDLine rays[] = {{{this->fPart.fCurve[0], rh->fPart.fCurve[rPts]}}, in endsIntersect()
510 if (this->fEnd->contains(rh->fEnd)) { in endsIntersect()
511 return checkParallel(rh); in endsIntersect()
521 const SkOpSegment& segment = index ? *rh->segment() : *this->segment(); in endsIntersect()
524 double tStart = index ? rh->fStart->t() : this->fStart->t(); in endsIntersect()
525 double tEnd = index ? rh->fComputedEnd->t() : this->fComputedEnd->t(); in endsIntersect()
526 bool testAscends = tStart < (index ? rh->fComputedEnd->t() : this->fComputedEnd->t()); in endsIntersect()
549 const SkOpSegment& segment = index ? *rh->segment() : *this->segment(); in endsIntersect()
580 const SkDCurve& curve = index ? rh->fPart.fCurve : this->fPart.fCurve; in endsIntersect()
602 && rh->fPart.isCurve() && fOriginalCurvePart[0] != fPart.fCurve.fLine[0]) { in endsIntersect()
604 const SkDPoint& origin = rh->fOriginalCurvePart[0]; in endsIntersect()
605 int count = SkPathOpsVerbToPoints(rh->segment()->verb()); in endsIntersect()
606 const SkDVector line = rh->fOriginalCurvePart[count] - origin; in endsIntersect()
607 int originalSide = rh->lineOnOneSide(origin, line, this, true); in endsIntersect()
609 int translatedSide = rh->lineOnOneSide(origin, line, this, false); in endsIntersect()
623 const SkDCurve& curve = sIndex ? rh->fPart.fCurve : this->fPart.fCurve; in endsIntersect()
624 const SkOpSegment& segment = sIndex ? *rh->segment() : *this->segment(); in endsIntersect()
625 double tStart = sIndex ? rh->fStart->t() : fStart->t(); in endsIntersect()
629 return checkParallel(rh); in endsIntersect()
633 return checkParallel(rh); in endsIntersect()
637 bool SkOpAngle::endToSide(const SkOpAngle* rh, bool* inside) const { in endToSide() argument
648 const SkOpSegment* oppSegment = rh->segment(); in endToSide()
652 int closestEnd = iEnd.closestTo(rh->fStart->t(), rh->fEnd->t(), rayEnd[0], &endDist); in endToSide()
665 const SkDCurve& curve = rh->fPart.fCurve; in endToSide()
858 bool SkOpAngle::midToSide(const SkOpAngle* rh, bool* inside) const { in midToSide() argument
876 const SkOpSegment* oppSegment = rh->segment(); in midToSide()
880 int oppOutside = oppMid.mostOutside(rh->fStart->t(), rh->fEnd->t(), dStartPt); in midToSide()
894 bool SkOpAngle::oppositePlanes(const SkOpAngle* rh) const { in oppositePlanes()
895 int startSpan = SkTAbs(rh->fSectorStart - fSectorStart); in oppositePlanes()
899 int SkOpAngle::orderable(SkOpAngle* rh) { in orderable() argument
902 if (!rh->fPart.isCurve()) { in orderable()
905 double rightX = rh->fTangentHalf.dx(); in orderable()
906 double rightY = rh->fTangentHalf.dy(); in orderable()
918 if ((result = this->lineOnOneSide(rh, false)) >= 0) { in orderable()
921 if (fUnorderable || approximately_zero(rh->fSide)) { in orderable()
924 } else if (!rh->fPart.isCurve()) { in orderable()
925 if ((result = rh->lineOnOneSide(this, false)) >= 0) { in orderable()
928 if (rh->fUnorderable || approximately_zero(fSide)) { in orderable()
931 } else if ((result = this->convexHullOverlaps(rh)) >= 0) { in orderable()
934 return this->endsIntersect(rh) ? 1 : 0; in orderable()
937 rh->fUnorderable = true; in orderable()
1114 bool SkOpAngle::tangentsDiverge(const SkOpAngle* rh, double s0xt0) { in tangentsDiverge() argument
1128 const SkDVector* tweep = rh->fPart.fSweep; in tangentsDiverge()
1138 double mFactor = fabs(useS ? this->distEndRatio(sDist) : rh->distEndRatio(tDist)); in tangentsDiverge()