de.yaina.trackrenderer
Class DrawCanvas
java.lang.Object
de.yaina.trackrenderer.TileCollection
de.yaina.trackrenderer.TileCanvas
de.yaina.trackrenderer.DrawCanvas
- Direct Known Subclasses:
- MapCanvas
public class DrawCanvas
- extends TileCanvas
A tiled canvas with some supposedly higher-level drawing functions.
Constructor Summary |
DrawCanvas(int tileDimX,
int tileDimY)
Create a new canvas to draw on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DrawCanvas
public DrawCanvas(int tileDimX,
int tileDimY)
- Create a new canvas to draw on.
- Parameters:
tileDimX
- horizontal size of the tilestileDimY
- vertical size of the tiles
setPoint
public void setPoint(TileCoordinates p,
byte colour,
int pixmap)
- Sets a point on the canvas.
- Parameters:
p
- the coordinates of the pointcolour
- the index of the colourpixmap
- the index of the thickness/bitmap of the point
drawLine
public void drawLine(TileCoordinates p1,
TileCoordinates p2,
byte colour,
int pixmap)
- Draws a line on the canvas
- Parameters:
p1
- starting point of the linep2
- ending point of the linecolour
- colour index for the linepixmap
- index of the thickness/bitmap for each point