Method Summary |
---|
void | backward(double step) Moves the Turtle backwards. |
void | bye() Closes and exits the program. |
void | clear() Clears the screen to white. |
void | clear(java.lang.String color) Clears the screen to a color. |
void | delay(int t) Pauses the program. |
double | distance(double x, double y) Gets the distance between the Turtle's position and another specified position. |
void | dot() Places a dot at the Turtle's present position. |
void | dot(double size) Places a dot at the Turtle's present position. |
void | dot(double size, java.lang.String color) Places a dot at the Turtle's present position. |
void | dot(java.lang.String color) Places a dot at the Turtle's present position. |
void | down() Lowers the Turtle's tail down so it will draw on the screen as it moves. |
void | face(double angle) Rotates the Turtle to a specified heading. |
void | forward(double step) Moves the Turtle forward. |
void | goTo(double x, double y) Moves the Turtle to a specified position. |
double | heading() Gets the heading. |
double | heading(double x, double y) Gets the heading if the Turtle was facing the specified position. |
void | home() Returns the Turtle to position (0,0) with a heading of 0 degrees. |
void | interactiveMode() Allows the user to type what they want the Turtle to do while the Turtle window is up. |
boolean | isDown() Checks to see if the Turtle's tail is down. |
void | left(double delta) Rotates the Turtle counterclockwise. |
static void | main(java.lang.String[] args) Turtle demo. |
void | penColor(int red, int green, int blue) Sets the color that the Turtle draws with, allows custom colors. |
void | penColor(int red, int green, int blue, int alpha) Sets the color that the Turtle draws with, allows custom colors with alpha channel. |
void | penColor(java.lang.String color) Sets the color that the Turtle draws with. |
void | penSize(double size) Sets the line width that the Turtle draws. |
void | right(double delta) Rotates the Turtle clockwise. |
void | save(java.lang.String filename) Saves the screen to a PNG image. |
void | screenSize(int width, int height) Resizes the drawable area of the window. |
void | setOpacity(int alpha) Sets the opacity of the color that the Turtle draws with. |
void | speed(int t) Sets the delay in milliseconds between execution of Turtle commands. |
void | up() Picks the Turtle's tail up so it won't draw on the screen as it moves. |
void | worldCoordinates(double minx, double miny, double maxx, double maxy) Sets the what Turtle position will be at the bottom-left and the top-right of the screen. |
void | write(double x, double y, java.lang.String text, double angle) Write text on the screen. |
void | write(java.lang.String text) Write text centered a the Turtle's current position. |
void | write(java.lang.String text, double angle) Write text centered a the Turtle's current position. |
double | x() Gets the x coordinate. |
double | y() Gets the y coordinate. |