equals
equals: (Rectangle2D, any) -> booleanWhether other has the same frame, a Rectangle and a Rectangle2D alike (false for anything else); == answers the same.
Rectangle2D.new(…)
JComponent.new():getFontMetrics(…):getStringBounds(…)
scene:tileAt(…):getWallObject():getConvexHull():getBounds2D()| Method | Returns | Description |
|---|---|---|
equals(any) | boolean | Whether other has the same frame, a Rectangle and a Rectangle2D alike (false for anything else); == answers the same. |
new(number, number, number, number) | Rectangle2D | (number, number, number, number) -> Rectangle2D: The rectangle at x, y, w wide and h high (Rectangle2D.Double.new(...) reaches… |
new() | Rectangle2D |
| Field | Type | Description |
|---|---|---|
x | number | The x, Rectangle2D.Double's public field. |
y | number | The y, Rectangle2D.Double's public field. |
width | number | The width, Rectangle2D.Double's public field. |
height | number | The height, Rectangle2D.Double's public field. |
Double | Rectangle2DClass | Rectangle2D.Double: Rectangle2D itself, so Rectangle2D.Double.new(...) is Rectangle2D.new(...). |
Float | Rectangle2DClass | Rectangle2D.Float: Rectangle2D itself, so Rectangle2D.Float.new(...) is Rectangle2D.new(...). |
| Method | Returns | Description |
|---|---|---|
FontMetrics.getStringBounds | Rectangle2D | The logical bounds of str from its baseline origin. Pass the Graphics2D; the metrics already carry its context. |
Rectangle2DClass.new | Rectangle2D | (number, number, number, number) -> Rectangle2D: The rectangle at x, y, w wide and h high (Rectangle2D.Double.new(...) reaches… |
Shape.getBounds2D | Rectangle2D | The exact bounding rectangle. |
equalsequals: (Rectangle2D, any) -> booleanWhether other has the same frame, a Rectangle and a Rectangle2D alike (false for anything else); == answers the same.
newnew: ((number, number, number, number) -> Rectangle2D) & (() -> Rectangle2D)(number, number, number, number) -> Rectangle2D: The rectangle at x, y, w wide and h high (Rectangle2D.Double.new(...) reaches it too).
() -> Rectangle2D: The empty rectangle at the origin (Rectangle2D.Double.new() reaches it too).