CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csImageMemory Class Reference

This class represents a block of memory in the true colour format only. More...

#include <memimage.h>

Inheritance diagram for csImageMemory:

csImageFile iImage iBase List of all members.

Public Methods

 csImageMemory (int width, int height, int format=CS_IMGFMT_TRUECOLOR)
 Create a blank image of these dimensions and the specified format. More...

 csImageMemory (int width, int height, void *buffer, bool destroy, int format=CS_IMGFMT_TRUECOLOR, csRGBpixel *palette=NULL)
 Create an iImage interface for this true colour buffer with these dimensions. More...

void Clear (const csRGBpixel &colour)
 Clears image to colour. Only works for truecolor images. More...

virtual void Rescale (int NewWidth, int NewHeight)
 Rescale the image to the given size. More...

virtual void SetKeycolor (int r, int g, int b)
 Set the keycolor. More...

virtual void ClearKeycolor ()
 Remove the keycolor. More...


Detailed Description

This class represents a block of memory in the true colour format only.

It is used with dynamic textures so that the usual method of registering and preparing textures if fulfilled. 8bit images and cropping/cloning make no sense in this context.

Definition at line 32 of file memimage.h.


Constructor & Destructor Documentation

csImageMemory::csImageMemory int    width,
int    height,
int    format = CS_IMGFMT_TRUECOLOR
 

Create a blank image of these dimensions and the specified format.

Parameters:
width  Width of the image
height  Height of the image
format  Image format. Default: CS_IMGFMT_TRUECOLOR

csImageMemory::csImageMemory int    width,
int    height,
void *    buffer,
bool    destroy,
int    format = CS_IMGFMT_TRUECOLOR,
csRGBpixel   palette = NULL
 

Create an iImage interface for this true colour buffer with these dimensions.

If destroy is set to true then the supplied buffer will be destroyed when the interfaces are.

Parameters:
width  Width of the image
height  Height of the image
buffer  Data containing initial data
destroy  Destroy the buffer when the Image is destroyed
format  Image format. Data in
palette  Palett for indexed images.


Member Function Documentation

void csImageMemory::Clear const csRGBpixel   colour
 

Clears image to colour. Only works for truecolor images.

virtual void csImageMemory::ClearKeycolor   [virtual]
 

Remove the keycolor.

virtual void csImageMemory::Rescale int    NewWidth,
int    NewHeight
[virtual]
 

Rescale the image to the given size.

Reimplemented from csImageFile.

virtual void csImageMemory::SetKeycolor int    r,
int    g,
int    b
[virtual]
 

Set the keycolor.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14