constructor([stroke], [background], [opacity], [x], [y], [width], [height])

Class: Rectangle.

Description:

Creates an instance of Rectangle shape.

Parameters:

Name Type Default Description

[stroke]

Stroke

A border of the shape.

[background]

string

Color, gradient, or image background, similar to CSS. Use an empty string to remove the background.

[opacity]

number

1

Opacity of the shape (0 to 1).

[x]

number

0

Horizontal position from the left edge.

[y]

number

0

Vertical position from the top edge.

[width]

number

100

Width of the ellipse (horizontal diameter).

[height]

number

Height of the ellipse (vertical diameter). If omitted, height will be same as width.