pturtle
Class HistoryTurtle

java.lang.Object
  extended by pturtle.Turtle
      extended by pturtle.HistoryTurtle

public class HistoryTurtle
extends Turtle

HistoryTurtle extends Turtle to record lines drawn in the lines array. These can be edited so as to change what has already been drawn. This class is much, much slower than the normal Turtle class.

Author:
George Bashi, Ollie Glass

Field Summary
 java.util.ArrayList<Line> lines
          The lines previously drawn
 
Fields inherited from class pturtle.Turtle
applet, drawColor, drawing, x, y
 
Constructor Summary
HistoryTurtle(processing.core.PApplet applet)
          Create a new turtle
HistoryTurtle(Turtle parent)
          Copy a turtle
 
Method Summary
 void draw()
          Draw method.
 
Methods inherited from class pturtle.Turtle
backward, forward, getDistance, getDistance, getNearest, getRotation, left, moveToward, moveToward, moveToward, moveToward, randomPenColor, right, setLocation, setPenColor, setPenColor, setRotation, strafeLeft, strafeRight, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lines

public java.util.ArrayList<Line> lines
The lines previously drawn

Constructor Detail

HistoryTurtle

public HistoryTurtle(processing.core.PApplet applet)
Create a new turtle

Parameters:
applet - the PApplet to draw to.

HistoryTurtle

public HistoryTurtle(Turtle parent)
Copy a turtle

Parameters:
parent - Turtle to copy
Method Detail

draw

public void draw()
Draw method. You shouldn't call this unless you are using PApplet.noLoop(), as Processing will do so automatically.



processing library PTurtle by George Bashi and Ollie Glass. (c) 2007