19 path->lineTo(stop.
fX, stop.
fY);
27 SkPoint projectedCenter = pivot + parallel;
39 path->setLastPt(pivot.
fX + normal.fX + parallel.
fX, pivot.
fY + normal.fY + parallel.
fY);
40 path->lineTo(pivot.
fX - normal.fX + parallel.
fX, pivot.
fY - normal.fY + parallel.
fY);
42 path->lineTo(pivot.
fX + normal.fX + parallel.
fX, pivot.
fY + normal.fY + parallel.
fY);
43 path->lineTo(pivot.
fX - normal.fX + parallel.
fX, pivot.
fY - normal.fY + parallel.
fY);
44 path->lineTo(stop.
fX, stop.
fY);
51 return before.
fX * after.
fY > before.
fY * after.
fX;
90 afterUnitNormal.
scale(radius, &after);
124 matrix.setScale(radius, radius);
125 matrix.postTranslate(pivot.
fX, pivot.
fY);
129 for (
int i = 0; i <
count; ++i) {
137#define kOneOverSqrt2 (0.707106781f)
142 bool prevIsLine,
bool currIsLine) {
175 mid = (before + after) * radius;
188 if (sinHalfAngle < invMiterLimit) {
195 mid.
set(after.
fY - before.
fY, before.
fX - after.
fX);
200 mid.
set(before.
fX + after.
fX, before.
fY + after.
fY);
227 return gCappers[cap];
236 return gJoiners[join];
@ kCW_SkRotationDirection
@ kCCW_SkRotationDirection
void swap(sk_sp< T > &a, sk_sp< T > &b)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
#define SK_ScalarRoot2Over2
static void MiterJoiner(SkPath *outer, SkPath *inner, const SkVector &beforeUnitNormal, const SkPoint &pivot, const SkVector &afterUnitNormal, SkScalar radius, SkScalar invMiterLimit, bool prevIsLine, bool currIsLine)
static AngleType Dot2AngleType(SkScalar dot)
static bool is_clockwise(const SkVector &before, const SkVector &after)
static void RoundCapper(SkPath *path, const SkPoint &pivot, const SkVector &normal, const SkPoint &stop, SkPath *)
static void HandleInnerJoin(SkPath *inner, const SkPoint &pivot, const SkVector &after)
static void BluntJoiner(SkPath *outer, SkPath *inner, const SkVector &beforeUnitNormal, const SkPoint &pivot, const SkVector &afterUnitNormal, SkScalar radius, SkScalar invMiterLimit, bool, bool)
static void RoundJoiner(SkPath *outer, SkPath *inner, const SkVector &beforeUnitNormal, const SkPoint &pivot, const SkVector &afterUnitNormal, SkScalar radius, SkScalar invMiterLimit, bool, bool)
static void ButtCapper(SkPath *path, const SkPoint &pivot, const SkVector &normal, const SkPoint &stop, SkPath *)
static void SquareCapper(SkPath *path, const SkPoint &pivot, const SkVector &normal, const SkPoint &stop, SkPath *otherPath)
static constexpr int kCapCount
static constexpr int kJoinCount
void setLastPt(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
SkPath & conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar w)
static void RotateCW(const SkPoint &src, SkPoint *dst)
void(* JoinProc)(SkPath *outer, SkPath *inner, const SkVector &beforeUnitNormal, const SkPoint &pivot, const SkVector &afterUnitNormal, SkScalar radius, SkScalar invMiterLimit, bool prevIsLine, bool currIsLine)
static CapProc CapFactory(SkPaint::Cap)
static JoinProc JoinFactory(SkPaint::Join)
void(* CapProc)(SkPath *path, const SkPoint &pivot, const SkVector &normal, const SkPoint &stop, SkPath *otherPath)
static int BuildUnitArc(const SkVector &start, const SkVector &stop, SkRotationDirection, const SkMatrix *, SkConic conics[kMaxConicsForArc])
bool setLength(float length)
static float DotProduct(const SkVector &a, const SkVector &b)
void set(float x, float y)
void scale(float scale, SkPoint *dst) const