Lines Matching defs:point
65 const SkPoint& point) {
69 pixel.addRect(SkRect::MakeXYWH(point.fX - 0.5f, point.fY - 0.5f, 1.f, 1.f));
85 // Scale by 1/2, then take abs value (this area formula is signed based on point winding, but
96 edgeD[i] = -signed_distance(point, e0, e1);
119 const SkPoint& point) {
142 SkScalar d = (flip ? 1 : -1) * signed_distance(point, lines[i * 2], lines[i * 2 + 1]);
156 static bool inside_triangle(const SkPoint& point, const SkPoint& t0, const SkPoint& t1,
158 // Check sign of t0 to (t1,t2). If it is positive, that means the normals point into the
159 // triangle otherwise the normals point outside the triangle so update edge distances as
163 SkScalar d0 = (flip ? -1 : 1) * signed_distance(point, t0, t1);
164 SkScalar d1 = (flip ? -1 : 1) * signed_distance(point, t1, t2);
165 SkScalar d2 = (flip ? -1 : 1) * signed_distance(point, t2, t0);
196 const SkRect& geomDomain, const SkPoint& point) {
216 if (inside_triangle(point, t0, t1, t2, bary)) {
225 SkScalar l = SkTPin(point.fX - geomDomain.fLeft, 0.f, 1.f);
226 SkScalar t = SkTPin(point.fY - geomDomain.fTop, 0.f, 1.f);
227 SkScalar r = SkTPin(geomDomain.fRight - point.fX, 0.f, 1.f);
228 SkScalar b = SkTPin(geomDomain.fBottom - point.fY, 0.f, 1.f);
480 void drag(SkPoint* point) {
482 *point += SkPoint::Make(delta.x() / kViewScale, delta.y() / kViewScale);
483 point->fX = std::min(fOuterRect.fRight, std::max(point->fX, fOuterRect.fLeft));
484 point->fY = std::min(fOuterRect.fBottom, std::max(point->fY, fOuterRect.fTop));