#include <RGBAImage.h>
Inherited by gedi::DynRGBAImage.
Inheritance diagram for gedi::RGBAImage:
Public Member Functions | |
RGBAImage (void) | |
~RGBAImage (void) | |
RGBAImage & | operator= (gedi::RGBAImage &rkImage) |
gedi::Error32 | LoadFromBitmap (LPSTR lpszFilename) |
gedi::Error32 | LoadFromTarga (LPSTR lpszFilename) |
void | SetColorKey (gedi::UInt8 iRed, gedi::UInt8 iGreen, gedi::UInt8 iBlue) |
void | SetWidth (gedi::UInt32 width) |
void | SetHeight (gedi::UInt32 height) |
void | SetColor (gedi::UInt32 iX, gedi::UInt32 iY, gedi::UInt8 iRed, gedi::UInt8 iGreen, gedi::UInt8 iBlue, gedi::UInt8 iAlpha) |
void | SetImageBuffer (gedi::UInt32 *pImage) |
gedi::UInt32 | GetWidth (void) |
gedi::UInt32 | GetHeight (void) |
gedi::UInt32 | GetColor (gedi::UInt32 iX, gedi::UInt32 iY) |
gedi::UInt32 * | GetImageBuffer (void) |
This is a base class from the Mirus distribution for loading .bmp or targa files. The class does NOT handle animations. This is handled by the ABO class which contains an RGBAImage object. Also, this class is general. It does not check nor require that the image is 2^n x 2^n.
gedi::RGBAImage::RGBAImage | ( | void | ) |
Constructor
gedi::RGBAImage::~RGBAImage | ( | void | ) |
Destructor
gedi::RGBAImage & gedi::RGBAImage::operator= | ( | gedi::RGBAImage & | rkImage | ) |
Assign one image to another.
rkImage | Reference to the image being assinged. |
gedi::Error32 gedi::RGBAImage::LoadFromBitmap | ( | LPSTR | lpszFilename | ) |
Load image from Windows bitmap (BMP) file
lpszFilename |
gedi::Error32 gedi::RGBAImage::LoadFromTarga | ( | LPSTR | lpszFilename | ) |
Load image from targa-type file
lpszFilename |
void gedi::RGBAImage::SetColorKey | ( | gedi::UInt8 | iRed, | |
gedi::UInt8 | iGreen, | |||
gedi::UInt8 | iBlue | |||
) |
Set the color key according to the RGB parameters.
This method sets the alpha component to zero for every pixel which is the same as the color key. As such, only the background color shows.
iRed | Red component of the color key. | |
iGreen | Green component of the color key. | |
iBlue | Blue component of the color key. |
void gedi::RGBAImage::SetWidth | ( | gedi::UInt32 | width | ) |
Set the image width.
Use of this method is somewhat dangerous since the width of the image is determined by the loaded image. Using this method does not affect the image.
width | Width of the image. |
void gedi::RGBAImage::SetHeight | ( | gedi::UInt32 | height | ) |
Set the image height.
Use of this method is somewhat dangerous since the height of the image is determined by the loaded image. Using this method does not affect the image.
height | Height of the image. |
void gedi::RGBAImage::SetColor | ( | gedi::UInt32 | iX, | |
gedi::UInt32 | iY, | |||
gedi::UInt8 | iRed, | |||
gedi::UInt8 | iGreen, | |||
gedi::UInt8 | iBlue, | |||
gedi::UInt8 | iAlpha | |||
) |
Set a pixel color a coordinate iX,iY.
iX | X coordinate. | |
iY | Y coordinate. | |
iRed | Red component. | |
iGreen | Green component. | |
iBlue | Blue component. | |
iAlpha | Alpha component. |
void gedi::RGBAImage::SetImageBuffer | ( | gedi::UInt32 * | pImage | ) |
Set (ie,replace) the image buffer to a new one.
New and old buffer must be same w x h dimension.
pImage | Pointer to the new buffer. |
gedi::UInt32 gedi::RGBAImage::GetWidth | ( | void | ) |
Get the width of the image.
gedi::UInt32 gedi::RGBAImage::GetHeight | ( | void | ) |
Get the height of the image.
gedi::UInt32 gedi::RGBAImage::GetColor | ( | gedi::UInt32 | iX, | |
gedi::UInt32 | iY | |||
) |
gedi::UInt32 * gedi::RGBAImage::GetImageBuffer | ( | void | ) |
Get pointer to image buffer.