Rectangle

class Communicator.Markup.Shape.Rectangle()

Represents a rectangle defined by a position and a size.

Constructors


Constructors

Rectangle.constructor([position[, size]])

Creates a new rectangle markup item

Arguments
Return type

Rectangle()

Methods

getBorderRadius

Rectangle.getBorderRadius()

Gets the border radius for this shape

Return type

number

Returns

the border radius

getFillColor

Rectangle.getFillColor()

Gets the fill color for this shape

Return type

Color()

Returns

the fill color

getFillOpacity

Rectangle.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getPosition

Rectangle.getPosition()

Gets rectangle position

Return type

Point2()

Returns

the rectangle position

getSize

Rectangle.getSize()

Gets rectangle size

Return type

Point2()

Returns

the rectangle size

getStrokeColor

Rectangle.getStrokeColor()

Gets the stroke color for this shape

Return type

Color()

Returns

the stroke color

getStrokeWidth

Rectangle.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Pixels

Returns

the stroke width in pixels

setBorderRadius

Rectangle.setBorderRadius(borderRadius)

Sets the border radius for this shape

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

Return type

void

setFillColor

Rectangle.setFillColor(color)

Sets the fill color for this shape

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

Return type

void

setFillOpacity

Rectangle.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

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

Return type

void

setPosition

Rectangle.setPosition(position)

Sets the rectanlge position

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

Return type

void

setSize

Rectangle.setSize(size)

Sets the rectanlge size

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

Return type

void

setStrokeColor

Rectangle.setStrokeColor(color)

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

Rectangle.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

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

Return type

void