.. role:: ts-api-decorator

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

.. js:module:: Markup.Shapes
   :noindex:

.. container:: ts-api-section

   .. js:class:: PolygonCollection

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



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Markup.Shapes.PolygonCollection.constructor`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :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
============

.. container:: ts-api-section

   .. js:function:: PolygonCollection.constructor()



      :rtype: PolygonCollection



Methods
=======

.. rst-class:: ts-api-section

clear
-----

.. js:method:: PolygonCollection.clear()



   Removes all polygons from the collection


   :rtype: void

.. rst-class:: ts-api-section

createPolygon
-------------

.. js:method:: PolygonCollection.createPolygon()



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

   :returns: new array which represents a polygon.


   :rtype: [Point2]

.. rst-class:: ts-api-section

getFillColor
------------

.. js:method:: PolygonCollection.getFillColor()



   Gets the fill color for this shape

   :returns: the fill color


   :rtype: Color

.. rst-class:: ts-api-section

getFillOpacity
--------------

.. js:method:: PolygonCollection.getFillOpacity()



   Gets the fill opacity for this shape

   :returns: the fill opacity


   :rtype: number

.. rst-class:: ts-api-section

getPolygons
-----------

.. js:method:: PolygonCollection.getPolygons()





   :returns: the polylines in this collection


   :rtype: [[Point2]]

.. rst-class:: ts-api-section

getStrokeColor
--------------

.. js:method:: PolygonCollection.getStrokeColor()



   Gets the stroke color for this shape

   :returns: the stroke color


   :rtype: Color

.. rst-class:: ts-api-section

getStrokeWidth
--------------

.. js:method:: PolygonCollection.getStrokeWidth()



   Gets the stroke width for this shape in pixels

   :returns: the stroke width in pixels


   :rtype: number

.. rst-class:: ts-api-section

setFillColor
------------

.. js:method:: PolygonCollection.setFillColor( color)

   :param color: the fill color
   :type color: Color


   Sets the fill color for this shape


   :rtype: void

.. rst-class:: ts-api-section

setFillOpacity
--------------

.. js:method:: PolygonCollection.setFillOpacity( fillOpacity)

   :param fillOpacity: the fill opacity
   :type fillOpacity: number


   Sets the fill opacity for this shape


   :rtype: void

.. rst-class:: ts-api-section

setStrokeColor
--------------

.. js:method:: PolygonCollection.setStrokeColor( color)

   :param color: the stroke color
   :type color: Color


   Sets the stroke color for this shape


   :rtype: void

.. rst-class:: ts-api-section

setStrokeWidth
--------------

.. js:method:: PolygonCollection.setStrokeWidth( strokeWidth)

   :param strokeWidth: the stroke width in pixels
   :type strokeWidth: number


   Sets the stroke width for this shape in pixels


   :rtype: void

