CrystalSpace

Public API Reference

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

csImageMemory Class Reference

Memory image. 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.

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

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

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

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

virtual void ClearKeycolor ()
 Remove the keycolor.


Protected Methods

virtual void FreeImage ()
 Free all image data: pixels and palette.


Detailed Description

Memory image.

Remarks:
Does not support cropping or cloning.

Definition at line 31 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 = 0
) 
 

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  Palette 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::FreeImage (    )  [protected, virtual]
 

Free all image data: pixels and palette.

Takes care of image data format.

Reimplemented from csImageFile.

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.18