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


#######
Polygon
#######

.. js:class:: wv.Markup.Shapes.Polygon

   This class represents a shape bounded by the polyline formed from its points.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Markup.Shapes.Polygon.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Markup.Shapes.Polygon.clearPoints`
   * :js:meth:`~wv.Markup.Shapes.Polygon.getFillColor`
   * :js:meth:`~wv.Markup.Shapes.Polygon.getFillOpacity`
   * :js:meth:`~wv.Markup.Shapes.Polygon.getPoints`
   * :js:meth:`~wv.Markup.Shapes.Polygon.getStrokeColor`
   * :js:meth:`~wv.Markup.Shapes.Polygon.getStrokeWidth`
   * :js:meth:`~wv.Markup.Shapes.Polygon.pushPoint`
   * :js:meth:`~wv.Markup.Shapes.Polygon.setFillColor`
   * :js:meth:`~wv.Markup.Shapes.Polygon.setFillOpacity`
   * :js:meth:`~wv.Markup.Shapes.Polygon.setStrokeColor`
   * :js:meth:`~wv.Markup.Shapes.Polygon.setStrokeWidth`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.Polygon.constructor

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



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.Polygon.clearPoints

      .. rst-class:: sig-pretty-signature
      
         | clearPoints(): *void*
      
      Removes all points from this polygon
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Polygon.getFillColor

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



.. js:method:: wv.Markup.Shapes.Polygon.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:: wv.Markup.Shapes.Polygon.getPoints

      .. rst-class:: sig-pretty-signature
      
         | getPoints(): :js:class:`Point2 <wv.Point2>`\ []
      
      Gets the points in this polyline
      
      **Returns**\ : :js:class:`Point2 <wv.Point2>`\ []
      
      
         the points in this polygon
      
      



.. js:method:: wv.Markup.Shapes.Polygon.getStrokeColor

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



.. js:method:: wv.Markup.Shapes.Polygon.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:: wv.Markup.Shapes.Polygon.pushPoint

      .. rst-class:: sig-pretty-signature
      
         | pushPoint(**point**\ : :js:class:`Point2 <wv.Point2>`\ ): *void*
      
      Adds a point to the polygon
      
      **Parameters**
      
      
         **point**\ : :js:class:`Point2 <wv.Point2>`
      
      
            the point to add to the polygon
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Polygon.setFillColor

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



.. js:method:: wv.Markup.Shapes.Polygon.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:: wv.Markup.Shapes.Polygon.setStrokeColor

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



.. js:method:: wv.Markup.Shapes.Polygon.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*
      




