API Docs for: 2.2.1
Show:

RoundedRectangle Class

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

Constructor

RoundedRectangle

(
  • x
  • y
  • width
  • height
  • radius
)

Parameters:

  • x Number

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

  • y Number

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

  • width Number

    The overall width of this rounded rectangle

  • height Number

    The overall height of this rounded rectangle

  • radius Number

    The overall radius of this corners of this rounded rectangle

Item Index

Methods

Properties

Methods

clone

() RoundedRectangle

Creates a clone of this Rounded Rectangle

Returns:

RoundedRectangle:

a copy of the rounded rectangle

contains

(
  • x
  • y
)
Boolean

Checks whether the x and y coordinates given are contained within this Rounded Rectangle

Parameters:

  • x Float

    The X coordinate of the point to test

  • y Float

    The Y coordinate of the point to test

Returns:

Boolean:

Whether the x/y coordinates are within this Rounded Rectangle

Properties

height

Float

Default: 0

radius

Float

Default: 20

width

Float

Default: 0

x

Float

Default: 0

y

Float

Default: 0