Lines Matching refs:point
40 // Computes the distance from a point outside a rect to the nearest edge of the rect.
41 static IntSize distanceToRect(const IntPoint& point, const IntRect& rect)
44 if (point.x() < rect.x())
45 dx = point.x() - rect.x();
46 else if (rect.maxX() < point.x())
47 dx = point.x() - rect.maxX();
48 if (point.y() < rect.y())
49 dy = point.y() - rect.y();
50 else if (rect.maxY() < point.y())
51 dy = point.y() - rect.maxY();