xoreos  0.0.5
Public Member Functions | List of all members
Graphics::Surface Class Reference

#include <surface.h>

Inheritance diagram for Graphics::Surface:
Inheritance graph
[legend]
Collaboration diagram for Graphics::Surface:
Collaboration graph
[legend]

Public Member Functions

 Surface (int width, int height)
 
 ~Surface ()
 
int getWidth () const
 
int getHeight () const
 
int getPitch () const
 
bytegetData ()
 
const bytegetData () const
 
void fill (byte r, byte g, byte b, byte a)
 
const MipMapgetMipMap (size_t mipMap) const
 Return a mip map. More...
 
const MipMapgetMipMap () const
 Return a mip map. More...
 
MipMapgetMipMap ()
 Return a mip map. More...
 
- Public Member Functions inherited from Graphics::ImageDecoder
 ImageDecoder ()
 
 ImageDecoder (const ImageDecoder &image)
 
virtual ~ImageDecoder ()
 
ImageDecoderoperator= (const ImageDecoder &image)
 
bool isCompressed () const
 Is the image data compressed? More...
 
bool hasAlpha () const
 Does the image data have alpha? . More...
 
PixelFormat getFormat () const
 Return the image data's general format. More...
 
PixelFormatRaw getFormatRaw () const
 Return the image data's raw format. More...
 
PixelDataType getDataType () const
 Return the image data pixel's type. More...
 
size_t getMipMapCount () const
 Return the number of mip maps contained in the image. More...
 
size_t getLayerCount () const
 Return the number of layers contained in the image. More...
 
bool isCubeMap () const
 Is this image a cube map? More...
 
const MipMapgetMipMap (size_t mipMap, size_t layer=0) const
 Return a mip map. More...
 
void decompress ()
 Manually decompress the texture image data. More...
 
const TXIgetTXI () const
 Return the texture information TXI, which may be embedded in the image. More...
 
bool dumpTGA (const Common::UString &fileName) const
 Dump the image into a TGA. More...
 

Additional Inherited Members

- Protected Types inherited from Graphics::ImageDecoder
typedef Common::PtrVector< MipMapMipMaps
 
- Static Protected Member Functions inherited from Graphics::ImageDecoder
static void decompress (MipMap &out, const MipMap &in, PixelFormatRaw format)
 
- Protected Attributes inherited from Graphics::ImageDecoder
bool _compressed
 
bool _hasAlpha
 
PixelFormat _format
 
PixelFormatRaw _formatRaw
 
PixelDataType _dataType
 
size_t _layerCount
 Number of layers in this image. More...
 
bool _isCubeMap
 Is this image a cube map? A cube map always needs to have 6 layers! More...
 
MipMaps _mipMaps
 
TXI _txi
 

Detailed Description

Definition at line 32 of file surface.h.

Constructor & Destructor Documentation

◆ Surface()

Graphics::Surface::Surface ( int  width,
int  height 
)

◆ ~Surface()

Graphics::Surface::~Surface ( )

Definition at line 50 of file surface.cpp.

Member Function Documentation

◆ fill()

void Graphics::Surface::fill ( byte  r,
byte  g,
byte  b,
byte  a 
)

Definition at line 69 of file surface.cpp.

References Graphics::ImageDecoder::_mipMaps.

Referenced by Graphics::Aurora::PLTFile::load(), and Graphics::Aurora::TTFFont::Page::Page().

Here is the caller graph for this function:

◆ getData() [1/2]

byte * Graphics::Surface::getData ( )

◆ getData() [2/2]

const byte * Graphics::Surface::getData ( ) const

Definition at line 65 of file surface.cpp.

References Graphics::ImageDecoder::_mipMaps.

◆ getHeight()

int Graphics::Surface::getHeight ( ) const

Definition at line 57 of file surface.cpp.

References Graphics::ImageDecoder::_mipMaps.

Referenced by Video::VPXDecoder::decodeFrame(), and Graphics::TTFRenderer::drawCharacter().

Here is the caller graph for this function:

◆ getMipMap() [1/3]

const ImageDecoder::MipMap & Graphics::Surface::getMipMap ( size_t  mipMap) const

Return a mip map.

Definition at line 85 of file surface.cpp.

References Graphics::ImageDecoder::getMipMap().

Referenced by Graphics::Aurora::ModelNode_NWN2::createTint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMipMap() [2/3]

const ImageDecoder::MipMap & Graphics::Surface::getMipMap ( ) const

Return a mip map.

Definition at line 89 of file surface.cpp.

References Graphics::ImageDecoder::_mipMaps.

◆ getMipMap() [3/3]

ImageDecoder::MipMap & Graphics::Surface::getMipMap ( )

Return a mip map.

Definition at line 93 of file surface.cpp.

References Graphics::ImageDecoder::_mipMaps.

◆ getPitch()

int Graphics::Surface::getPitch ( ) const
inline

Definition at line 39 of file surface.h.

References getWidth().

Referenced by Video::VPXDecoder::decodeFrame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWidth()

int Graphics::Surface::getWidth ( ) const

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