|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.aplu.turtle.TurtleFactory
This class provides functionality for generating images (java.awt.Image
)
of a Turtle
for any angle, color (java.awt.Color
) and size.
The following picture shows turtles for every 10 degrees in standard size and color:
Keep in mind that the angle for the standardTurtle methods are measured in radians and
anticlockwise, where 0 means facing east, in contrast to the
Playground class. The reason for this is that the Playground itself interprets the angle
and position of the turtle.
Constructor Summary | |
TurtleFactory()
|
Method Summary | |
java.awt.Image |
standardTurtle(java.awt.Color color,
double angle)
Generates the Picture of a Turtle with color , angle angle and standard size. |
java.awt.Image |
standardTurtle(java.awt.Color color,
double angle,
int size)
Generates the Picture of a Turtle with color , angle angle and size . |
java.awt.Image |
standardTurtle(double angle)
Generates the Picture of a Turtle with angle angle , standard size and standard color. |
java.awt.Image |
standardTurtle(double angle,
int size)
Generates the Picture of a Turtle with angle angle , size and standard Color. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TurtleFactory()
Method Detail |
public java.awt.Image standardTurtle(java.awt.Color color, double angle)
color
, angle angle
and standard size.
public java.awt.Image standardTurtle(java.awt.Color color, double angle, int size)
color
, angle angle
and size
.
public java.awt.Image standardTurtle(double angle)
angle
, standard size and standard color.
public java.awt.Image standardTurtle(double angle, int size)
angle
, size
and standard Color.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |