Polyline

class Markup.Shapes.Polyline()

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

Constructors


Constructors

Polyline.constructor()
Return type

Polyline

Methods

clearPoints

Polyline.clearPoints()

Removes all points from this polyline

Return type

void

getEndEndcapColor

Polyline.getEndEndcapColor()

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

Returns

color for the end endcap.

Return type

Color

getEndEndcapSize

Polyline.getEndEndcapSize()

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

Returns

size of the end endcap.

Return type

number

getEndEndcapType

Polyline.getEndEndcapType()

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

Returns

the end endcap type

Return type

EndcapType

getEndcapsInverted

Polyline.getEndcapsInverted()

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

Returns

value indicating whether endcaps are inverted

Return type

boolean

getPoints

Polyline.getPoints()

Gets the points in this polyline

Returns

the points in this polyline

Return type

[Point2]

getStartEndcapColor

Polyline.getStartEndcapColor()

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

Returns

color for the start endcap.

Return type

Color

getStartEndcapSize

Polyline.getStartEndcapSize()

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

Returns

size of the start endcap.

Return type

number

getStartEndcapType

Polyline.getStartEndcapType()

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

Returns

the start endcap type

Return type

EndcapType

getStrokeColor

Polyline.getStrokeColor()

Gets the stroke color for this shape

Returns

the stroke color

Return type

Color

getStrokeWidth

Polyline.getStrokeWidth()

Gets the stroke width for this shape in pixels

Returns

the stroke width in pixels

Return type

number

pushPoint

Polyline.pushPoint(point)
Arguments
  • point (Point2()) – the point to add to the line

Adds a point to the polyline

Return type

void

setEndEndcapColor

Polyline.setEndEndcapColor(color)
Arguments
  • color (Color()) – the end endcap color value.

Sets the color for the end endcap.

Return type

void

setEndEndcapSize

Polyline.setEndEndcapSize(size)
Arguments
  • size (number()) – the end endcap.

Sets the size of the end endcap in pixels.

Return type

void

setEndEndcapType

Polyline.setEndEndcapType(endcapType)
Arguments
  • endcapType (EndcapType()) – the new endcap type

Sets the end endcap type for this shape

Return type

void

setEndcapType

Polyline.setEndcapType(endcapType)
Arguments
  • endcapType (EndcapType()) – the new endcap type

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

Return type

void

setEndcapsInverted

Polyline.setEndcapsInverted(inverted)
Arguments
  • inverted (boolean()) – value indicated whether endcaps should be inverted

Sets whether endcapsare inverted for this shape.

Return type

void

setStartEndcapColor

Polyline.setStartEndcapColor(color)
Arguments
  • color (Color()) – the start endcap color value.

Sets the color for the start endcap.

Return type

void

setStartEndcapSize

Polyline.setStartEndcapSize(size)
Arguments
  • size (number()) – the start endcap.

Sets the size of the start endcap in pixels.

Return type

void

setStartEndcapType

Polyline.setStartEndcapType(endcapType)
Arguments
  • endcapType (EndcapType()) – the new endcap type

Sets the start endcap type for this shape

Return type

void

setStrokeColor

Polyline.setStrokeColor(color)
Arguments
  • color (Color()) – the stroke color

Sets the stroke color for this shape

Return type

void

setStrokeWidth

Polyline.setStrokeWidth(strokeWidth)
Arguments
  • strokeWidth (number()) – the stroke width in pixels

Sets the stroke width for this shape in pixels

Return type

void