Table of Contents

Method GetNormalizedRectangle

Namespace
Bonsai.Design.Visualizers
Assembly
Bonsai.Design.Visualizers.dll

GetNormalizedRectangle(RectangleF, Point, Point)

Computes a rectangle defined by the specified points which is also contained inside the pane boundaries.

protected static Rectangle GetNormalizedRectangle(RectangleF bounds, Point p1, Point p2)

Parameters

bounds RectangleF

The bounds of the pane on which to contain the rectangle.

p1 Point

The first point defining the selected rectangle.

p2 Point

The second point defining the selected rectangle.

Returns

Rectangle

A Rectangle which is contained inside the pane boundaries and is defined by the specified points.