rlgamekit.map.display
Class ASCIITilePainter

java.lang.Object
  extended by rlgamekit.map.display.AbstractTilePainter
      extended by rlgamekit.map.display.ASCIITilePainter
All Implemented Interfaces:
TilePainter

public class ASCIITilePainter
extends AbstractTilePainter

Paint an ASCII character for a map cell at a specified screen location.


Field Summary
 
Fields inherited from class rlgamekit.map.display.AbstractTilePainter
viewHeight, viewMap, viewWidth
 
Fields inherited from interface rlgamekit.map.display.TilePainter
VIEW_REMEMBERED, VIEW_VISIBLE
 
Constructor Summary
ASCIITilePainter()
           
 
Method Summary
 void paint(java.awt.Graphics gr, int layer, int mapX, int mapY, int xpos, int ypos, int tileNo)
          Paint a tile from the tile sheet at the given location.
 void setFont(java.awt.Font font, int rasterX)
          Set the font to be used for drawing.
 
Methods inherited from class rlgamekit.map.display.AbstractTilePainter
setViewMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASCIITilePainter

public ASCIITilePainter()
Method Detail

setFont

public final void setFont(java.awt.Font font,
                          int rasterX)
Set the font to be used for drawing.

Parameters:
font - The font to use.

paint

public void paint(java.awt.Graphics gr,
                  int layer,
                  int mapX,
                  int mapY,
                  int xpos,
                  int ypos,
                  int tileNo)
Paint a tile from the tile sheet at the given location.

Parameters:
gr - Graphics context to use for painting
layer - Map layer to use as source
mapX - source map x position
mapY - source map y position
xpos - x position to paint the tile
ypos - y position to paint the tile
tileNo - color and number of the tile to paint.