RectangleExtensions

Inheritance: java.lang.Object

public final class RectangleExtensions

Contains extension methods for Rectangle.

Methods

MethodDescription
toGdiRectangle(Rectangle rectangle)Converts the Rectangle to the System.Drawing.Rectangle.
toGdiRectangle(RectangleF rectangle)Converts the RectangleF to the System.Drawing.Rectangle.
unionWith(RectangleF rectangle, RectangleF otherRectangle)Unions two rectangle.

toGdiRectangle(Rectangle rectangle)

public static Rectangle toGdiRectangle(Rectangle rectangle)

Converts the Rectangle to the System.Drawing.Rectangle.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to convert.

Returns: Rectangle - The converted System.Drawing.Rectangle.

toGdiRectangle(RectangleF rectangle)

public static Rectangle2D.Float toGdiRectangle(RectangleF rectangle)

Converts the RectangleF to the System.Drawing.Rectangle.

Parameters:

ParameterTypeDescription
rectangleRectangleFThe rectangle to convert.

Returns: java.awt.geom.Rectangle2D.Float - The converted System.Drawing.RectangleF.

unionWith(RectangleF rectangle, RectangleF otherRectangle)

public static RectangleF unionWith(RectangleF rectangle, RectangleF otherRectangle)

Unions two rectangle.

Parameters:

ParameterTypeDescription
rectangleRectangleFThe first rectangle.
otherRectangleRectangleFThe second rectangle.

Returns: RectangleF - New rectangle as union operation result