Lines Matching refs:cur
137 for (int cur = 0; cur < fBisectors.count(); prev = cur, ++cur) {
138 fBisectors[cur] = fNorms[cur] + fNorms[prev];
139 if (!fBisectors[cur].normalize()) {
141 fBisectors[cur].setOrthog(fNorms[cur], (SkPoint::Side)-fSide);
144 fBisectors[cur] += other;
145 SkAssertResult(fBisectors[cur].normalize());
147 fBisectors[cur].negate(); // make the bisector face in
150 SkASSERT(SkScalarNearlyEqual(1.0f, fBisectors[cur].length()));
369 for (int cur = 0; cur < fNorms.count(); ++cur) {
370 fNorms[cur].setOrthog(fNorms[cur], fSide);
371 SkASSERT(SkScalarNearlyEqual(1.0f, fNorms[cur].length()));
385 for (int cur = 0; cur < fNorms.count(); ++cur) {
386 fNorms[cur].setOrthog(fNorms[cur], fSide);
387 SkASSERT(SkScalarNearlyEqual(1.0f, fNorms[cur].length()));
427 for (int cur = ring.numPts() - 2; cur >= 0; --cur) {
428 this->addTri(startIdx, ring.index(cur), ring.index(cur + 1));
445 for (int cur = 0; cur < numPts; ++cur) {
446 int originalIdx = previousRing.index(cur);
459 SkPoint normal2 = previousRing.norm(cur);
488 SkPoint miter = previousRing.bisector(cur);
508 SkPoint miter = previousRing.bisector(cur);
544 if (0 == cur) {
558 prev = cur;
600 for (int cur = 0; cur < lastRing.numPts(); ++cur) {
601 int next = (cur + 1) % lastRing.numPts();
602 SkScalar t = intersect(this->point(lastRing.index(cur)), lastRing.bisector(cur),
604 SkScalar dist = -t * lastRing.norm(cur).dot(lastRing.bisector(cur));
609 minEdgeIdx = cur;
646 for (int cur = 1; cur < lastRing.numPts()-1; ++cur) {
647 if (!this->computePtAlongBisector(lastRing.index(cur),
648 lastRing.bisector(cur),
649 lastRing.origEdgeID(cur),
655 dst[cur] = fCandidateVerts.addNewPt(newPt,
656 lastRing.index(cur), lastRing.origEdgeID(cur),
657 !this->movable(lastRing.index(cur)));
659 dst[cur] = fCandidateVerts.fuseWithPrior(lastRing.origEdgeID(cur));
664 int cur = lastRing.numPts()-1;
665 if (!this->computePtAlongBisector(lastRing.index(cur),
666 lastRing.bisector(cur),
667 lastRing.origEdgeID(cur),
676 dst[cur] = fCandidateVerts.addNewPt(newPt,
677 lastRing.index(cur), lastRing.origEdgeID(cur),
678 !this->movable(lastRing.index(cur)));
680 dst[cur] = fCandidateVerts.fuseWithPrior(lastRing.origEdgeID(cur));
682 dst[cur] = fCandidateVerts.fuseWithNext();
687 dst[cur] = fCandidateVerts.fuseWithPrior(lastRing.origEdgeID(cur));
690 dst[cur] = fused;
691 const int targetIdx = dst[cur - 1];
692 for (int i = cur - 1; i >= 0 && dst[i] == targetIdx; i--) {
763 for (int cur = 0; cur < fPts.count(); ++cur) {
764 int next = (cur + 1) % fPts.count();
766 fPts[cur].fNorm = tess.point(fPts[next].fIndex) - tess.point(fPts[cur].fIndex);
767 SkPoint::Normalize(&fPts[cur].fNorm);
768 fPts[cur].fNorm.setOrthog(fPts[cur].fNorm, tess.side());
774 for (int cur = 0; cur < fPts.count(); prev = cur, ++cur) {
775 fPts[cur].fBisector = fPts[cur].fNorm + fPts[prev].fNorm;
776 if (!fPts[cur].fBisector.normalize()) {
778 fPts[cur].fBisector.setOrthog(fPts[cur].fNorm, (SkPoint::Side)-tess.side());
781 fPts[cur].fBisector += other;
782 SkAssertResult(fPts[cur].fBisector.normalize());
784 fPts[cur].fBisector.negate(); // make the bisector face in
798 SkPoint cur = tess.point(fPts[1].fIndex) - tess.point(fPts[0].fIndex);
799 SkScalar minDot = prev.fX * cur.fY - prev.fY * cur.fX;
802 prev = cur;
806 cur = tess.point(fPts[next].fIndex) - tess.point(fPts[i].fIndex);
807 SkScalar dot = prev.fX * cur.fY - prev.fY * cur.fX;
812 prev = cur;
963 for (int cur = 0; cur < fPts.count(); ++cur) {
964 int next = (cur + 1) % fPts.count();
967 tess.point(fPts[cur].fIndex),
971 SkPoint mid = tess.point(fPts[cur].fIndex) + tess.point(fPts[next].fIndex);
975 draw_arrow(canvas, mid, fPts[cur].fNorm, kArrowLength, SK_ColorRED);
976 mid.fX += (kArrowLength/2) * fPts[cur].fNorm.fX;
977 mid.fY += (kArrowLength/2) * fPts[cur].fNorm.fY;
981 num.printf("%d", this->origEdgeID(cur));
985 draw_arrow(canvas, tess.point(fPts[cur].fIndex), fPts[cur].fBisector,