Lines Matching defs:ab
345 // ab is the vector from a to the second control point.
351 const SkVector& ab,
357 SkScalar apXab = ap.cross(ab);
394 SkVector ab = p[1] - p[0];
397 if (ab.isZero()) {
405 ab = p[2] - p[0];
411 // When the ab and cd tangents are nearly parallel with vector from d to a the constraint that
423 // cross(ab, da)^2/length(da)^2 == sqd distance from b to line from d to a.
425 SkScalar detABSqd = ab.cross(da);
431 SkPoint b = p[0] + ab;
435 // Insert two quadratics to cover the case when ab points away from d and/or dc
437 if (SkVector::DotProduct(da, dc) < 0 || SkVector::DotProduct(ab,da) > 0) {
459 ab.scale(kLengthScale);
462 // e0 and e1 are extrapolations along vectors ab and dc.
464 c0 += ab;
477 !is_point_within_cubic_tangents(p[0], ab, dc, p[3], dir, cAvg)) {
479 ab.setOrthog(ab);
480 SkScalar z0 = -ab.dot(p[0]);
483 cAvg.fX = SkScalarMul(ab.fY, z1) - SkScalarMul(z0, dc.fY);
484 cAvg.fY = SkScalarMul(z0, dc.fX) - SkScalarMul(ab.fX, z1);
485 SkScalar z = SkScalarMul(ab.fX, dc.fY) - SkScalarMul(ab.fY, dc.fX);