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


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

.. js:class:: 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:`~Markup.Shapes.Polygon.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Markup.Shapes.Polygon.clearPoints`
   * :js:meth:`~Markup.Shapes.Polygon.getFillColor`
   * :js:meth:`~Markup.Shapes.Polygon.getFillOpacity`
   * :js:meth:`~Markup.Shapes.Polygon.getPoints`
   * :js:meth:`~Markup.Shapes.Polygon.getStrokeColor`
   * :js:meth:`~Markup.Shapes.Polygon.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.Polygon.pushPoint`
   * :js:meth:`~Markup.Shapes.Polygon.setFillColor`
   * :js:meth:`~Markup.Shapes.Polygon.setFillOpacity`
   * :js:meth:`~Markup.Shapes.Polygon.setStrokeColor`
   * :js:meth:`~Markup.Shapes.Polygon.setStrokeWidth`
   
   




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

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

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





Methods
=======

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

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



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

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



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

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



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





