RectangleExtensions

Inheritance: java.lang.Object

public final class RectangleExtensions

包含 Rectangle 的扩展方法。

方法

方法描述
toGdiRectangle(Rectangle rectangle)Rectangle 转换为 System.Drawing.Rectangle
toGdiRectangle(RectangleF rectangle)RectangleF 转换为 System.Drawing.Rectangle
unionWith(RectangleF rectangle, RectangleF otherRectangle)合并两个矩形。

toGdiRectangle(Rectangle rectangle)

public static Rectangle toGdiRectangle(Rectangle rectangle)

Rectangle 转换为 System.Drawing.Rectangle

Parameters:

参数类型描述
rectangleRectangle要转换的矩形。

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

toGdiRectangle(RectangleF rectangle)

public static Rectangle2D.Float toGdiRectangle(RectangleF rectangle)

RectangleF 转换为 System.Drawing.Rectangle

Parameters:

参数类型描述
rectangleRectangleF要转换的矩形。

Returns: java.awt.geom.Rectangle2D.Float - 已转换的 System.Drawing.RectangleF

unionWith(RectangleF rectangle, RectangleF otherRectangle)

public static RectangleF unionWith(RectangleF rectangle, RectangleF otherRectangle)

合并两个矩形。

Parameters:

参数类型描述
rectangleRectangleF第一个矩形。
otherRectangleRectangleF第二个矩形。

Returns: RectangleF - New rectangle as union operation result