Rectangle

class Communicator.Markup.Shape.Rectangle()

Represents a rectangle defined by a position and a size.

Constructors

constructor()

Creates a new rectangle markup item

Methods

getBorderRadius()

getFillColor()

getFillOpacity()

getPosition()

getSize()

getStrokeColor()

getStrokeWidth()

setBorderRadius()

setFillColor()

setFillOpacity()

setPosition()

setSize()

setStrokeColor()

setStrokeWidth()


Constructors

constructor

Communicator.Markup.Shape.Rectangle.constructor(position, size)

Creates a new rectangle markup item

Arguments
  • position (Communicator.Point2()) –

  • size (Communicator.Point2()) –

Return type

Communicator.Markup.Shape.Rectangle

Methods

getBorderRadius

Communicator.Markup.Shape.Rectangle.getBorderRadius()

Gets the border radius for this shape

Return type

number

Returns

the border radius

getFillColor

Communicator.Markup.Shape.Rectangle.getFillColor()

Gets the fill color for this shape

Return type

Communicator.Color

Returns

the fill color

getFillOpacity

Communicator.Markup.Shape.Rectangle.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getPosition

Communicator.Markup.Shape.Rectangle.getPosition()

Gets rectangle position

Return type

Communicator.Point2

Returns

the rectangle position

getSize

Communicator.Markup.Shape.Rectangle.getSize()

Gets rectangle size

Return type

Communicator.Point2

Returns

the rectangle size

getStrokeColor

Communicator.Markup.Shape.Rectangle.getStrokeColor()

Gets the stroke color for this shape

Return type

Communicator.Color

Returns

the stroke color

getStrokeWidth

Communicator.Markup.Shape.Rectangle.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Communicator.Pixels

Returns

the stroke width in pixels

setBorderRadius

Communicator.Markup.Shape.Rectangle.setBorderRadius(borderRadius)

Sets the border radius for this shape

Arguments
  • borderRadius (number()) – the border radius in pixels

Return type

void

setFillColor

Communicator.Markup.Shape.Rectangle.setFillColor(color)

Sets the fill color for this shape

Arguments
  • color (Communicator.Color()) – the fill color

Return type

void

setFillOpacity

Communicator.Markup.Shape.Rectangle.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

Arguments
  • fillOpacity (number()) – the fill opacity

Return type

void

setPosition

Communicator.Markup.Shape.Rectangle.setPosition(position)

Sets the rectanlge position

Arguments
  • position (Communicator.Point2()) – the top left corner of the rectangle

Return type

void

setSize

Communicator.Markup.Shape.Rectangle.setSize(size)

Sets the rectanlge size

Arguments
  • size (Communicator.Point2()) – indicating the rectangle width and height

Return type

void

setStrokeColor

Communicator.Markup.Shape.Rectangle.setStrokeColor(color)

Sets the stroke color for this shape

Arguments
  • color (Communicator.Color()) – the stroke color

Return type

void

setStrokeWidth

Communicator.Markup.Shape.Rectangle.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

Arguments
  • strokeWidth (Communicator.Pixels()) – the stroke width in pixels

Return type

void