Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Rectangle2D

[13:7] extends: FxObj

Rectangle2D wraps javafx.geometry.Rectangle2D, an immutable rectangle defined by a minimum x and y corner plus a width and height. It is used in places like an ImageView viewport. Extends FxObj.

Methods

  • Rectangle2D (MinX = null, MinY = null, Width = null, Height = null)

    Creates a Rectangle2D from a minimum corner and a size. When an existing Rectangle2D AussomJavaObject is passed as the first argument it is wrapped directly.

    • @p MinX is the minimum x, or a Rectangle2D AJO to wrap.
    • @p MinY is the minimum y.
    • @p Width is the width.
    • @p Height is the height.
  • getMinX ()

    Returns the minimum x coordinate.

    • @r A double with the minimum x.
  • getMinY ()

    Returns the minimum y coordinate.

    • @r A double with the minimum y.
  • getWidth ()

    Returns the width.

    • @r A double with the width.
  • getHeight ()

    Returns the height.

    • @r A double with the height.
  • getMaxX ()

    Returns the maximum x coordinate (minimum x plus width).

    • @r A double with the maximum x.
  • getMaxY ()

    Returns the maximum y coordinate (minimum y plus height).

    • @r A double with the maximum y.
  • contains (double X, double Y)

    Returns whether the given point lies inside this rectangle.

    • @p X is the point x coordinate.
    • @p Y is the point y coordinate.
    • @r A bool, true when the point is contained.
  • intersects (Rect)

    Returns whether the given rectangle intersects this one.

    • @p Rect is a Rectangle2D wrapper (or Rectangle2D AJO).
    • @r A bool, true when the two rectangles intersect.