Blender V2.61 - r43446
Public Types | Public Member Functions | Protected Attributes

GPC_RawImage Class Reference

#include <GPC_RawImage.h>

List of all members.

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

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
alignTopLeft 
alignBottomRight 

Definition at line 47 of file GPC_RawImage.h.


Constructor & Destructor Documentation

GPC_RawImage::GPC_RawImage ( )

Definition at line 40 of file GPC_RawImage.cpp.


Member Function Documentation

virtual unsigned char* GPC_RawImage::Data ( ) const [inline, virtual]

Returns a pointer to the data loaded from the resource.

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.

Returns:
The size of the 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.

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.

Parameters:
hInstAppThe application's instance (location of the resources).
lpNameName of the resource.
lpTypeType of the resource.
srcWidthThe width of the resource image.
srcHeightThe height of the resource image.
widthThe width of the image created.
heightThe height of the image created.
alignmentHow the resource image is located in the image created.
offsetXAmount of horzontal offset applied to the resource image.
offsetYAmount 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.

Returns:
The width of the image.

Definition at line 75 of file GPC_RawImage.h.

References m_width.


Member Data Documentation

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.

Referenced by Data(), and Load().

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.

Referenced by Height(), and Load().

int GPC_RawImage::m_width [protected]

Definition at line 116 of file GPC_RawImage.h.

Referenced by Load(), and Width().


The documentation for this class was generated from the following files: