-
Notifications
You must be signed in to change notification settings - Fork 3
Canvas rect
mohayonao edited this page Aug 11, 2014
·
9 revisions
Draws a rectangle to the canvas.
canvas.stroke(8).noFill()
.rect(20, 20, 60, 60);
canvas.noStroke().fill([ 1, 9, 6 ])
.rect(120, 20, 60, 60);
canvas.stroke(10).fill(2)
.rect(220, 20, 60, 60);
canvas.rect(x, y, w, h);
-
x: int
- x-coordinate of the rectangle
-
y: int
- y-coordinate of the rectangle
-
w: int
- width of the rectangle
-
h: int
- height of the rectangle
Canvas: self for method chaining