class Polyline
- Extends:
- Shape
Description:
Polyline is a shape with multiple lines drawn from point to point for each provided point. Each point is an X and Y coordinate relative to the shapes X and Y position.
Polyline is similar to Polygon, but the area within points is not filled in with background, and first and last points are not connected.
Just like a Line shape, Polyline is a geometric line that doesn't have an area to be filled. For the line to be visible you specify the stroke size to be more that 0.
Polyline extends Shape class.
Constructor
constructor([stroke], [opacity=1], [x=0], [y=0], [_points=[]])
Creates an instance of Polygon shape object.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
A border of the shape. |
||
|
|
number |
1 |
Opacity of the shape (0 to 1). |
|
|
number |
0 |
Horizontal position from the left edge. |
|
|
number |
0 |
Vertical position from the top edge. |
|
|
Array.<object> |
[] |
An array of point objects that represent each point where lines begin, connect and end: [{x:number,y:number}, ...]. |
Members
- [ readonly ] parent
Methods
From this class:
Inherited from Shape:
- add()
- anchor()
- angle()
- background()
- intersect()
- intersects()
- opacity()
- position()
- stroke()
- subtract()
- visible()
- x()
- y()
