RectangleCollection

class Communicator.Markup.Shape.RectangleCollection()

This is useful for drawing a number of rectangles which share the same visual appearance.


Methods

addRectangle

RectangleCollection.addRectangle(position, size)

Adds a rectangle to the collection

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

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

Return type

void

clear

RectangleCollection.clear()

Removes all rectangles from this collection

Return type

void

getBorderRadius

RectangleCollection.getBorderRadius()

Gets the border radius for this shape

Return type

number

Returns

the border radius

getFillColor

RectangleCollection.getFillColor()

Gets the fill color for this shape

Return type

Color()

Returns

the fill color

getFillOpacity

RectangleCollection.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getRectangles

RectangleCollection.getRectangles()

Gets the rectangles in the collection

Return type

[_MarkupRectangleData]

getStrokeColor

RectangleCollection.getStrokeColor()

Gets the stroke color for this shape

Return type

Color()

Returns

the stroke color

getStrokeWidth

RectangleCollection.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Pixels

Returns

the stroke width in pixels

setBorderRadius

RectangleCollection.setBorderRadius(borderRadius)

Sets the border radius for this shape

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

Return type

void

setFillColor

RectangleCollection.setFillColor(color)

Sets the fill color for this shape

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

Return type

void

setFillOpacity

RectangleCollection.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

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

Return type

void

setStrokeColor

RectangleCollection.setStrokeColor(color)

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

RectangleCollection.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

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

Return type

void