module:Square

module:Square

Square class
square demo

Constructor

# new module:Square(positionDefinition, size, optionsopt)

Square constructor

Parameters:
Name Type Attributes Description
positionDefinition PositionDefinition

Top-left corner

size Number

Side's length

options ComponentOptions <optional>

Drawing options

Extends

Members

# height

Set height (also set width)

# height

Get height

# size

Set this square's size

# size

Get this square's size

# width

Set width (also set height)

# width

Get width

Methods

# (static) from(definition) → {Square}

Parameters:
Name Type Description
definition Object

Square definition

Returns:
Type
Square