Blender V2.61 - r43446
|
#include <GPC_RawImage.h>
Public Types | |
enum | TImageAlignment { alignTopLeft, alignBottomRight } |
Public Member Functions | |
GPC_RawImage () | |
virtual bool | Load (const char *srcName, int destWidth, int destHeight, TImageAlignment alignment=alignTopLeft, int offsetX=0, int offsetY=0) |
virtual int | Width () const |
virtual int | Height () const |
virtual unsigned char * | Data () const |
virtual int | DataSize () const |
Protected Attributes | |
unsigned char * | m_data |
int | m_dataSize |
int | m_width |
int | m_height |
This memory resource reads images from the application resources. Images are expected to be stored as raw RGBA bytes. You can generate these images by exporting images with an alpha channel from Photoshop in RAW format with interleaved channels.
Definition at line 42 of file GPC_RawImage.h.
Definition at line 47 of file GPC_RawImage.h.
GPC_RawImage::GPC_RawImage | ( | ) |
Definition at line 40 of file GPC_RawImage.cpp.
virtual unsigned char* GPC_RawImage::Data | ( | ) | const [inline, virtual] |
Returns a pointer to the data loaded from the resource.
Definition at line 93 of file GPC_RawImage.h.
References m_data.
virtual int GPC_RawImage::DataSize | ( | ) | const [inline, virtual] |
Returns the size of the data loaded from the resource.
Definition at line 102 of file GPC_RawImage.h.
References m_dataSize.
virtual int GPC_RawImage::Height | ( | ) | const [inline, virtual] |
Returns the height of the image.
Definition at line 84 of file GPC_RawImage.h.
References m_height.
bool GPC_RawImage::Load | ( | const char * | srcName, |
int | destWidth, | ||
int | destHeight, | ||
TImageAlignment | alignment = alignTopLeft , |
||
int | offsetX = 0 , |
||
int | offsetY = 0 |
||
) | [virtual] |
Loads the image form the resource into memory. Converts size of the image and places it with given alignment.
hInstApp | The application's instance (location of the resources). |
lpName | Name of the resource. |
lpType | Type of the resource. |
srcWidth | The width of the resource image. |
srcHeight | The height of the resource image. |
width | The width of the image created. |
height | The height of the image created. |
alignment | How the resource image is located in the image created. |
offsetX | Amount of horzontal offset applied to the resource image. |
offsetY | Amount of vertical offset applied to the resource image. |
Definition at line 46 of file GPC_RawImage.cpp.
References alignTopLeft, GetRawBlender3DLogo(), GetRawBlenderLogo(), m_data, m_height, and m_width.
Referenced by GPC_Engine::GPC_Engine().
virtual int GPC_RawImage::Width | ( | ) | const [inline, virtual] |
Returns the width of the image.
Definition at line 75 of file GPC_RawImage.h.
References m_width.
unsigned char* GPC_RawImage::m_data [protected] |
Disposes the data stored at the m_data member.
Definition at line 114 of file GPC_RawImage.h.
int GPC_RawImage::m_dataSize [protected] |
Definition at line 115 of file GPC_RawImage.h.
Referenced by DataSize().
int GPC_RawImage::m_height [protected] |
Definition at line 117 of file GPC_RawImage.h.
int GPC_RawImage::m_width [protected] |
Definition at line 116 of file GPC_RawImage.h.