# PolygonCollection

class `Markup.Shapes.``PolygonCollection`()

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

  ## Index

  Constructors

  - `constructor`

  Methods

  - `clear`
  - `createPolygon`
  - `getFillColor`
  - `getFillOpacity`
  - `getPolygons`
  - `getStrokeColor`
  - `getStrokeWidth`
  - `setFillColor`
  - `setFillOpacity`
  - `setStrokeColor`
  - `setStrokeWidth`

## Constructors

`Markup.Shapes.PolygonCollection.``constructor`()
  PolygonCollection(): `PolygonCollection`

  Returns: `PolygonCollection`

## Methods

`Markup.Shapes.PolygonCollection.``clear`()
  clear(): void

  Removes all polygons from the collection

  Returns: void

`Markup.Shapes.PolygonCollection.``createPolygon`()
  createPolygon(): `Point2`[]

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

  Returns: `Point2`[]

  > new array which represents a polygon.

`Markup.Shapes.PolygonCollection.``getFillColor`()

  inherited

  getFillColor(): `Color`

  Gets the fill color for this shape

  Returns: `Color`

  > the fill color

`Markup.Shapes.PolygonCollection.``getFillOpacity`()

  inherited

  getFillOpacity(): number

  Gets the fill opacity for this shape

  Returns: number

  > the fill opacity

`Markup.Shapes.PolygonCollection.``getPolygons`()
  getPolygons(): `Point2`[][]

  Returns: `Point2`[][]

  > the polylines in this collection

`Markup.Shapes.PolygonCollection.``getStrokeColor`()

  inherited

  getStrokeColor(): `Color`

  Gets the stroke color for this shape

  Returns: `Color`

  > the stroke color

`Markup.Shapes.PolygonCollection.``getStrokeWidth`()

  inherited

  getStrokeWidth(): number

  Gets the stroke width for this shape in pixels

  Returns: number

  > the stroke width in pixels

`Markup.Shapes.PolygonCollection.``setFillColor`()

  inherited

  setFillColor(color: `Color`): void

  Sets the fill color for this shape

  Parameters

  > color: `Color`

  > > the fill color

  Returns: void

`Markup.Shapes.PolygonCollection.``setFillOpacity`()

  inherited

  setFillOpacity(fillOpacity: number): void

  Sets the fill opacity for this shape

  Parameters

  > fillOpacity: number

  > > the fill opacity

  Returns: void

`Markup.Shapes.PolygonCollection.``setStrokeColor`()

  inherited

  setStrokeColor(color: `Color`): void

  Sets the stroke color for this shape

  Parameters

  > color: `Color`

  > > the stroke color

  Returns: void

`Markup.Shapes.PolygonCollection.``setStrokeWidth`()

  inherited

  setStrokeWidth(strokeWidth: number): void

  Sets the stroke width for this shape in pixels

  Parameters

  > strokeWidth: number

  > > the stroke width in pixels

  Returns: void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...