JSignage:Polyline
From SpinetiX Support Wiki
.polyline()
$.polyline( attributes );
Returns: jSignage Object
Description
Draws a set of connected straight line segments, which are typically forming an open shape (for closed shapes, $.polygon()
should be used instead). See the polyline element in the SVG specification for reference.
Parameters
-
attributes
- Type: Plain Object.
- Contains the shape attributes.
Attributes
The following attributes can be specified:
-
fill
,stroke
etc.- Fill and stroke attributes (common to all shapes).
-
points
Example
// draw a stairs-like blue polyline and add it to the document
$.polyline({
fill : 'none', stroke:'blue', strokeWidth: 5,
points: [ '50, 375', '150, 375', '150, 325', '250, 325',
'250, 375', '250, 275', '350, 275', '350, 375',
'350, 225', '450, 225', '450, 375' ]
}).addTo('svg');