Rectangle2D

Methods
2
Fields
6

Getting one

Rectangle2D.new(…)
JComponent.new():getFontMetrics(…):getStringBounds(…)
scene:tileAt(…):getWallObject():getConvexHull():getBounds2D()

Methods

MethodReturnsDescription
equals(any)booleanWhether 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

Fields

FieldTypeDescription
xnumberThe x, Rectangle2D.Double's public field.
ynumberThe y, Rectangle2D.Double's public field.
widthnumberThe width, Rectangle2D.Double's public field.
heightnumberThe height, Rectangle2D.Double's public field.
DoubleRectangle2DClassRectangle2D.Double: Rectangle2D itself, so Rectangle2D.Double.new(...) is Rectangle2D.new(...).
FloatRectangle2DClassRectangle2D.Float: Rectangle2D itself, so Rectangle2D.Float.new(...) is Rectangle2D.new(...).

Returned by

MethodReturnsDescription
FontMetrics.getStringBoundsRectangle2DThe logical bounds of str from its baseline origin. Pass the Graphics2D; the metrics already carry its context.
Rectangle2DClass.newRectangle2D(number, number, number, number) -> Rectangle2D: The rectangle at x, y, w wide and h high (Rectangle2D.Double.new(...) reaches…
Shape.getBounds2DRectangle2DThe exact bounding rectangle.

Method details

equals

equals: (Rectangle2D, any) -> boolean

Whether other has the same frame, a Rectangle and a Rectangle2D alike (false for anything else); == answers the same.

new

new: ((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).