Lines Matching refs:cubic

206     static ReductionType CheckCubicLinear(const SkPoint cubic[4], SkPoint reduction[3],
210 ResultType compareQuadCubic(const SkPoint cubic[4], SkQuadConstruct* );
216 bool cubicMidOnLine(const SkPoint cubic[4], const SkQuadConstruct* ) const;
217 void cubicPerpRay(const SkPoint cubic[4], SkScalar t, SkPoint* tPt, SkPoint* onPt,
219 void cubicQuadEnds(const SkPoint cubic[4], SkQuadConstruct* );
220 void cubicQuadMid(const SkPoint cubic[4], const SkQuadConstruct* , SkPoint* mid) const;
221 bool cubicStroke(const SkPoint cubic[4], SkQuadConstruct* );
231 void setCubicEndNormal(const SkPoint cubic[4],
241 ResultType tangentsMeet(const SkPoint cubic[4], SkQuadConstruct* );
463 void SkPathStroker::setCubicEndNormal(const SkPoint cubic[4], const SkVector& normalAB, in setCubicEndNormal()
465 SkVector ab = cubic[1] - cubic[0]; in setCubicEndNormal()
466 SkVector cd = cubic[3] - cubic[2]; in setCubicEndNormal()
476 ab = cubic[2] - cubic[0]; in setCubicEndNormal()
480 cd = cubic[3] - cubic[1]; in setCubicEndNormal()
539 static bool cubic_in_line(const SkPoint cubic[4]) { in cubic_in_line()
545 SkVector testDiff = cubic[inner] - cubic[index]; in cubic_in_line()
565 return pt_to_line(cubic[mid1], cubic[outer1], cubic[outer2]) <= lineSlop in cubic_in_line()
566 && pt_to_line(cubic[mid2], cubic[outer1], cubic[outer2]) <= lineSlop; in cubic_in_line()
604 SkPathStroker::ReductionType SkPathStroker::CheckCubicLinear(const SkPoint cubic[4], in CheckCubicLinear()
606 bool degenerateAB = degenerate_vector(cubic[1] - cubic[0]); in CheckCubicLinear()
607 bool degenerateBC = degenerate_vector(cubic[2] - cubic[1]); in CheckCubicLinear()
608 bool degenerateCD = degenerate_vector(cubic[3] - cubic[2]); in CheckCubicLinear()
615 if (!cubic_in_line(cubic)) { in CheckCubicLinear()
616 *tangentPtPtr = degenerateAB ? &cubic[2] : &cubic[1]; in CheckCubicLinear()
620 int count = SkFindCubicMaxCurvature(cubic, tValues); in CheckCubicLinear()
628 SkEvalCubicAt(cubic, t, &reduction[rCount], nullptr, nullptr); in CheckCubicLinear()
629 if (reduction[rCount] != cubic[0] && reduction[rCount] != cubic[3]) { in CheckCubicLinear()
810 void SkPathStroker::cubicPerpRay(const SkPoint cubic[4], SkScalar t, SkPoint* tPt, SkPoint* onPt, in cubicPerpRay()
814 SkEvalCubicAt(cubic, t, tPt, &dxy, nullptr); in cubicPerpRay()
816 const SkPoint* cPts = cubic; in cubicPerpRay()
818 dxy = cubic[2] - cubic[0]; in cubicPerpRay()
820 dxy = cubic[3] - cubic[1]; in cubicPerpRay()
824 SkChopCubicAt(cubic, chopped, t); in cubicPerpRay()
839 void SkPathStroker::cubicQuadEnds(const SkPoint cubic[4], SkQuadConstruct* quadPts) { in cubicQuadEnds()
842 this->cubicPerpRay(cubic, quadPts->fStartT, &cubicStartPt, &quadPts->fQuad[0], in cubicQuadEnds()
848 this->cubicPerpRay(cubic, quadPts->fEndT, &cubicEndPt, &quadPts->fQuad[2], in cubicQuadEnds()
854 void SkPathStroker::cubicQuadMid(const SkPoint cubic[4], const SkQuadConstruct* quadPts, in cubicQuadMid()
857 this->cubicPerpRay(cubic, quadPts->fMidT, &cubicMidPt, mid, nullptr); in cubicQuadMid()
929 SkPathStroker::ResultType SkPathStroker::tangentsMeet(const SkPoint cubic[4], in tangentsMeet()
931 this->cubicQuadEnds(cubic, quadPts); in tangentsMeet()
1041 SkPathStroker::ResultType SkPathStroker::compareQuadCubic(const SkPoint cubic[4], in compareQuadCubic()
1044 this->cubicQuadEnds(cubic, quadPts); in compareQuadCubic()
1052 this->cubicPerpRay(cubic, quadPts->fMidT, &ray[1], &ray[0], nullptr); in compareQuadCubic()
1106 bool SkPathStroker::cubicMidOnLine(const SkPoint cubic[4], const SkQuadConstruct* quadPts) const { in cubicMidOnLine()
1108 this->cubicQuadMid(cubic, quadPts, &strokeMid); in cubicMidOnLine()
1113 bool SkPathStroker::cubicStroke(const SkPoint cubic[4], SkQuadConstruct* quadPts) { in cubicStroke()
1115 ResultType resultType = this->tangentsMeet(cubic, quadPts); in cubicStroke()
1119 fInvResScale)) && cubicMidOnLine(cubic, quadPts)) { in cubicStroke()
1128 ResultType resultType = this->compareQuadCubic(cubic, quadPts); in cubicStroke()
1158 if (!this->cubicStroke(cubic, &half)) { in cubicStroke()
1166 if (!this->cubicStroke(cubic, &half)) { in cubicStroke()
1239 const SkPoint cubic[4] = { fPrevPt, pt1, pt2, pt3 }; in cubicTo() local
1242 ReductionType reductionType = CheckCubicLinear(cubic, reduction, &tangentPt); in cubicTo()
1275 int count = SkFindCubicInflections(cubic, tValues); in cubicTo()
1281 (void) this->cubicStroke(cubic, &quadPts); in cubicTo()
1283 (void) this->cubicStroke(cubic, &quadPts); in cubicTo()
1286 SkScalar cusp = SkFindCubicCusp(cubic); in cubicTo()
1289 SkEvalCubicAt(cubic, cusp, &cuspLoc, nullptr, nullptr); in cubicTo()
1294 this->setCubicEndNormal(cubic, normalAB, unitAB, &normalCD, &unitCD); in cubicTo()