#include <iostream>
#include <fstream>
|
ofstream | fout |
|
string | _color |
|
int | _x |
|
int | _y |
|
◆ drawCircle()
Draws a circle where the pen currently is with radius r
filled with whatever color is currently set.
Example: drawCircle(10)
will draw a circle with radius 10 wherever the pen is.
- Parameters
-
r | The radius of the circle to draw. |
◆ drawRectangle()
void drawRectangle |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
Draws a rectangle with the upper left corner where the pen currently is with the given height and width and filled with whatever color is currently set.
Example: drawRectangle(2, 5)
will draw a rectangle with height 2 and width 5.
- Parameters
-
width | The width of the rectangle to draw. |
height | The height of the rectangle to draw. |
◆ end()
Indicates the end of your drawing.
◆ go()
Moves the pen's position to the given coordinate.
Example: go(10, 5)
will cause the pen's position to change to (10,5).
- Parameters
-
x | The x coordinate to move to. |
y | The y coordinate to move to. |
◆ setColor()
void setColor |
( |
string |
color | ) |
|
Sets the fill color. Call this before calling one of the draw functions.
Example: setColor("#555555")
will set the color to #555555 (dark gray).
- Parameters
-
color | The hexadecimal color code to set. |
◆ start()
Indicates the start of your drawing.