es.ucm.look.ar.ar2D.drawables
Class Image2D

java.lang.Object
  extended by es.ucm.look.ar.ar2D.drawables.Image2D
All Implemented Interfaces:
Drawable2D

public class Image2D
extends java.lang.Object
implements Drawable2D


Constructor Summary
Image2D(Bitmap bitmap)
           
Image2D(Bitmap bitmap, int width, int height)
           
Image2D(java.util.List<Bitmap> bitmaps, int timePerFrame, boolean loop)
           
 
Method Summary
 void draw(Canvas c)
          Draws the element in the canvas
 void drawTouchableArea(Canvas c, Paint p)
          Fills the touchable zone for the drawable only with the the given Paint.
 void update(long elapsed)
          Updates the drawable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Image2D

public Image2D(Bitmap bitmap)

Image2D

public Image2D(Bitmap bitmap,
               int width,
               int height)

Image2D

public Image2D(java.util.List<Bitmap> bitmaps,
               int timePerFrame,
               boolean loop)
Method Detail

draw

public void draw(Canvas c)
Description copied from interface: Drawable2D
Draws the element in the canvas

Specified by:
draw in interface Drawable2D
Parameters:
c - the canvas

drawTouchableArea

public void drawTouchableArea(Canvas c,
                              Paint p)
Description copied from interface: Drawable2D
Fills the touchable zone for the drawable only with the the given Paint. This method is used processing screen touches. It can be empty if drawable is not receiving touch events

Specified by:
drawTouchableArea in interface Drawable2D
Parameters:
c - the canvas
p - the paint

update

public void update(long elapsed)
Description copied from interface: Drawable2D
Updates the drawable

Specified by:
update in interface Drawable2D
Parameters:
elapsed - elapsed time since last updated