Skip to main content

RectangleStyle

Represents the style options for a rectangle.

Extends​

Implements​

Constructors​

new RectangleStyle()​

new RectangleStyle(style): RectangleStyle

Creates a new instance of RectangleStyle.

Parameters​

• style: Partial<IRectangleStyle> = {}

The partial style provided by the user.

Returns​

RectangleStyle

Overrides​

ShapeStyle.constructor

Defined in​

styles/RectangleStyle.ts:40

Properties​

active?​

optional active: IRectangleBaseStyle

Active style for the shape.

When the shape is in the active state, the properties defined in this style override the default style properties.

Implementation of​

IRectangleStyle.active

Inherited from​

ShapeStyle.active

Defined in​

styles/ShapeStyle.ts:28


borderColor​

borderColor: string

The color of the border.

Implementation of​

IRectangleStyle.borderColor

Defined in​

styles/RectangleStyle.ts:13


borderWidth​

borderWidth: number

The width of the border in pixels.

Implementation of​

IRectangleStyle.borderWidth

Defined in​

styles/RectangleStyle.ts:18


color​

color: string

The fill color of the rectangle.

Implementation of​

IRectangleStyle.color

Defined in​

styles/RectangleStyle.ts:23


cursor​

cursor: Cursor

Specifies the cursor style for the shape.

Implementation of​

IRectangleStyle.cursor

Inherited from​

ShapeStyle.cursor

Defined in​

styles/ShapeStyle.ts:12


hover?​

optional hover: IRectangleBaseStyle

Hover style for the shape.

When the shape is in the hover state, the properties defined in this style override the default style properties.

Implementation of​

IRectangleStyle.hover

Inherited from​

ShapeStyle.hover

Defined in​

styles/ShapeStyle.ts:20


DefaultStyle​

readonly static DefaultStyle: IRectangleStyle

Default style for the rectangle.

Defined in​

styles/RectangleStyle.ts:28