TurtleGraphics
Class WiggleRainbowPen
java.lang.Object
TurtleGraphics.AbstractPen
TurtleGraphics.StandardPen
TurtleGraphics.WigglePen
TurtleGraphics.WiggleRainbowPen
- All Implemented Interfaces:
- Pen
public class WiggleRainbowPen
- extends WigglePen
Copyright 2006 by Ken Lambert and Martin Osborne.
Provides behavior for a pen with wiggles and random colors (combines the
behavior of WigglePen and RainbowPen).
Method Summary |
void |
drawString(java.lang.String str)
Action: Draws the string at the pen's position. |
void |
move(double distance)
Action: The pen moves the specified distance in the current direction. |
void |
move(double x,
double y)
Action: Moves the pen to the position (x, y). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WiggleRainbowPen
public WiggleRainbowPen()
WiggleRainbowPen
public WiggleRainbowPen(SketchPad pad,
int wiggles,
double wiggleAngle)
WiggleRainbowPen
public WiggleRainbowPen(SketchPadWindow w)
drawString
public void drawString(java.lang.String str)
- Description copied from interface:
Pen
- Action: Draws the string at the pen's position.
- Specified by:
drawString
in interface Pen
- Overrides:
drawString
in class StandardPen
move
public void move(double distance)
- Description copied from interface:
Pen
- Action: The pen moves the specified distance in the current direction.
The distance can be an integer or floating-point number and is measured
in pixels (picture elements). The size of a pixel depends on the
monitorŐs resolution. For instance, when we say that a monitor's
resolution is 800 by 600, we mean that the monitor is 800 pixels wide
and 600 pixels high.
- Specified by:
move
in interface Pen
- Overrides:
move
in class WigglePen
move
public void move(double x,
double y)
- Description copied from interface:
Pen
- Action: Moves the pen to the position (x, y).
- Specified by:
move
in interface Pen
- Overrides:
move
in class WigglePen