Class TriangleTurtle
java.lang.Object
SpritePixels
TriangleTurtle
public class TriangleTurtle
- extends SpritePixels
This class provides the turtle's appearance, the array of pixels
that make up its image. In this case, the image is an isoseles
triangle - the original standard Logo turtle.
Constructor Summary |
TriangleTurtle(java.awt.Color color,
double heading)
|
TriangleTurtle(int width,
int height,
java.awt.Color color,
double heading)
|
Method Summary |
protected void |
initSpritePixels(int turtleSideSize)
Initialize the turtle's pixels, an isosceles triangle, into the
provided int[] turtlePixels. |
Methods inherited from class SpritePixels |
getHeight, getMinimumHeight, getMinimumWidth, getPixels, getSideSize, getWidth, setCirclePixels, setLinePixels, setPixel, setSpriteColor, setSpriteHeading |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TriangleTurtle
public TriangleTurtle(java.awt.Color color,
double heading)
TriangleTurtle
public TriangleTurtle(int width,
int height,
java.awt.Color color,
double heading)
initSpritePixels
protected void initSpritePixels(int turtleSideSize)
- Initialize the turtle's pixels, an isosceles triangle, into the
provided int[] turtlePixels. SpritePixels EXPECTS/REQUIRES the
image to be on its side, pointing RIGHT/EAST, aligned with the
positive X-axis, a heading of mathematical 0 degrees (not to be
confused with TurtleSpace's coordinate system where 0 degrees
is UP/NORTH, the positive Y-axis).
- Overrides:
initSpritePixels
in class SpritePixels