csImageBase Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
csImageBase Class Reference
Graphics

Base class for iImage implementations. More...

`#include <csgfx/imagebase.h>`

Inheritance diagram for csImageBase:

List of all members.

## Public Member Functions
virtual const uint8 * | GetAlpha ()
| Get alpha map for 8-bit paletted image.
csRef< iDataBuffer > | GetCookedImageData ()
| Return the "cooked" image data (the image data into which an image of non-"special" format may be processed).
const char * | GetCookedImageFormat ()
| Return the "cooked" format of the image data (a non-"special" format into which image data may be processed).
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 &, int &, int &) const
| Get the keycolour stored with the image.
virtual csRef< iImage > | GetMipmap (uint num)
| Return a precomputed mipmap.
virtual const char * | GetName () const
| Get image file name.
virtual const csRGBpixel * | GetPalette ()
| Get image palette (or 0 if no palette)
virtual csRef< iImage > | GetSubImage (uint num)
| Query a sub image.
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.
## 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 43 of file imagebase.h.

## Constructor & Destructor Documentation

csImageBase::csImageBase | ( |  | ) | `[inline, protected]`

Create new instance.

Definition at line 50 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 csImageMemory, csCommonImageFile, csImageVolumeMaker, and csImageCubeMapMaker.

Definition at line 74 of file imagebase.h.

csRef<iDataBuffer> csImageBase::GetCookedImageData | ( |  | ) | `[inline, virtual]`

Return the "cooked" image data (the image data into which an image of non-"special" format may be processed).

See also:
  Texture format strings

Implements iImage.

Definition at line 94 of file imagebase.h.

const char* csImageBase::GetCookedImageFormat | ( |  | ) | `[inline, virtual]`

Return the "cooked" format of the image data (a non-"special" format into which image data may be processed).

See also:
  Texture format strings

Implements iImage.

Definition at line 93 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 62 of file imagebase.h.

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

Get the type of the contained image.

Implements iImage.

Reimplemented in csImageMemory, csImageVolumeMaker, and csImageCubeMapMaker.

Definition at line 88 of file imagebase.h.

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

Get the keycolour stored with the image.

Implements iImage.

Reimplemented in csCommonImageFile, csImageMemory, and csImageCubeMapMaker.

Definition at line 78 of file imagebase.h.

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 csImageMemory, and csImageCubeMapMaker.

Definition at line 81 of file imagebase.h.

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

Get image file name.

Implements iImage.

Reimplemented in csImageVolumeMaker, and csImageCubeMapMaker.

Definition at line 68 of file imagebase.h.

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

Get image palette (or 0 if no palette)

Implements iImage.

Reimplemented in csImageMemory, csCommonImageFile, csImageVolumeMaker, and csImageCubeMapMaker.

Definition at line 73 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 90 of file imagebase.h.

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

Check if image has a keycolour stored with it.

Implements iImage.

Reimplemented in csImageMemory, csCommonImageFile, and csImageCubeMapMaker.

Definition at line 76 of file imagebase.h.

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 csImageMemory, and csImageCubeMapMaker.

Definition at line 80 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 89 of file imagebase.h.

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

Set image file name.

Implements iImage.

Reimplemented in csImageVolumeMaker, and csImageCubeMapMaker.

Definition at line 64 of file imagebase.h.

## Member Data Documentation

char* csImageBase::fName`[protected]`

Name of the image file.

Definition at line 48 of file imagebase.h.

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

- csgfx/imagebase.h