PointRestrict Method (Rectangle) |
Restricts the X and Y co-ordinates within the specified rectangle
Namespace:
Eto.Drawing
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public void Restrict(
Rectangle rectangle
)
Public Sub Restrict (
rectangle As Rectangle
)
member Restrict :
rectangle : Rectangle -> unit
Parameters
- rectangle
- Type: Eto.DrawingRectangle
Rectangle to restrict the X and Y co-ordinates in
Remarks
This will update the X and Y co-ordinates to be within the specified
rectangle's bounds.
The updated co-ordinates will be the closest to the original value as possible.
E.g. if the X co-ordinate is greater than the
Right of the rectangle, it will be set
to be
Right minus one, to be within the rectangle's bounds.
See Also