Modifier and Type | Class and Description |
---|---|
static class |
TurtleDraw.Compound
Combines multiple draw commands into one operation.
|
static class |
TurtleDraw.Forward
Draw forward by a specified amount and move the turtle to the new
location.
|
static class |
TurtleDraw.Move
Move the turtle by a certain amount without drawing anything.
|
static class |
TurtleDraw.Pop
Pop a stored position and heading off of the turtle's stack.
|
static class |
TurtleDraw.Push
Push the current position and heading onto the turtle's stack.
|
static class |
TurtleDraw.Turn
Rotate the turtle by a specified amount.
|
Constructor and Description |
---|
TurtleDraw() |
Modifier and Type | Method and Description |
---|---|
static TurtleDrawCommand |
c(TurtleDrawCommand... commands)
Shorthand to combine commands.
|
static TurtleDraw.Forward |
forward(float drawLength)
Creates a draw forward command.
|
static TurtleDraw.Pop |
pop()
Creates a new Pop.
|
static TurtleDraw.Push |
push()
Creates a new Push.
|
static TurtleDraw.Turn |
turn(float theta)
Creates a rotate command.
|
public static TurtleDraw.Forward forward(float drawLength)
drawLength
- the amount to draw forwardpublic static TurtleDraw.Turn turn(float theta)
theta
- the amount to rotate in radianspublic static TurtleDraw.Push push()
public static TurtleDraw.Pop pop()
public static TurtleDrawCommand c(TurtleDrawCommand... commands)
commands
- the commands to be combinedProcessing Library loom by Cora Johnson-Roberson. (c) 2014-2016