Drag[en]gine Game Engine  1.0
deImage Class Reference

Image Resource. Stores images in variable bit depth and resolution. Does not provide any kind of conversation just storage. More...

#include <deImage.h>

Inheritance diagram for deImage:
deFileResource deResource deObject

Public Member Functions

Management
int GetWidth () const
 
int GetHeight () const
 
int GetDepth () const
 
int GetComponentCount () const
 
int GetBitCount () const
 
sGrayscale8GetDataGrayscale8 () const
 
sGrayscale16GetDataGrayscale16 () const
 
sGrayscale32GetDataGrayscale32 () const
 
sGrayscaleAlpha8GetDataGrayscaleAlpha8 () const
 
sGrayscaleAlpha16GetDataGrayscaleAlpha16 () const
 
sGrayscaleAlpha32GetDataGrayscaleAlpha32 () const
 
sRGB8GetDataRGB8 () const
 
sRGB16GetDataRGB16 () const
 
sRGB32GetDataRGB32 () const
 
sRGBA8GetDataRGBA8 () const
 
sRGBA16GetDataRGBA16 () const
 
sRGBA32GetDataRGBA32 () const
 
void * GetData () const
 
bool GetHasCreatedTexture () const
 
void CreateTexture ()
 
void DropAlpha ()
 
System Peers
deBaseGraphicImageGetGraphicImage () const
 
void SetGraphicImage (deBaseGraphicImage *image)
 
Special
void FinalizeConstruction (int width, int height, int depth, int componentCount, int bitCount)
 Finalize construction for internal loading. More...
 
- Public Member Functions inherited from deFileResource
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Create file resource. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deImage (deImageManager *manager, deVirtualFileSystem *vfs, const char *filename, int width, int height, int depth, int componentCount, int bitCount)
 
 deImage (deImageManager *manager, deVirtualFileSystem *vfs, const char *filename, decXpmImage *image)
 
 deImage (deImageManager *manager, deVirtualFileSystem *vfs, const char *filename)
 Create image for internal loading. More...
 
virtual ~deImage ()
 Cleans up the image. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deFileResource
virtual ~deFileResource ()
 Clean up file resource. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Image Resource. Stores images in variable bit depth and resolution. Does not provide any kind of conversation just storage.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deImage() [1/3]

deImage::deImage ( deImageManager manager,
deVirtualFileSystem vfs,
const char *  filename,
int  width,
int  height,
int  depth,
int  componentCount,
int  bitCount 
)

Creates a new image object.

Parameters
resMgrResource manager to link to
filenameFilename of the image if present
widthWidth of the image at least 1
heightHeight of the image at least 1
componentsNumber of components ( 1 to 4 inclusive )
bitCountBit Count of each component ( 8, 16 or 32 )

◆ deImage() [2/3]

deImage::deImage ( deImageManager manager,
deVirtualFileSystem vfs,
const char *  filename,
decXpmImage image 
)

Creates a new image object from an XPM image.

◆ deImage() [3/3]

deImage::deImage ( deImageManager manager,
deVirtualFileSystem vfs,
const char *  filename 
)

Create image for internal loading.

Warning
This is a special internal constructor. Never ever call this on your own!

◆ ~deImage()

virtual deImage::~deImage ( )
protectedvirtual

Cleans up the image.

Member Function Documentation

◆ CreateTexture()

void deImage::CreateTexture ( )

Create the texture for this image or update it.

◆ DropAlpha()

void deImage::DropAlpha ( )

Drops the alpha data.

◆ FinalizeConstruction()

void deImage::FinalizeConstruction ( int  width,
int  height,
int  depth,
int  componentCount,
int  bitCount 
)

Finalize construction for internal loading.

Warning
This is a special internal constructor. Never ever call this on your own!

◆ GetBitCount()

int deImage::GetBitCount ( ) const
inline

Retrieves the bit count of each component.

◆ GetComponentCount()

int deImage::GetComponentCount ( ) const
inline

Retrieves the number of components.

◆ GetData()

void* deImage::GetData ( ) const
inline

Retrieves the image data pointer directly. This is a very dangerous function. Use it only if you rellay know what you are doing.

◆ GetDataGrayscale16()

sGrayscale16* deImage::GetDataGrayscale16 ( ) const

Retrieves the 16-bit Grayscale image data.

◆ GetDataGrayscale32()

sGrayscale32* deImage::GetDataGrayscale32 ( ) const

Retrieves the 32-bit Grayscale image data.

◆ GetDataGrayscale8()

sGrayscale8* deImage::GetDataGrayscale8 ( ) const

Retrieves the 8-bit Grayscale image data.

◆ GetDataGrayscaleAlpha16()

sGrayscaleAlpha16* deImage::GetDataGrayscaleAlpha16 ( ) const

Retrieves the 16-bit Grayscale-Alpha image data.

◆ GetDataGrayscaleAlpha32()

sGrayscaleAlpha32* deImage::GetDataGrayscaleAlpha32 ( ) const

Retrieves the 32-bit Grayscale-Alpha image data.

◆ GetDataGrayscaleAlpha8()

sGrayscaleAlpha8* deImage::GetDataGrayscaleAlpha8 ( ) const

Retrieves the 8-bit Grayscale-Alpha image data.

◆ GetDataRGB16()

sRGB16* deImage::GetDataRGB16 ( ) const

Retrieves the 16-bit RGB image data.

◆ GetDataRGB32()

sRGB32* deImage::GetDataRGB32 ( ) const

Retrieves the 32-bit RGB image data.

◆ GetDataRGB8()

sRGB8* deImage::GetDataRGB8 ( ) const

Retrieves the 8-bit RGB image data.

◆ GetDataRGBA16()

sRGBA16* deImage::GetDataRGBA16 ( ) const

Retrieves the 16-bit RGBA image data.

◆ GetDataRGBA32()

sRGBA32* deImage::GetDataRGBA32 ( ) const

Retrieves the 32-bit RGBA image data.

◆ GetDataRGBA8()

sRGBA8* deImage::GetDataRGBA8 ( ) const

Retrieves the 8-bit RGBA image data.

◆ GetDepth()

int deImage::GetDepth ( ) const
inline

Retrieves the depth in pixels.

◆ GetGraphicImage()

deBaseGraphicImage* deImage::GetGraphicImage ( ) const
inline

Retrieves the graphic system peer object.

◆ GetHasCreatedTexture()

bool deImage::GetHasCreatedTexture ( ) const
inline

Determines if the texture of this image has already been created.

◆ GetHeight()

int deImage::GetHeight ( ) const
inline

Retrieves the height in pixels.

◆ GetWidth()

int deImage::GetWidth ( ) const
inline

Retrieves the width in pixels.

◆ SetGraphicImage()

void deImage::SetGraphicImage ( deBaseGraphicImage image)

Sets the graphic system peer object.


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