jcontrol.io
Interface Drawable

All Known Subinterfaces:
Image
All Known Implementing Classes:
BufferedImage, ResourceImage

public interface Drawable

Defines Object-behaviour for use with Display.drawImage().


Method Summary
 void draw(Graphics g, int x, int y)
          Draws the Object at defined position with its natural size.
 void draw(Graphics g, int x, int y, int w, int h, int xoff, int yoff)
          Draws the Object at defined position, dimension and offset.
 

Method Detail

draw

void draw(Graphics g,
          int x,
          int y)
Draws the Object at defined position with its natural size.

Parameters:
g - the Graphics to use
x - koordinate
y - koordinate

draw

void draw(Graphics g,
          int x,
          int y,
          int w,
          int h,
          int xoff,
          int yoff)
Draws the Object at defined position, dimension and offset. Offset could be ignored by some implementations.

Parameters:
g - the Graphics to use
x - koordinate
y - koordinate
w - width
h - height
xoff - offset
yoff - offset