Lines Matching defs:rh

60 // return true if lh < this < rh
63 const SkOpAngle& rh = *lh.fNext;
64 SkASSERT(&lh != &rh);
74 rh.fSegment->debugID(), rh.debugID(), rh.fSectorStart, rh.fSectorEnd,
75 rh.fSegment->t(rh.fStart), rh.fSegment->t(rh.fEnd));
83 if (rh.fComputeSector && !const_cast<SkOpAngle&>(rh).computeSector()) {
94 rh.fSegment->debugID(), rh.debugID(), rh.fSectorStart, rh.fSectorEnd,
95 rh.fSegment->t(rh.fStart), rh.fSegment->t(rh.fEnd));
97 bool ltrOverlap = (lh.fSectorMask | rh.fSectorMask) & fSectorMask;
98 bool lrOverlap = lh.fSectorMask & rh.fSectorMask;
100 if (!lrOverlap) { // no lh/rh sector overlap
101 if (!ltrOverlap) { // no lh/this/rh sector overlap
102 return COMPARE_RESULT(4, (lh.fSectorEnd > rh.fSectorStart)
103 ^ (fSectorStart > lh.fSectorEnd) ^ (fSectorStart > rh.fSectorStart));
105 int lrGap = (rh.fSectorStart - lh.fSectorStart + 32) & 0x1f;
118 lrOrder = (int) lh.orderable(rh);
124 SkASSERT((lh.fSectorMask & fSectorMask) || (rh.fSectorMask & fSectorMask));
132 if (rh.fSectorMask & fSectorMask) {
133 trOrder = (int) orderable(rh);
135 int trGap = (rh.fSectorStart - fSectorStart + 32) & 0x1f;
148 SkDEBUGCODE(bool lrOpposite = lh.oppositePlanes(rh));
155 bool trOpposite = oppositePlanes(rh);
160 SkDEBUGCODE(bool trOpposite = oppositePlanes(rh));
161 bool lrOpposite = lh.oppositePlanes(rh);
254 bool SkOpAngle::checkParallel(const SkOpAngle& rh) const {
263 if (!rh.fUnorderedSweep) {
264 tweep = rh.fSweep;
266 scratch[1] = rh.fCurvePart[1] - rh.fCurvePart[0];
270 if (tangentsDiverge(rh, s0xt0)) {
274 SkDVector m1 = rh.fSegment->dPtAtT(rh.midT()) - rh.fCurvePart[0];
278 rh.fUnorderable = true;
330 int SkOpAngle::convexHullOverlaps(const SkOpAngle& rh) const {
332 const SkDVector* tweep = rh.fSweep;
363 SkDVector m1 = rh.fSegment->dPtAtT(rh.midT()) - rh.fCurvePart[0];
371 if (tangentsDiverge(rh, s0xt0)) {
397 bool SkOpAngle::endsIntersect(const SkOpAngle& rh) const {
399 SkPath::Verb rVerb = rh.fSegment->verb();
402 SkDLine rays[] = {{{fCurvePart[0], rh.fCurvePart[rPts]}},
405 return checkParallel(rh);
410 const SkOpSegment& segment = index ? *rh.fSegment : *fSegment;
417 double tStart = segment.t(index ? rh.fStart : fStart);
418 double tEnd = segment.t(index ? rh.fComputedEnd : fComputedEnd);
419 bool testAscends = index ? rh.fStart < rh.fComputedEnd : fStart < fComputedEnd;
440 endPt.set(rh.fSegment->pts()[rh.fStart < rh.fEnd ? rPts : 0]);
465 const SkOpSegment& segment = index ? *rh.fSegment : *fSegment;
496 const SkDCubic& curve = index ? rh.fCurvePart : fCurvePart;
514 const SkDCubic& curve = sIndex ? rh.fCurvePart : fCurvePart;
515 const SkOpSegment& segment = sIndex ? *rh.fSegment : *fSegment;
516 double tStart = segment.t(sIndex ? rh.fStart : fStart);
520 return checkParallel(rh);
524 return checkParallel(rh);
800 bool SkOpAngle::oppositePlanes(const SkOpAngle& rh) const {
801 int startSpan = abs(rh.fSectorStart - fSectorStart);
805 bool SkOpAngle::orderable(const SkOpAngle& rh) const {
808 if (!rh.fIsCurve) {
811 double rightX = rh.fTangentHalf.dx();
812 double rightY = rh.fTangentHalf.dy();
824 if ((result = allOnOneSide(rh)) >= 0) {
827 if (fUnorderable || approximately_zero(rh.fSide)) {
830 } else if (!rh.fIsCurve) {
831 if ((result = rh.allOnOneSide(*this)) >= 0) {
834 if (rh.fUnorderable || approximately_zero(fSide)) {
838 if ((result = convexHullOverlaps(rh)) >= 0) {
841 return endsIntersect(rh);
844 rh.fUnorderable = true;
1074 bool SkOpAngle::tangentsDiverge(const SkOpAngle& rh, double s0xt0) const {
1088 const SkDVector* tweep = rh.fSweep;
1098 double mFactor = fabs(useS ? distEndRatio(sDist) : rh.distEndRatio(tDist));