Shapes¶
Methods¶
ellipse(x, y, w, h);¶
Draws a ellipse at
(x, y)with a radius ofw(x-axis) andh(y-axis).
Parameters Variable Description xx-position of the center of the ellipse yy-position of the center of the ellipse wx-axis radius of the ellipse hy-axis radius of the ellipse
line(x1, y1, x2, y2);¶
Draws a line from
(x1, y1)to(x2, y2).
Parameters Variable Description x1x-position of the start of the line y1y-position of the start of the line x2x-position of the end of the line y2y-position of the end of the line
point(x, y);¶
Draws a point at
(x, y)with the width specified by the stroke weight.
Parameters Variable Description xx-position of the point yy-position of the point
rect(x, y, w, h);¶
Draws a rectangle from
(x,y)to(x+w, y+h).
Parameters Variable Description xx-position of the rectangle yy-position of the rectangle wWidth of the rectangle hHeight of the rectangle
triangle(x1, y1, x2, y2, x3, y3);¶
Draws a triangle with vertices at
(x1, y1),(x2, y2), and(x3, y3).
Parameters Variable Description x1x-position of the first vertex y1y-position of the first vertex x2x-position of the second vertex y2y-position of the second vertex x3x-position of the third vertex y3y-position of the third vertex