Class RoundedRectangle

The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height and its radius.

Memberof

PIXI

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optional x: number

      The X coordinate of the upper-left corner of the rounded rectangle

    • Optional y: number

      The Y coordinate of the upper-left corner of the rounded rectangle

    • Optional width: number

      The overall width of this rounded rectangle

    • Optional height: number

      The overall height of this rounded rectangle

    • Optional radius: number

      Controls the radius of the rounded corners

    Returns RoundedRectangle

Properties

height: number

Default

0
radius: number

Default

20
type: RREC

The type of the object, mainly used to avoid instanceof checks

Default

PIXI.SHAPES.RREC

See

PIXI.SHAPES

width: number

Default

0
x: number

Default

0
y: number

Default

0

Methods

  • Creates a clone of this Rounded Rectangle.

    Returns RoundedRectangle

    • A copy of the rounded rectangle.
  • Checks whether the x and y coordinates given are contained within this Rounded Rectangle

    Parameters

    • x: number

      The X coordinate of the point to test.

    • y: number

      The Y coordinate of the point to test.

    Returns boolean

    • Whether the x/y coordinates are within this Rounded Rectangle.

Generated using TypeDoc