Class BoxTurtle

java.lang.Object
  extended by SpritePixels
      extended by BoxTurtle

public class BoxTurtle
extends SpritePixels

This class provides the turtle's appearance, the array of pixels that make up its image. In this case, the image is a rectangle.


Field Summary
 
Fields inherited from class SpritePixels
BLACK_OPAQUE_PIXEL, CLASS_NAME, MAX_SPRITE_HEIGHT, MAX_SPRITE_WIDTH, MIN_SPRITE_HEIGHT, MIN_SPRITE_WIDTH, ROTATE_LEFT_RIGHT, ROTATE_OFF, ROTATE_ON, ROTATE_RIGHT_LEFT
 
Constructor Summary
BoxTurtle(java.awt.Color color, double heading)
          Return a BoxTurtle Sprite with specified color and heading.
BoxTurtle(int width, int height, java.awt.Color color, double heading)
          Return a BoxTurtle Sprite with the specified dimensions, color and heading.
 
Method Summary
 int getMinimumHeight()
          Return the minimum height of this SpriteImage.
 int getMinimumWidth()
          Return the minimum width of this SpriteImage.
protected  void initSpritePixels(int turtleSideSize)
          Initialize the pixels composing the Sprite's image, a rectangle.
 
Methods inherited from class SpritePixels
getHeight, 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
 

Constructor Detail

BoxTurtle

public BoxTurtle(java.awt.Color color,
                 double heading)
Return a BoxTurtle Sprite with specified color and heading.


BoxTurtle

public BoxTurtle(int width,
                 int height,
                 java.awt.Color color,
                 double heading)
Return a BoxTurtle Sprite with the specified dimensions, color and heading.

Method Detail

getMinimumHeight

public int getMinimumHeight()
Return the minimum height of this SpriteImage. Subclasses should override this method if they support a different minimum height.

Overrides:
getMinimumHeight in class SpritePixels

getMinimumWidth

public int getMinimumWidth()
Return the minimum width of this SpriteImage. Subclasses should override this method if they support a different minimum width.

Overrides:
getMinimumWidth in class SpritePixels

initSpritePixels

protected void initSpritePixels(int turtleSideSize)
Initialize the pixels composing the Sprite's image, a rectangle.

Overrides:
initSpritePixels in class SpritePixels