Class LayerRenderer

java.lang.Object
games.stendhal.client.LayerRenderer
Direct Known Subclasses:
EffectLayer, EmptyLayerRenderer, WeatherLayerRenderer

public abstract class LayerRenderer extends Object
This is a helper base class to render a layer.
  • Field Details

    • width

      protected int width
    • height

      protected int height
  • Constructor Details

    • LayerRenderer

      public LayerRenderer()
  • Method Details

    • getWidth

      public int getWidth()
      Returns:
      the width in world units
    • getHeight

      public int getHeight()
      Returns:
      the height in world units
    • draw

      public abstract void draw(Graphics g, int x, int y, int w, int h)
      Render the layer.
      Parameters:
      g - The graphics to draw to
      x - starting x coordinate in world units
      y - starting y coordinate in world units
      w - width in world units
      h - height in world units
    • setTileset

      public abstract void setTileset(Tileset tileset)
      Set the tiles used for rendering.
      Parameters:
      tileset - tile set