-
Notifications
You must be signed in to change notification settings - Fork 5
Line
Sergix edited this page Oct 10, 2016
·
2 revisions
###Creating a new Line
Use the following constructor call to create a new Line object:
var line1 = new Canvas5.Line( vector1, vector2 );
The first and second parameter are the beginning and ending points of the line, defined as Vectors.
###Changing the Line's Appearance
One of the ways you can change the line is by its color. Simply edit the color property of the Line by passing it a color set:
line1.color = new Canvas5.HSLSet( 255, 255, 125 );
This creates a bright red color.
We can also change the line's width, which is a value defined in pixels:
line1.width = 2;
The line is now 2 pixels wide.
Canvas5 v1.3-release
canvas5-release1.3.min.js
(c) 2016 Sergix