de.yaina.trackrenderer
Class TileCanvas

java.lang.Object
  extended by de.yaina.trackrenderer.TileCollection
      extended by de.yaina.trackrenderer.TileCanvas
Direct Known Subclasses:
DrawCanvas

public class TileCanvas
extends TileCollection

A canvas of a tiled image, takes care of coordinates exceeding the limits of a tile and adjusts the values accordingly.


Constructor Summary
TileCanvas(int tileDimX, int tileDimY)
           
 
Method Summary
 byte getPoint(TileCoordinates point)
          Get a point (a single dot) from the image
 void setPoint(TileCoordinates point, byte colour)
          Set a point (a single dot) on the image
 
Methods inherited from class de.yaina.trackrenderer.TileCollection
getCollection, getDimensionX, getDimensionY, getImage, getTile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TileCanvas

public TileCanvas(int tileDimX,
                  int tileDimY)
Parameters:
tileDimX - horizontal size of a tile
tileDimY - vertical size of a tile
Method Detail

setPoint

public void setPoint(TileCoordinates point,
                     byte colour)
Description copied from class: TileCollection
Set a point (a single dot) on the image

Overrides:
setPoint in class TileCollection
Parameters:
point - tile and coordinates of the point
colour - colour index of the point

getPoint

public byte getPoint(TileCoordinates point)
Description copied from class: TileCollection
Get a point (a single dot) from the image

Overrides:
getPoint in class TileCollection
Parameters:
point - tile and coordinates of the point
Returns:
colour index of the point