TurtleGraphics
Class Command

java.lang.Object
  extended by TurtleGraphics.Command
Direct Known Subclasses:
CommandDrawLine, CommandDrawString, CommandSetColor, CommandSetPenWidth

public abstract class Command
extends java.lang.Object

Copyright 2006 by Ken Lambert and Martin Osborne.


Constructor Summary
Command()
           
 
Method Summary
protected  double adjustX(double x, int width)
           
protected  double adjustY(double y, int height)
           
abstract  void doCommand(java.awt.Graphics2D g, int width, int height)
           
protected  int round(double x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()
Method Detail

doCommand

public abstract void doCommand(java.awt.Graphics2D g,
                               int width,
                               int height)

adjustX

protected double adjustX(double x,
                         int width)

adjustY

protected double adjustY(double y,
                         int height)

round

protected int round(double x)