Lines Matching refs:SkPoint
11 #include "include/core/SkPoint.h"
22 static bool AreFinite(const SkPoint array[], int count) {
26 static const SkScalar* AsScalars(const SkPoint& pt) { return &pt.fX; }
32 static SkScalar DistanceToLineBetweenSqd(const SkPoint& pt, const SkPoint& a,
33 const SkPoint& b, Side* side = nullptr);
35 static SkScalar DistanceToLineBetween(const SkPoint& pt, const SkPoint& a,
36 const SkPoint& b, Side* side = nullptr) {
40 static SkScalar DistanceToLineSegmentBetweenSqd(const SkPoint& pt, const SkPoint& a,
41 const SkPoint& b);
43 static SkScalar DistanceToLineSegmentBetween(const SkPoint& pt, const SkPoint& a,
44 const SkPoint& b) {
48 static SkScalar DistanceToSqd(const SkPoint& pt, const SkPoint& a) {
54 static bool EqualsWithinTolerance(const SkPoint& p1, const SkPoint& p2) {
58 static bool EqualsWithinTolerance(const SkPoint& pt, const SkPoint& p, SkScalar tol) {
63 static SkScalar LengthSqd(const SkPoint& pt) {
64 return SkPoint::DotProduct(pt, pt);
72 static void RotateCCW(const SkPoint& src, SkPoint* dst) {
79 static void RotateCCW(SkPoint* pt) {
83 static void RotateCW(const SkPoint& src, SkPoint* dst) {
90 static void RotateCW(SkPoint* pt) {
94 static bool SetLengthFast(SkPoint* pt, float length);
96 static SkPoint MakeOrthog(const SkPoint& vec, Side side = kLeft_Side) {
98 return (side == kRight_Side) ? SkPoint{-vec.fY, vec.fX} : SkPoint{vec.fY, -vec.fX};
102 static void SetRectFan(SkPoint v[], SkScalar l, SkScalar t, SkScalar r, SkScalar b,
104 SkASSERT(stride >= sizeof(SkPoint));
106 ((SkPoint*)((intptr_t)v + 0 * stride))->set(l, t);
107 ((SkPoint*)((intptr_t)v + 1 * stride))->set(l, b);
108 ((SkPoint*)((intptr_t)v + 2 * stride))->set(r, b);
109 ((SkPoint*)((intptr_t)v + 3 * stride))->set(r, t);
113 static void SetRectTriStrip(SkPoint v[], SkScalar l, SkScalar t, SkScalar r, SkScalar b,
115 SkASSERT(stride >= sizeof(SkPoint));
117 ((SkPoint*)((intptr_t)v + 0 * stride))->set(l, t);
118 ((SkPoint*)((intptr_t)v + 1 * stride))->set(l, b);
119 ((SkPoint*)((intptr_t)v + 2 * stride))->set(r, t);
120 ((SkPoint*)((intptr_t)v + 3 * stride))->set(r, b);
122 static void SetRectTriStrip(SkPoint v[], const SkRect& rect, size_t stride) {