RectangleF.FromPoints

RectangleF.FromPoints method

Creates a new Rectangle from two points specified. Two verticles of the created Rectangle will be equal to the passed point1 and point2. These would be typically the opposite vertices.

public static RectangleF FromPoints(PointF point1, PointF point2)
ParameterTypeDescription
point1PointFThe first Point for the new rectangle.
point2PointFThe second Point for the new rectangle.

Return Value

A newly created Rectangle.

See Also