org.jtgl.gaming
Class Surface

java.lang.Object
  extended by org.jtgl.gaming.Surface
Direct Known Subclasses:
RectSurface, Sprite, TiledSurface

public abstract class Surface
extends java.lang.Object

A drawable element

Author:
Manuel Polo (manuel_polo at yahoo dot es)

Constructor Summary
Surface(int width, int height)
          Creates a new instance of Surface
 
Method Summary
abstract  void draw(JTGLGraphics g)
           
 JTGLPoint getAbsRefLocation()
           
 JTGLRect getBounds()
           
 JTGLPoint getCenterLocation()
           
 int getHeight()
           
 JTGLPoint getLocation()
           
 JTGLPoint getRefLocation()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 boolean isVisible()
           
 void move(int dx, int dy)
           
 void setAbsRefLocation(int x, int y)
           
 void setLocation(int x, int y)
           
 void setRefLocation(int xRef, int yRef)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Surface

public Surface(int width,
               int height)
Creates a new instance of Surface

Method Detail

setLocation

public void setLocation(int x,
                        int y)

setRefLocation

public void setRefLocation(int xRef,
                           int yRef)

setAbsRefLocation

public void setAbsRefLocation(int x,
                              int y)

getLocation

public JTGLPoint getLocation()

getRefLocation

public JTGLPoint getRefLocation()

getAbsRefLocation

public JTGLPoint getAbsRefLocation()

getCenterLocation

public JTGLPoint getCenterLocation()

getBounds

public JTGLRect getBounds()

move

public void move(int dx,
                 int dy)

getX

public int getX()

getY

public int getY()

getWidth

public int getWidth()

getHeight

public int getHeight()

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

draw

public abstract void draw(JTGLGraphics g)