org.deken.game.map.renderer
Class BaseMapRenderer

java.lang.Object
  extended by org.deken.game.map.renderer.BaseMapRenderer
All Implemented Interfaces:
MapRenderer
Direct Known Subclasses:
FreeStyleRenderer, TileMapRenderer

public abstract class BaseMapRenderer
extends java.lang.Object
implements MapRenderer

Title: BaseMapRenderer

Description: TODO

Copyright: Copyright (c) Jun 24, 2012

Version:
1.0
Author:
Gary Deken

Field Summary
protected  GameMap map
           
protected  MapSize mapSize
           
protected  int screenHeight
           
protected  int screenWidth
           
 
Constructor Summary
BaseMapRenderer(GameMap map)
           
 
Method Summary
 int getScreenHeight()
          Returns the height of the screen.
 int getScreenWidth()
          Returns the width of the screen.
protected  void renderBackground(java.awt.Graphics2D graphics, int xOffset, int yOffset, int width, int height)
           
protected  void renderGameComponents(java.awt.Graphics2D graphics)
           
 void setScreenSize(int width, int height)
          setScreenSize Sets the size of the screen, so renders the full screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deken.game.map.renderer.MapRenderer
draw, getEdgeBottom, getEdgeLeft, getEdgeRight, getEdgeTop
 

Field Detail

mapSize

protected MapSize mapSize

map

protected GameMap map

screenWidth

protected int screenWidth

screenHeight

protected int screenHeight
Constructor Detail

BaseMapRenderer

public BaseMapRenderer(GameMap map)
Method Detail

getScreenHeight

public int getScreenHeight()
Description copied from interface: MapRenderer
Returns the height of the screen.

Specified by:
getScreenHeight in interface MapRenderer
Returns:

getScreenWidth

public int getScreenWidth()
Description copied from interface: MapRenderer
Returns the width of the screen.

Specified by:
getScreenWidth in interface MapRenderer
Returns:

setScreenSize

public void setScreenSize(int width,
                          int height)
Description copied from interface: MapRenderer
setScreenSize Sets the size of the screen, so renders the full screen.

Specified by:
setScreenSize in interface MapRenderer
Parameters:
width - int
height - int

renderBackground

protected void renderBackground(java.awt.Graphics2D graphics,
                                int xOffset,
                                int yOffset,
                                int width,
                                int height)

renderGameComponents

protected void renderGameComponents(java.awt.Graphics2D graphics)