PolygonCollection

class Communicator.Markup.Shape.PolygonCollection()

This class is useful for drawing a number of polygons which share the same visual appearance

Methods

clear()

createPolygon()

getFillColor()

getFillOpacity()

getPolygons()

getStrokeColor()

getStrokeWidth()

setFillColor()

setFillOpacity()

setStrokeColor()

setStrokeWidth()


Methods

clear

Communicator.Markup.Shape.PolygonCollection.clear()

Removes all polygons from the collection

Return type

void

createPolygon

Communicator.Markup.Shape.PolygonCollection.createPolygon()

Creates a new array of points that represent a polygon. Add Point2 objects to the array to construct the polygon

Return type

[Communicator.Point2]

Returns

new array which represents a polygon.

getFillColor

Communicator.Markup.Shape.PolygonCollection.getFillColor()

Gets the fill color for this shape

Return type

Communicator.Color

Returns

the fill color

getFillOpacity

Communicator.Markup.Shape.PolygonCollection.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getPolygons

Communicator.Markup.Shape.PolygonCollection.getPolygons()
Return type

[[Communicator.Point2]]

Returns

the polylines in this collection

getStrokeColor

Communicator.Markup.Shape.PolygonCollection.getStrokeColor()

Gets the stroke color for this shape

Return type

Communicator.Color

Returns

the stroke color

getStrokeWidth

Communicator.Markup.Shape.PolygonCollection.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Communicator.Pixels

Returns

the stroke width in pixels

setFillColor

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

Sets the fill color for this shape

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

Return type

void

setFillOpacity

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

Sets the fill opacity for this shape

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

Return type

void

setStrokeColor

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

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

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

Sets the stroke width for this shape in pixels

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

Return type

void