-
Notifications
You must be signed in to change notification settings - Fork 3
Canvas polygon
mohayonao edited this page Aug 11, 2014
·
6 revisions
Draws a polygon to the canvas.
canvas.stroke(11).noFill()
.polygon([
[ 50, 20 ], [ 20, 40 ], [ 30, 80 ], [ 70, 80 ], [ 80, 40 ]
]);
canvas.noStroke().fill([ 4, 12, 6 ])
.polygon([
[ 150, 20 ], [ 120, 40 ], [ 130, 80 ], [ 170, 80 ], [ 180, 40 ]
]);
canvas.stroke(13).fill(5)
.polygon([
[ 250, 20 ], [ 230, 80 ], [ 280, 40 ], [ 220, 40 ], [ 270, 80 ]
]);
canvas.polygon(vertices);
-
vertices: array[ array[ int, int ] ]
- vertices
Canvas: self for method chaining