API Docs for: 2.1.0
Show:

Rounded Rectangle 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

Rounded Rectangle

(
  • 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

() Rounded Rectangle

Creates a clone of this Rounded Rectangle

Returns:

Rounded Rectangle:

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 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

Properties

height

Number

Default: 0

radius

Number

Default: 20

width

Number

Default: 0

x

Number

Default: 0

y

Number

Default: 0