PolygonCollection

class Communicator.Markup.Shape.PolygonCollection()

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


Methods

clear

PolygonCollection.clear()

Removes all polygons from the collection

Return type

void

createPolygon

PolygonCollection.createPolygon()

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

Return type

[Point2()]

Returns

new array which represents a polygon.

getFillColor

PolygonCollection.getFillColor()

Gets the fill color for this shape

Return type

Color()

Returns

the fill color

getFillOpacity

PolygonCollection.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getPolygons

PolygonCollection.getPolygons()
Return type

[[Point2()]]

Returns

the polylines in this collection

getStrokeColor

PolygonCollection.getStrokeColor()

Gets the stroke color for this shape

Return type

Color()

Returns

the stroke color

getStrokeWidth

PolygonCollection.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Pixels

Returns

the stroke width in pixels

setFillColor

PolygonCollection.setFillColor(color)

Sets the fill color for this shape

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

Return type

void

setFillOpacity

PolygonCollection.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

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

Return type

void

setStrokeColor

PolygonCollection.setStrokeColor(color)

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

PolygonCollection.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

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

Return type

void