1292 {
1296 ReductionType reductionType = CheckCubicLinear(
cubic, reduction, &tangentPt);
1297 if (kPoint_ReductionType == reductionType) {
1298
1299
1300
1302 return;
1303 }
1304 if (kLine_ReductionType == reductionType) {
1306 return;
1307 }
1308 if (kDegenerate_ReductionType <= reductionType && kDegenerate3_ReductionType >= reductionType) {
1309 this->
lineTo(reduction[0]);
1312 if (kDegenerate2_ReductionType <= reductionType) {
1313 this->
lineTo(reduction[1]);
1314 }
1315 if (kDegenerate3_ReductionType == reductionType) {
1316 this->
lineTo(reduction[2]);
1317 }
1319 fJoiner = saveJoiner;
1320 return;
1321 }
1322 SkASSERT(kQuad_ReductionType == reductionType);
1323 SkVector normalAB, unitAB, normalCD, unitCD;
1324 if (!this->preJoinTo(*tangentPt, &normalAB, &unitAB, false)) {
1326 return;
1327 }
1331 for (
int index = 0; index <=
count; ++index) {
1334 this->init(kOuter_StrokeType, &quadPts, lastT, nextT);
1335 (void) this->cubicStroke(
cubic, &quadPts);
1336 this->init(kInner_StrokeType, &quadPts, lastT, nextT);
1337 (void) this->cubicStroke(
cubic, &quadPts);
1338 lastT = nextT;
1339 }
1341 if (cusp > 0) {
1345 }
1346
1347
1348 this->setCubicEndNormal(
cubic, normalAB, unitAB, &normalCD, &unitCD);
1349
1350 this->postJoinTo(pt3, normalCD, unitCD);
1351}
void SkEvalCubicAt(const SkPoint src[4], SkScalar t, SkPoint *loc, SkVector *tangent, SkVector *curvature)
SkScalar SkFindCubicCusp(const SkPoint src[4])
int SkFindCubicInflections(const SkPoint src[4], SkScalar tValues[2])
SkPath & addCircle(SkScalar x, SkScalar y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)