Square
Class representing a Square, extending the Rectangle class. Provides functionality for rendering, resizing, moving, and rotating the square.
Extends
Constructors
new Square()
new Square(
x
,y
,size
,rotation
,style
?,options
?):Square
Constructs a new Square instance.
Parameters
• x: number
The x-coordinate of the square's position.
• y: number
The y-coordinate of the square's position.
• size: number
The size (width/height) of the square.
• rotation: number
= 0
The initial rotation of the square in degrees clockwise.
• style?: IRectangleStyle
The style options for the square.
• options?: IRectangleOptions
The configuration options for the square.
Returns
Overrides
Defined in
Properties
_definition
protected
_definition:RectangleDefinition
The shape definition, proxied to trigger observer notifications on change.
Inherited from
Defined in
_options
protected
_options:RectangleOptions
The options for configuring the shape, proxied to trigger observer notifications on change.
Inherited from
Defined in
_state
protected
_state:ShapeState
=ShapeState.Default
The current state of the shape, representing its visual or interactive status.
Inherited from
Defined in
_style
protected
_style:RectangleStyle
The style settings for the shape, proxied to trigger observer notifications on change.
Inherited from
Defined in
observers
protected
observers: () =>void
[] =[]
List of observer functions to be notified on shape changes.