Rectangle

class Markup.Shapes.Rectangle()

Represents a rectangle defined by a position and a size.

Constructors

Markup.Shapes.Rectangle.constructor()
Rectangle(position: Point2, size: Point2): Rectangle

Creates a new rectangle markup item

Parameters

position: Point2

the screen space position of the top left of the rectangle.

size: Point2

the point object representing the width and height of the rectangle in pixels.

Returns: Rectangle

Methods

Markup.Shapes.Rectangle.getBorderRadius()

inherited

getBorderRadius(): number

Gets the border radius for this shape

Returns: number

the border radius
Markup.Shapes.Rectangle.getFillColor()

inherited

getFillColor(): Color

Gets the fill color for this shape

Returns: Color

the fill color
Markup.Shapes.Rectangle.getFillOpacity()

inherited

getFillOpacity(): number

Gets the fill opacity for this shape

Returns: number

the fill opacity
Markup.Shapes.Rectangle.getPosition()
getPosition(): Point2

Gets rectangle position

Returns: Point2

the rectangle position
Markup.Shapes.Rectangle.getSize()
getSize(): Point2

Gets rectangle size

Returns: Point2

the rectangle size
Markup.Shapes.Rectangle.getStrokeColor()

inherited

getStrokeColor(): Color

Gets the stroke color for this shape

Returns: Color

the stroke color
Markup.Shapes.Rectangle.getStrokeWidth()

inherited

getStrokeWidth(): number

Gets the stroke width for this shape in pixels

Returns: number

the stroke width in pixels
Markup.Shapes.Rectangle.setBorderRadius()

inherited

setBorderRadius(borderRadius: number): void

Sets the border radius for this shape

Parameters

borderRadius: number

the border radius in pixels

Returns: void

Markup.Shapes.Rectangle.setFillColor()

inherited

setFillColor(color: Color): void

Sets the fill color for this shape

Parameters

color: Color

the fill color

Returns: void

Markup.Shapes.Rectangle.setFillOpacity()

inherited

setFillOpacity(fillOpacity: number): void

Sets the fill opacity for this shape

Parameters

fillOpacity: number

the fill opacity

Returns: void

Markup.Shapes.Rectangle.setPosition()
setPosition(position: Point2): void

Sets the rectanlge position

Parameters

position: Point2

the top left corner of the rectangle

Returns: void

Markup.Shapes.Rectangle.setSize()
setSize(size: Point2): void

Sets the rectanlge size

Parameters

size: Point2

indicating the rectangle width and height

Returns: void

Markup.Shapes.Rectangle.setStrokeColor()

inherited

setStrokeColor(color: Color): void

Sets the stroke color for this shape

Parameters

color: Color

the stroke color

Returns: void

Markup.Shapes.Rectangle.setStrokeWidth()

inherited

setStrokeWidth(strokeWidth: number): void

Sets the stroke width for this shape in pixels

Parameters

strokeWidth: number

the stroke width in pixels

Returns: void