|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines an interface to a bitmap image that can blit (draw) or strecth (scale) itself in the graphics engine's backbuffer or into drawable bitmap, but also can be blitted into. The graphics engine in question is allways the graphics engine that loaded the bitmap. The bitmap in question must be a bitmap created by the same graphics engine as this drawable bitmap. If the bitmap was created by different graphics engine the results are unpredictable. Most of the methods offered in this interface are implemented to be as fast as possible. An exception is the method getSubBitmap() that tries to minimize the memory usage to the extent that is possible (maybe even using the same bitmap data as the original bitmap but with different clipping and blitting regions).
Method Summary | |
void |
blitTo(DrawableBitmap bitmap,
int x,
int y)
Draws the bitmap to the given drawable bitmap at the given location. |
void |
blitTo(int x,
int y)
Draws the bitmap to the graphics engine that loaded it at the given location. |
void |
finalize()
Frees all the resources that are used by the bitmap implementation. |
int |
getHeight()
Returns the height of the bitmap. |
int |
getWidth()
Returns the width of the bitmap. |
void |
strecthTo(DrawableBitmap bitmap,
int x,
int y,
int width,
int height)
Draws the bitmap to the given drawable bitmap at the given location at the given size. |
void |
strecthTo(int x,
int y,
int width,
int height)
Draws the bitmap to the graphics engine that loaded it at the given location and at the given size. |
Method Detail |
public void blitTo(int x, int y)
x
- The x-coordinate of the location where the image is drawn to.y
- The y-coordinate of the location where the image is drawn to.public void strecthTo(int x, int y, int width, int height)
x
- The x-coordinate of the location where the image is drawn to.y
- The y-coordinate of the location where the image is drawn to.width
- The with that is used when drawing the image.height
- The height that is used when drawing the image.public void blitTo(DrawableBitmap bitmap, int x, int y)
bitmap
- The bitmap that will be drawn to.x
- The x-coordinate of the location where the image is drawn to.y
- The y-coordinate of the location where the image is drawn to.public void strecthTo(DrawableBitmap bitmap, int x, int y, int width, int height)
bitmap
- The bitmap that will be drawn to.x
- The x-coordinate of the location where the image is drawn to.y
- The y-coordinate of the location where the image is drawn to.width
- The with that is used when drawing the image.height
- The height that is used when drawing the image.public int getWidth()
public int getHeight()
public void finalize()
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |