CrystalSpace

Public API Reference

csImageBase Class Reference
[Graphics]

Base class for iImage implementations. More...

#include <csgfx/imagebase.h>

Inheritance diagram for csImageBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual const uint8GetAlpha ()
 Get alpha map for 8-bit paletted image.
virtual int GetDepth () const
 Query image depth (only sensible when the image type is csimg3D).
virtual csImageType GetImageType () const
 Get the type of the contained image.
virtual void GetKeycolor (int &r, int &g, int &b) const
 Get the keycolour stored with the image.
virtual void GetKeyColor (int &, int &, int &) const
 Get the keycolour stored with the image.
virtual csRef< iImageGetMipmap (uint num)
 Return a precomputed mipmap.
virtual const char * GetName () const
 Get image file name.
virtual const csRGBpixelGetPalette ()
 Get image palette (or 0 if no palette).
virtual csRef< iDataBufferGetRawData () const
 Get the raw data of the image (or 0 if raw data is not provided).
virtual const char * GetRawFormat () const
 Get a string identifying the format of the raw data of the image (or 0 if raw data is not provided).
virtual csRef< iImageGetSubImage (uint num)
 Query a sub image.
virtual bool HasKeycolor () const
 Check if image has a keycolour stored with it.
virtual bool HasKeyColor () const
 Check if image has a keycolour stored with it.
virtual uint HasMipmaps () const
 Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps), in addition to the original image.
virtual uint HasSubImages () const
 Returns the number of sub images, in addition to this image.
virtual void SetName (const char *iName)
 Set image file name.
virtual ~csImageBase ()

Protected Member Functions

 csImageBase ()
 Create new instance.

Protected Attributes

char * fName
 Name of the image file.

Detailed Description

Base class for iImage implementations.

Cannot be instantiated itself.

Definition at line 44 of file imagebase.h.


Constructor & Destructor Documentation

csImageBase::csImageBase (  )  [inline, protected]

Create new instance.

Definition at line 51 of file imagebase.h.


Member Function Documentation

virtual const uint8* csImageBase::GetAlpha (  )  [inline, virtual]

Get alpha map for 8-bit paletted image.

RGBA images contains alpha within themself. If image has no alpha map, or the image is in RGBA format, this function will return 0.

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageMemory, csImageVolumeMaker, and csCommonImageFile.

Definition at line 75 of file imagebase.h.

virtual int csImageBase::GetDepth (  )  const [inline, virtual]

Query image depth (only sensible when the image type is csimg3D).

Implements iImage.

Reimplemented in csImageMemory, and csImageVolumeMaker.

Definition at line 63 of file imagebase.h.

virtual csImageType csImageBase::GetImageType (  )  const [inline, virtual]

Get the type of the contained image.

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageMemory, and csImageVolumeMaker.

Definition at line 91 of file imagebase.h.

References csimg2D.

virtual void csImageBase::GetKeycolor ( int &  r,
int &  g,
int &  b 
) const [inline, virtual]

Get the keycolour stored with the image.

Deprecated:
Use GetKeyColor() instead.

Implements iImage.

Definition at line 82 of file imagebase.h.

References GetKeyColor().

virtual void csImageBase::GetKeyColor ( int &  ,
int &  ,
int &   
) const [inline, virtual]

Get the keycolour stored with the image.

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageMemory, and csCommonImageFile.

Definition at line 81 of file imagebase.h.

Referenced by GetKeycolor().

virtual csRef<iImage> csImageBase::GetMipmap ( uint  num  )  [inline, virtual]

Return a precomputed mipmap.

num specifies which mipmap to return; 0 returns the original image, num <= the return value of HasMipmaps() returns that mipmap.

Implements iImage.

Reimplemented in csImageCubeMapMaker, and csImageMemory.

Definition at line 86 of file imagebase.h.

virtual const char* csImageBase::GetName (  )  const [inline, virtual]

Get image file name.

Implements iImage.

Reimplemented in csImageCubeMapMaker, and csImageVolumeMaker.

Definition at line 69 of file imagebase.h.

References fName.

virtual const csRGBpixel* csImageBase::GetPalette (  )  [inline, virtual]

Get image palette (or 0 if no palette).

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageMemory, csImageVolumeMaker, csScreenShot, and csCommonImageFile.

Definition at line 74 of file imagebase.h.

virtual csRef<iDataBuffer> csImageBase::GetRawData (  )  const [inline, virtual]

Get the raw data of the image (or 0 if raw data is not provided).

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageVolumeMaker, and csCommonImageFile.

Definition at line 90 of file imagebase.h.

virtual const char* csImageBase::GetRawFormat (  )  const [inline, virtual]

Get a string identifying the format of the raw data of the image (or 0 if raw data is not provided).

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageVolumeMaker, and csCommonImageFile.

Definition at line 89 of file imagebase.h.

virtual csRef<iImage> csImageBase::GetSubImage ( uint  num  )  [inline, virtual]

Query a sub image.

A value of 0 for num returns the original image, a value larger or equal than the return value of HasSubImages() returns that sub image, any other value returns 0.

Implements iImage.

Reimplemented in csImageCubeMapMaker.

Definition at line 93 of file imagebase.h.

virtual bool csImageBase::HasKeycolor (  )  const [inline, virtual]

Check if image has a keycolour stored with it.

Deprecated:
Use HasKeyColor() instead.

Implements iImage.

Definition at line 78 of file imagebase.h.

References HasKeyColor().

virtual bool csImageBase::HasKeyColor (  )  const [inline, virtual]

Check if image has a keycolour stored with it.

Implements iImage.

Reimplemented in csImageCubeMapMaker, csImageMemory, and csCommonImageFile.

Definition at line 77 of file imagebase.h.

Referenced by HasKeycolor().

virtual uint csImageBase::HasMipmaps (  )  const [inline, virtual]

Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps), in addition to the original image.

0 means there are no precomputed mipmaps.

Implements iImage.

Reimplemented in csImageCubeMapMaker, and csImageMemory.

Definition at line 85 of file imagebase.h.

virtual uint csImageBase::HasSubImages (  )  const [inline, virtual]

Returns the number of sub images, in addition to this image.

Subimages are usually used for cube map faces.

Implements iImage.

Reimplemented in csImageCubeMapMaker.

Definition at line 92 of file imagebase.h.

virtual void csImageBase::SetName ( const char *  iName  )  [inline, virtual]

Set image file name.

Implements iImage.

Reimplemented in csImageCubeMapMaker, and csImageVolumeMaker.

Definition at line 65 of file imagebase.h.

References csStrNew(), and fName.


Member Data Documentation

char* csImageBase::fName [protected]

Name of the image file.

Definition at line 49 of file imagebase.h.

Referenced by GetName(), SetName(), and ~csImageBase().


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