|
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.msjava4x.CBitmapBase | +--gameframe.engines.msjava4x.CDDAlphaBitmap
Implementation of the transparent bitmap image for the Microsoft Java DirectX platform.
Field Summary | |
private byte |
m_alphaKeyBlue
blue alpha key component. |
private byte |
m_alphaKeyGreen
Green alpha key component. |
private byte |
m_alphaKeyRed
Red alpha key component. |
Fields inherited from class gameframe.engines.msjava4x.CBitmapBase |
m_backBufferHeight, m_backBufferWidth, m_bitmapStorage, m_dd, m_ddBackBuffer, m_ddSurface, m_fInVideoMem, m_height, m_srcRectangle, m_srcRectFromOriginBitmap, m_strOriginBitmapFilename, m_superBitmap, m_width, mStatic_dstRectangle, mStatic_tempFiles |
Constructor Summary | |
(package private) |
CDDAlphaBitmap(gameframe.engines.msjava4x.DirectDraw dd,
gameframe.engines.msjava4x.DirectDrawSurface ddBackBuffer,
gameframe.engines.msjava4x.DirectDrawSurface ddSurface,
int width,
int height,
IBitmapStorage bitmapStorage,
java.lang.String strOriginFile,
byte alphaKeyRed,
byte alphaKeyGreen,
byte alphaKeyBlue)
Constructs a bitmap from the given paramters. |
(package private) |
CDDAlphaBitmap(gameframe.engines.msjava4x.DirectDraw dd,
gameframe.engines.msjava4x.DirectDrawSurface ddBackBuffer,
gameframe.engines.msjava4x.DirectDrawSurface ddSurface,
int width,
int height,
IBitmapStorage bitmapStorage,
java.lang.String strOriginFile,
gameframe.engines.msjava4x.Rect originRect,
byte alphaKeyRed,
byte alphaKeyGreen,
byte alphaKeyBlue)
Constructs a bitmap from the given paramters. |
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()
Releases all resources held by this bitmap representation. |
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 resulting bitmap is not that fast to blit on many platforms, on the platforms where this method is really too slow for interactive use the implementation might actually copy the data as with the getSubBitmapClose() method to speed things up to interactive level). |
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. |
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. |
Methods inherited from class gameframe.engines.msjava4x.CBitmapBase |
getData, getEffectSurface, getSurfaceFromData, restore, setDataToSurface |
Methods inherited from class java.lang.Object |
|
Field Detail |
private byte m_alphaKeyRed
private byte m_alphaKeyGreen
private byte m_alphaKeyBlue
Constructor Detail |
CDDAlphaBitmap(gameframe.engines.msjava4x.DirectDraw dd, gameframe.engines.msjava4x.DirectDrawSurface ddBackBuffer, gameframe.engines.msjava4x.DirectDrawSurface ddSurface, int width, int height, IBitmapStorage bitmapStorage, java.lang.String strOriginFile, byte alphaKeyRed, byte alphaKeyGreen, byte alphaKeyBlue)
dd
- The DirectDraw object that can create new DD surfaces.ddSurface
- The DirectDraw surface this bitmap class represents.width
- Width of the DirectDraw surface this bitmap class represents.height
- Height of the DirectDraw surface this bitmap class represents.bitmapStorage
- The storage that stores all bitmaps created by this bitmap.strOriginFile
- The originating bitmap file.CDDAlphaBitmap(gameframe.engines.msjava4x.DirectDraw dd, gameframe.engines.msjava4x.DirectDrawSurface ddBackBuffer, gameframe.engines.msjava4x.DirectDrawSurface ddSurface, int width, int height, IBitmapStorage bitmapStorage, java.lang.String strOriginFile, gameframe.engines.msjava4x.Rect originRect, byte alphaKeyRed, byte alphaKeyGreen, byte alphaKeyBlue)
dd
- The DirectDraw object that can create new DD surfaces.ddSurface
- The DirectDraw surface this bitmap class represents.width
- Width of the DirectDraw surface this bitmap class represents.height
- Height of the DirectDraw surface this bitmap class represents.bitmapStorage
- The storage that stores all bitmaps created by this bitmap.strOriginFile
- The originating bitmap file.originRect
- The originating bitmaps rectangle that is this bitmap.Method Detail |
public void finalize()
finalize
in interface Bitmap
finalize
in class CBitmapBase
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 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 int getWidth()
getWidth
in interface Bitmap
public int getHeight()
getHeight
in interface Bitmap
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.
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |