Polygon

class Communicator.Markup.Shape.Polygon()

This class represents a shape bounded by the polyline formed from its points.


Methods

clearPoints

Polygon.clearPoints()

Removes all points from this polygon

Return type

void

getFillColor

Polygon.getFillColor()

Gets the fill color for this shape

Return type

Color()

Returns

the fill color

getFillOpacity

Polygon.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getPoints

Polygon.getPoints()

Gets the points in this polyline

Return type

[Point2()]

Returns

the points in this polygon

getStrokeColor

Polygon.getStrokeColor()

Gets the stroke color for this shape

Return type

Color()

Returns

the stroke color

getStrokeWidth

Polygon.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Pixels

Returns

the stroke width in pixels

pushPoint

Polygon.pushPoint(point)

Adds a point to the polygon

Arguments
  • point (Point2()) – the point to add to the polygon

Return type

void

setFillColor

Polygon.setFillColor(color)

Sets the fill color for this shape

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

Return type

void

setFillOpacity

Polygon.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

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

Return type

void

setStrokeColor

Polygon.setStrokeColor(color)

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

Polygon.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

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

Return type

void