SVGPolyLine

Part of wslib


see also: SVG, SVGFile


superclass : SVGObject


The SVGPolyLine contains data for a segmented line. 

SVGPolyLine is a superclass of SVGPolygon


creation


SVGPolyLine ( points, name, strokeColor, fillColor, strokeWidth, transform )

creates a new object with the instance variables as described below and in the SVGObject helpfile



instance variables


points

an Array with Point objects, describing the segments of the line

strokeColor, fillColor

colors for stroke and fill. These can be 

a Color

a String or Symbol with a color name ( e.g. "light_blue" or "#0000FF" )

"none" or nil

strokeWidth

defaults to 1.


SVGPolyLine( { Point.rand( 400, 400 ) } ! 10,  "my polyline", "red", "none", 2 ).plot;


instance methods


add ( point ), addAll ( pointArray )

add an object or an Array of objects to the group


++ anSVGPolyLine

Concatenate the points of 2 SVGPolyLines to the first SVGPolyLine.


at ( index ), copySeries ( first, second, last ), put (index, item )

calls .at and copySeries on points, also to provide compatibility with the ..[..] syntax in SC


SVGPolyLine( { Point.rand( 400, 400 ) } ! 10 )[1]


asXYArray

returns an array containing arrays with x and y values


SVGPolyLine( { Point.rand( 400, 400 ) } ! 5 ).asXYArray;