The following functions that will be explained here: ellipse, rect, and line:
-ellipse:
How to use: ellipse(x, y, w, h);
X is used to mark a horizontal point from 0 to 400 while Y is used to mark a vertical point from 0 to 400. W sets how long the created circle's diameter will be while H is used to set how tall/high the circle's diameter will be.
-rect:
How to use: line(x, y, L, h);
The X is used to set where the top left of the rectangle will be on the X plane(left to right, higher # equals farther right) while Y is used to set where top left of the rectangle is on the Y plane(up and down, higher # equal lower down).
L/w is used to set how long the rectangle will be(goes to the right), while 'h' is used to set how far down the the rectangle will stretch(higher # equal the rectangle going farther down the screen).
-line:
How to use: line(x1, y1, x2, y2); <note: do not include the 1 or 2 in the actual code string.>
The numbers 'x1' and 'y1' are used to set the start point for the line, point A if you will while 'x2' and 'y2' are used to set the end point or point B. If done correctly a line will appear between points A and B.
No comments:
Post a Comment