JSignage:Polyline

From SpinetiX Support Wiki

Jump to: navigation, search

.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:

  • points
    Type: Array.<String>.
    Array x, y coordinates pairs defining the points that make up the polyline.

Example

Polyline1.png
// 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');
This page was last modified on 20 August 2014, at 11:52.