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()
538 static bool cubic_in_line(const SkPoint cubic[4]) { in cubic_in_line()
544 SkVector testDiff = cubic[inner] - cubic[index]; in cubic_in_line()
564 return pt_to_line(cubic[mid1], cubic[outer1], cubic[outer2]) <= lineSlop in cubic_in_line()
565 && pt_to_line(cubic[mid2], cubic[outer1], cubic[outer2]) <= lineSlop; in cubic_in_line()
603 SkPathStroker::ReductionType SkPathStroker::CheckCubicLinear(const SkPoint cubic[4], in CheckCubicLinear()
605 bool degenerateAB = degenerate_vector(cubic[1] - cubic[0]); in CheckCubicLinear()
606 bool degenerateBC = degenerate_vector(cubic[2] - cubic[1]); in CheckCubicLinear()
607 bool degenerateCD = degenerate_vector(cubic[3] - cubic[2]); in CheckCubicLinear()
614 if (!cubic_in_line(cubic)) { in CheckCubicLinear()
615 *tangentPtPtr = degenerateAB ? &cubic[2] : &cubic[1]; in CheckCubicLinear()
619 int count = SkFindCubicMaxCurvature(cubic, tValues); in CheckCubicLinear()
627 SkEvalCubicAt(cubic, t, &reduction[rCount], nullptr, nullptr); in CheckCubicLinear()
628 if (reduction[rCount] != cubic[0] && reduction[rCount] != cubic[3]) { in CheckCubicLinear()
814 void SkPathStroker::cubicPerpRay(const SkPoint cubic[4], SkScalar t, SkPoint* tPt, SkPoint* onPt, in cubicPerpRay()
818 SkEvalCubicAt(cubic, t, tPt, &dxy, nullptr); in cubicPerpRay()
820 const SkPoint* cPts = cubic; in cubicPerpRay()
822 dxy = cubic[2] - cubic[0]; in cubicPerpRay()
824 dxy = cubic[3] - cubic[1]; in cubicPerpRay()
828 SkChopCubicAt(cubic, chopped, t); in cubicPerpRay()
843 void SkPathStroker::cubicQuadEnds(const SkPoint cubic[4], SkQuadConstruct* quadPts) { in cubicQuadEnds()
846 this->cubicPerpRay(cubic, quadPts->fStartT, &cubicStartPt, &quadPts->fQuad[0], in cubicQuadEnds()
852 this->cubicPerpRay(cubic, quadPts->fEndT, &cubicEndPt, &quadPts->fQuad[2], in cubicQuadEnds()
858 void SkPathStroker::cubicQuadMid(const SkPoint cubic[4], const SkQuadConstruct* quadPts, in cubicQuadMid()
861 this->cubicPerpRay(cubic, quadPts->fMidT, &cubicMidPt, mid, nullptr); in cubicQuadMid()
933 SkPathStroker::ResultType SkPathStroker::tangentsMeet(const SkPoint cubic[4], in tangentsMeet()
935 this->cubicQuadEnds(cubic, quadPts); in tangentsMeet()
1045 SkPathStroker::ResultType SkPathStroker::compareQuadCubic(const SkPoint cubic[4], in compareQuadCubic()
1048 this->cubicQuadEnds(cubic, quadPts); in compareQuadCubic()
1056 this->cubicPerpRay(cubic, quadPts->fMidT, &ray[1], &ray[0], nullptr); in compareQuadCubic()
1110 bool SkPathStroker::cubicMidOnLine(const SkPoint cubic[4], const SkQuadConstruct* quadPts) const { in cubicMidOnLine()
1112 this->cubicQuadMid(cubic, quadPts, &strokeMid); in cubicMidOnLine()
1117 bool SkPathStroker::cubicStroke(const SkPoint cubic[4], SkQuadConstruct* quadPts) { in cubicStroke()
1119 ResultType resultType = this->tangentsMeet(cubic, quadPts); in cubicStroke()
1123 fInvResScale)) && cubicMidOnLine(cubic, quadPts)) { in cubicStroke()
1132 ResultType resultType = this->compareQuadCubic(cubic, quadPts); in cubicStroke()
1162 if (!this->cubicStroke(cubic, &half)) { in cubicStroke()
1170 if (!this->cubicStroke(cubic, &half)) { in cubicStroke()
1243 const SkPoint cubic[4] = { fPrevPt, pt1, pt2, pt3 }; in cubicTo() local
1246 ReductionType reductionType = CheckCubicLinear(cubic, reduction, &tangentPt); in cubicTo()
1279 int count = SkFindCubicInflections(cubic, tValues); in cubicTo()
1285 (void) this->cubicStroke(cubic, &quadPts); in cubicTo()
1287 (void) this->cubicStroke(cubic, &quadPts); in cubicTo()
1290 SkScalar cusp = SkFindCubicCusp(cubic); in cubicTo()
1293 SkEvalCubicAt(cubic, cusp, &cuspLoc, nullptr, nullptr); in cubicTo()
1298 this->setCubicEndNormal(cubic, normalAB, unitAB, &normalCD, &unitCD); in cubicTo()