Lines Matching defs:rh

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