.. role:: ts-api-decorator

########
Polyline
########

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

.. container:: ts-api-section

   .. js:class:: Polyline

      This class reprsents a line defined by a list of points.



.. container:: api-index-section

   .. rubric:: Constructors

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

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



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Markup.Shapes.Polyline.clearPoints`
   * :js:meth:`~Markup.Shapes.Polyline.getEndEndcapColor`
   * :js:meth:`~Markup.Shapes.Polyline.getEndEndcapSize`
   * :js:meth:`~Markup.Shapes.Polyline.getEndEndcapType`
   * :js:meth:`~Markup.Shapes.Polyline.getEndcapsInverted`
   * :js:meth:`~Markup.Shapes.Polyline.getPoints`
   * :js:meth:`~Markup.Shapes.Polyline.getStartEndcapColor`
   * :js:meth:`~Markup.Shapes.Polyline.getStartEndcapSize`
   * :js:meth:`~Markup.Shapes.Polyline.getStartEndcapType`
   * :js:meth:`~Markup.Shapes.Polyline.getStrokeColor`
   * :js:meth:`~Markup.Shapes.Polyline.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.Polyline.pushPoint`
   * :js:meth:`~Markup.Shapes.Polyline.setEndEndcapColor`
   * :js:meth:`~Markup.Shapes.Polyline.setEndEndcapSize`
   * :js:meth:`~Markup.Shapes.Polyline.setEndEndcapType`
   * :js:meth:`~Markup.Shapes.Polyline.setEndcapType`
   * :js:meth:`~Markup.Shapes.Polyline.setEndcapsInverted`
   * :js:meth:`~Markup.Shapes.Polyline.setStartEndcapColor`
   * :js:meth:`~Markup.Shapes.Polyline.setStartEndcapSize`
   * :js:meth:`~Markup.Shapes.Polyline.setStartEndcapType`
   * :js:meth:`~Markup.Shapes.Polyline.setStrokeColor`
   * :js:meth:`~Markup.Shapes.Polyline.setStrokeWidth`





------------

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

.. container:: ts-api-section

   .. js:function:: Polyline.constructor()



      :rtype: Polyline



Methods
=======

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

clearPoints
-----------

.. js:method:: Polyline.clearPoints()



   Removes all points from this polyline


   :rtype: void

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

getEndEndcapColor
-----------------

.. js:method:: Polyline.getEndEndcapColor()



   Gets the color of the end endcap. Default value is black.

   :returns: color for the end endcap.


   :rtype: Color

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

getEndEndcapSize
----------------

.. js:method:: Polyline.getEndEndcapSize()



   Gets the size of the end endcap in pixels. Default value is 9.

   :returns: size of the end endcap.


   :rtype: number

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

getEndEndcapType
----------------

.. js:method:: Polyline.getEndEndcapType()



   Gets the end endcap type for this shape. The default value is none.

   :returns: the end endcap type


   :rtype: EndcapType

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

getEndcapsInverted
------------------

.. js:method:: Polyline.getEndcapsInverted()



   Gets whether endcaps are inverted for this shape. The default value is false.

   :returns: value indicating whether endcaps are inverted


   :rtype: boolean

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

getPoints
---------

.. js:method:: Polyline.getPoints()



   Gets the points in this polyline

   :returns: the points in this polyline


   :rtype: [Point2]

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

getStartEndcapColor
-------------------

.. js:method:: Polyline.getStartEndcapColor()



   Gets the color of the start endcap. Default value is black.

   :returns: color for the start endcap.


   :rtype: Color

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

getStartEndcapSize
------------------

.. js:method:: Polyline.getStartEndcapSize()



   Gets the size of the start endcap in pixels. Default value is 9.

   :returns: size of the start endcap.


   :rtype: number

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

getStartEndcapType
------------------

.. js:method:: Polyline.getStartEndcapType()



   Gets the start endcap type for this shape. The default Value is none.

   :returns: the start endcap type


   :rtype: EndcapType

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

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

.. js:method:: Polyline.getStrokeColor()



   Gets the stroke color for this shape

   :returns: the stroke color


   :rtype: Color

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

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

.. js:method:: Polyline.getStrokeWidth()



   Gets the stroke width for this shape in pixels

   :returns: the stroke width in pixels


   :rtype: number

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

pushPoint
---------

.. js:method:: Polyline.pushPoint( point)

   :param point: the point to add to the line
   :type point: Point2


   Adds a point to the polyline


   :rtype: void

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

setEndEndcapColor
-----------------

.. js:method:: Polyline.setEndEndcapColor( color)

   :param color: the end endcap color value.
   :type color: Color


   Sets the color for the end endcap.


   :rtype: void

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

setEndEndcapSize
----------------

.. js:method:: Polyline.setEndEndcapSize( size)

   :param size: the end endcap.
   :type size: number


   Sets the size of the end endcap in pixels.


   :rtype: void

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

setEndEndcapType
----------------

.. js:method:: Polyline.setEndEndcapType( endcapType)

   :param endcapType: the new endcap type
   :type endcapType: EndcapType


   Sets the end endcap type for this shape


   :rtype: void

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

setEndcapType
-------------

.. js:method:: Polyline.setEndcapType( endcapType)

   :param endcapType: the new endcap type
   :type endcapType: EndcapType


   Convenience for setting the start and eend endcap type for this shape


   :rtype: void

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

setEndcapsInverted
------------------

.. js:method:: Polyline.setEndcapsInverted( inverted)

   :param inverted: value indicated whether endcaps should be inverted
   :type inverted: boolean


   Sets whether endcapsare inverted for this shape.


   :rtype: void

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

setStartEndcapColor
-------------------

.. js:method:: Polyline.setStartEndcapColor( color)

   :param color: the start endcap color value.
   :type color: Color


   Sets the color for the start endcap.


   :rtype: void

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

setStartEndcapSize
------------------

.. js:method:: Polyline.setStartEndcapSize( size)

   :param size: the start endcap.
   :type size: number


   Sets the size of the start endcap in pixels.


   :rtype: void

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

setStartEndcapType
------------------

.. js:method:: Polyline.setStartEndcapType( endcapType)

   :param endcapType: the new endcap type
   :type endcapType: EndcapType


   Sets the start endcap type for this shape


   :rtype: void

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

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

.. js:method:: Polyline.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:: Polyline.setStrokeWidth( strokeWidth)

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


   Sets the stroke width for this shape in pixels


   :rtype: void

