Grasshopper API
GH_GraphicsUtilBoxClosestPoint Method (Point, Rectangle) |
Find the closest point on or in a box given a test point.
Namespace: Grasshopper.GUI
Assembly: Grasshopper (in Grasshopper.dll)

public static Point BoxClosestPoint( Point pt, Rectangle box )
Public Shared Function BoxClosestPoint ( pt As Point, box As Rectangle ) As Point
Parameters
- pt
- Type: System.DrawingPoint
Sample point. - box
- Type: System.DrawingRectangle
Box to evaluate.
Return Value
Type: Point