#include <Image.h>
Public Member Functions | |
Image () | |
virtual | ~Image () |
virtual void | Cleanup () |
virtual bool | Initialize (Texture *pTexture, RENDER_MODE nRenderMode) |
void | SetFrames (int nFrames, int nFramesX, int nFramesY) |
int | GetFramesX () |
int | GetFramesY () |
int | GetFrames () |
void | SetCurrentFrame (int nCurrentFrame) |
int | GetCurrentFrame () |
void | SetFramesEnabled (bool bFramesEnabled) |
bool | IsFramesEnabled () |
Protected Member Functions | |
virtual void | RenderSDL (TextureSDL *pDestTexture) |
virtual void | RenderOGL (TextureSDL *pDestTexture) |
Protected Attributes | |
int | m_nFrames |
The total number of frames that builds up this image (if the image is used without subframes this i set to 1). | |
int | m_nFramesX |
The number of horizontal frames (columns) that builds up this image (if the image is used without subframes this i set to 1). | |
int | m_nFramesY |
The number of vertical frames (rows) that builds up this image (if the image is used without subframes this i set to 1). | |
int | m_nCurrentFrame |
The current frame of this image (if the image is used without subframes this i set to 0). | |
bool | m_bFramesEnabled |
Flag indicating if frames are used by the image or not. |
Image::Image | ( | ) |
Contructor Resets all members to the default values
void Image::Cleanup | ( | ) | [virtual] |
bool Image::Initialize | ( | Texture * | pTexture, | |
RENDER_MODE | nRenderMode | |||
) | [virtual] |
Initializes the image
EpTexture | pointer to the texture that should be used by the image | |
nRenderMode | tells in wich render mode epoc is running |
Reimplemented from EPOC::GraphicsObject.
void EPOC::Image::SetFrames | ( | int | nFrames, | |
int | nFramesX, | |||
int | nFramesY | |||
) | [inline] |
Sets the number of frames in total, the number of frames horizontal and the number of frames vertical that builds up the image.
nFrames | number of frames in total | |
nFramesX | number of frames horizontal | |
nFramesY | number of frames vertical |
int EPOC::Image::GetFramesX | ( | ) | [inline] |
Returns the number of frames that builds up the image horizontally (columns)
int EPOC::Image::GetFramesY | ( | ) | [inline] |
Returns the number of frames that builds up the image vertically (rows)
int EPOC::Image::GetFrames | ( | ) | [inline] |
Returns the number of frames that builds up the image in total
void EPOC::Image::SetCurrentFrame | ( | int | nCurrentFrame | ) | [inline] |
Sets the current frame of the image
nCurrentFrame | The frame to set as current |
int EPOC::Image::GetCurrentFrame | ( | ) | [inline] |
void EPOC::Image::SetFramesEnabled | ( | bool | bFramesEnabled | ) | [inline] |
Sets a flag that tells if the image should treat the texture as a whole or as a collection of subimages
bFramesEnabled | Set to true or false |
bool EPOC::Image::IsFramesEnabled | ( | ) | [inline] |
Checks wether frames are used by the image or not
void Image::RenderSDL | ( | TextureSDL * | pDestTexture | ) | [protected, virtual] |
Renders the image in SDL mode
pDestTexture | The texture to render the image on (backbuffer) |
Reimplemented from EPOC::GraphicsObject.
void Image::RenderOGL | ( | TextureSDL * | pDestTexture | ) | [protected, virtual] |
Renders the image in OpenGL mode
pDestTexture | The texture to render the image on (backbuffer) |
Reimplemented from EPOC::GraphicsObject.
int EPOC::Image::m_nFrames [protected] |
The total number of frames that builds up this image (if the image is used without subframes this i set to 1).
int EPOC::Image::m_nFramesX [protected] |
The number of horizontal frames (columns) that builds up this image (if the image is used without subframes this i set to 1).
int EPOC::Image::m_nFramesY [protected] |
The number of vertical frames (rows) that builds up this image (if the image is used without subframes this i set to 1).
int EPOC::Image::m_nCurrentFrame [protected] |
The current frame of this image (if the image is used without subframes this i set to 0).
bool EPOC::Image::m_bFramesEnabled [protected] |
Flag indicating if frames are used by the image or not.