.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


#################
PolygonCollection
#################

.. js:class:: Markup.Shapes.PolygonCollection

   This class is useful for drawing a number of polygons which share the same visual appearance
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Markup.Shapes.PolygonCollection.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Markup.Shapes.PolygonCollection.clear`
   * :js:meth:`~Markup.Shapes.PolygonCollection.createPolygon`
   * :js:meth:`~Markup.Shapes.PolygonCollection.getFillColor`
   * :js:meth:`~Markup.Shapes.PolygonCollection.getFillOpacity`
   * :js:meth:`~Markup.Shapes.PolygonCollection.getPolygons`
   * :js:meth:`~Markup.Shapes.PolygonCollection.getStrokeColor`
   * :js:meth:`~Markup.Shapes.PolygonCollection.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.PolygonCollection.setFillColor`
   * :js:meth:`~Markup.Shapes.PolygonCollection.setFillOpacity`
   * :js:meth:`~Markup.Shapes.PolygonCollection.setStrokeColor`
   * :js:meth:`~Markup.Shapes.PolygonCollection.setStrokeWidth`
   
   




Constructors
============

.. js:method:: Markup.Shapes.PolygonCollection.constructor

   .. rst-class:: sig-pretty-signature
   
      | PolygonCollection(): :js:class:`PolygonCollection <Markup.Shapes.PolygonCollection>`
   
   **Returns**\ : :js:class:`PolygonCollection <Markup.Shapes.PolygonCollection>`
   





Methods
=======

.. js:method:: Markup.Shapes.PolygonCollection.clear

   .. rst-class:: sig-pretty-signature
   
      | clear(): *void*
   
   Removes all polygons from the collection
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Shapes.PolygonCollection.createPolygon

   .. rst-class:: sig-pretty-signature
   
      | createPolygon(): :js:class:`~Point2`\ []
   
   Creates a new array of points that represent a polygon. Add Point2 objects to the array to construct the polygon
   
   **Returns**\ : :js:class:`~Point2`\ []
   
      new array which represents a polygon.
   
   



.. js:method:: Markup.Shapes.PolygonCollection.getFillColor

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getFillColor(): :js:class:`~Color`
   
   Gets the fill color for this shape
   
   **Returns**\ : :js:class:`~Color`
   
      the fill color
   
   



.. js:method:: Markup.Shapes.PolygonCollection.getFillOpacity

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getFillOpacity(): *number*
   
   Gets the fill opacity for this shape
   
   **Returns**\ : *number*
   
      the fill opacity
   
   



.. js:method:: Markup.Shapes.PolygonCollection.getPolygons

   .. rst-class:: sig-pretty-signature
   
      | getPolygons(): :js:class:`~Point2`\ [][]
   
   **Returns**\ : :js:class:`~Point2`\ [][]
   
      the polylines in this collection
   
   



.. js:method:: Markup.Shapes.PolygonCollection.getStrokeColor

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getStrokeColor(): :js:class:`~Color`
   
   Gets the stroke color for this shape
   
   **Returns**\ : :js:class:`~Color`
   
      the stroke color
   
   



.. js:method:: Markup.Shapes.PolygonCollection.getStrokeWidth

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | getStrokeWidth(): *number*
   
   Gets the stroke width for this shape in pixels
   
   **Returns**\ : *number*
   
      the stroke width in pixels
   
   



.. js:method:: Markup.Shapes.PolygonCollection.setFillColor

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setFillColor(**color**\ : :js:class:`~Color`\ ): *void*
   
   Sets the fill color for this shape
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
         the fill color
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Shapes.PolygonCollection.setFillOpacity

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setFillOpacity(**fillOpacity**\ : *number*\ ): *void*
   
   Sets the fill opacity for this shape
   
   **Parameters**
   
      **fillOpacity**\ : *number*
   
         the fill opacity
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Shapes.PolygonCollection.setStrokeColor

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setStrokeColor(**color**\ : :js:class:`~Color`\ ): *void*
   
   Sets the stroke color for this shape
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
         the stroke color
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Shapes.PolygonCollection.setStrokeWidth

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setStrokeWidth(**strokeWidth**\ : *number*\ ): *void*
   
   Sets the stroke width for this shape in pixels
   
   **Parameters**
   
      **strokeWidth**\ : *number*
   
         the stroke width in pixels
   
   
   
   **Returns**\ : *void*
   





