Skip to content

Graphics.drawRect method

Graphics › drawRect

Unofficial

Draws a rectangle.

Signature:

drawRect(x: number, y: number, width: number, height: number): this

Parameters:

ParameterTypeDescription
xnumberX position.
ynumberY position.
widthnumberWidth.
heightnumberHeight.

Returns: thisThis graphics for chaining.