module:Rectangle

Basic rectangle
rectangle demo

Constructor

new module:Rectangle(positionDefinition, widthopt, heightopt, optionsopt)

Rectangle constructor

Parameters:
NameTypeAttributesDefaultDescription
positionDefinitionPositionDefinition

Position in space

widthNumber<optional>
0

Horizontal size

heightNumber<optional>
0

Vertical size

optionsComponentOptions<optional>

Drawing options

Extends

Members

(static) origins :RectangleOrigins

Type:
  • RectangleOrigins

height :Number

Type:
  • Number

width :Number

Type:
  • Number

Methods

(static) from(definition) → {Rectangle}

Parameters:
NameTypeDescription
definitionObject

Rectangle definition

Returns:
Type: 
Rectangle

trace(path) → {Rectangle}

Draw the rectangle

Parameters:
NameTypeDescription
pathpath

Drawing context

Returns:

Itself

Type: 
Rectangle

Type Definitions

RectangleOrigins

Type:
  • Object
Properties
NameTypeDescription
topLeftString
topRightString
topCenterString
centerString
centerLeftString
centerRightString
bottomLeftString
bottomRightString
bottomCenterString