|
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.jdk11x.CComponentGraphicsEngine.CBitmap
Implementation of the bitmap image for plain Java 1.1 graphics engine.
Field Summary | |
(package private) int |
m_bitmapHeight
Height of the bitmap. |
(package private) int |
m_bitmapWidth
Width of the bitmap. |
(package private) java.awt.Rectangle |
m_clipper
Clipping region used when drawing the bitmap with clipping. |
(package 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.CBitmap(java.awt.Image image)
Constructs a bitmap control object 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 |
clipTo(DrawableBitmap bitmap,
int x,
int y,
int width,
int height)
Draws the bitmap to the given drawable bitmap at the given location. |
void |
finalize()
Frees all the resources that are used by the bitmap implementation. |
Bitmap |
getClone(BitmapEffect effect)
Returns an effect processed clone of this bitmap. |
int |
getHeight()
Returns the height of the bitmap. |
Bitmap |
getSubBitmap(int srcX,
int srcY,
int srcWidth,
int srcHeight)
Returns a bitmap that represents a part of this bitmap by using a new control object, but using the old bitmap data (saves memory, but is not that fast on many platforms. |
Bitmap |
getSubBitmapClone(int srcX,
int srcY,
int srcWidth,
int srcHeight)
Returns a bitmap that represents a part of this 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 |
java.awt.Image m_image
int m_bitmapWidth
int m_bitmapHeight
java.awt.Rectangle m_clipper
Constructor Detail |
CComponentGraphicsEngine.CBitmap(java.awt.Image image)
image
- The image that this bitmap represents.Method Detail |
public void clipTo(DrawableBitmap bitmap, int x, int y, int width, int height)
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 width of the clipping rectangle that starts from the drawing location.height
- The height of the clipping rectangle that starts from the drawing location.public void blitTo(int x, int y)
blitTo
in interface 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(int x, int y, int width, int height)
strecthTo
in interface 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 void blitTo(DrawableBitmap bitmap, int x, int y)
blitTo
in interface Bitmap
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 Bitmap
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 Bitmap
public int getHeight()
getHeight
in interface Bitmap
public Bitmap getClone(BitmapEffect effect) throws GameFrameException
getClone
in interface Bitmap
effect
- The effect to be applied to the clone bitmap,
or null if none are to be applied.GameFrameException
- thrown if any errors occur.public Bitmap getSubBitmapClone(int srcX, int srcY, int srcWidth, int srcHeight) throws GameFrameException
getSubBitmapClone
in interface Bitmap
srcX
- The area of the bitmap to be returned as a new bitmap.srcY
- The area of the bitmap to be returned as a new bitmap.srcWidth
- The area of the bitmap to be returned as a new bitmap.srcHeight
- The area of the bitmap to be returned as a new bitmap.public Bitmap getSubBitmap(int srcX, int srcY, int srcWidth, int srcHeight) throws GameFrameException
getSubBitmap
in interface Bitmap
srcX
- The area of the bitmap to be returned as a new bitmap.srcY
- The area of the bitmap to be returned as a new bitmap.srcWidth
- The area of the bitmap to be returned as a new bitmap.srcHeight
- The area of the bitmap to be returned as a new bitmap.public void finalize()
finalize
in interface Bitmap
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 |