RectangleFRestrict Method (Rectangle, Rectangle) |
Restricts the rectangle to be within the restrict rectangle
Namespace:
Eto.Drawing
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public static Rectangle Restrict(
Rectangle rectangle,
Rectangle restrict
)
Public Shared Function Restrict (
rectangle As Rectangle,
restrict As Rectangle
) As Rectangle
static member Restrict :
rectangle : Rectangle *
restrict : Rectangle -> Rectangle
Parameters
- rectangle
- Type: Eto.DrawingRectangle
Rectangle to restrict - restrict
- Type: Eto.DrawingRectangle
Rectangle to restrict to
Return Value
Type:
RectangleA new rectangle restricted to the restrict bounds
Remarks
This ensures that rectangle's bounds fall within the bounds of the specified restrict rectangle
It is useful to ensure that the rectangle does not exceed certain limits (e.g. for drawing)
See Also