|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.engines.jdk12x.CComponentGraphicsEngine.CDrawableBitmap
Implementation of the drawable bitmap image for plain Java 2 graphics engine.
Field Summary | |
private int |
m_bitmapHeight
Height of the bitmap. |
private int |
m_bitmapWidth
Width of the bitmap. |
private java.awt.Rectangle |
m_clipper
Clipping region used when drawing the bitmap. |
java.awt.Graphics2D |
m_graphics
The graphics context of this image. |
private java.awt.Image |
m_image
Reference to the AWT image that represents the bitmap in this graphics engine. |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
CComponentGraphicsEngine.CDrawableBitmap(java.awt.Image image,
java.awt.Graphics2D graphics)
Constructs an drawable bitmap from the given AWT image. |
Method Summary | |
void |
blitTo(DrawableBitmap bitmap,
int x,
int y)
Draws the given bitmap to this 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. |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
The image observer method that gets updated when an image is loading. |
void |
strecthTo(DrawableBitmap bitmap,
int x,
int y,
int width,
int height)
This method traps false usage where the user tries to blit a bitmap that was not loaded by this graphics engine to a bitmap that was created by this graphics engine. |
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. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.awt.Image m_image
public java.awt.Graphics2D m_graphics
private int m_bitmapWidth
private int m_bitmapHeight
private java.awt.Rectangle m_clipper
Constructor Detail |
CComponentGraphicsEngine.CDrawableBitmap(java.awt.Image image, java.awt.Graphics2D graphics)
image
- The image that this bitmap represents.Method Detail |
public void blitTo(int x, int y)
blitTo
in interface DrawableBitmap
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)
strecthTo
in interface DrawableBitmap
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 of the destination where the image is drawn to.height
- The height of the destination where the image is drawn to.public void blitTo(DrawableBitmap bitmap, int x, int y)
blitTo
in interface DrawableBitmap
bitmap
- The bitmap that will be drawn to this bitmap.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)
strecthTo
in interface DrawableBitmap
bitmap
- The bitmap that will be drawn to this bitmap.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 of the destination where the image is drawn to.height
- The height of the destination where the image is drawn to.public int getWidth()
getWidth
in interface DrawableBitmap
public int getHeight()
getHeight
in interface DrawableBitmap
public void finalize()
finalize
in interface DrawableBitmap
finalize
in class java.lang.Object
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |