ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <pcx.h>

Inheritance diagram for Image::PCXDecoder:
Collaboration diagram for Image::PCXDecoder:

List of all members.

Public Member Functions

 PCXDecoder ()
virtual ~PCXDecoder ()
void destroy ()
 Destroy this decoder's surface and palette.
virtual bool loadStream (Common::SeekableReadStream &stream)
 Load an image from the specified stream.
virtual const Graphics::SurfacegetSurface () const
 Get the decoded surface.
const bytegetPalette () const
 Get the decoded palette.
uint16 getPaletteColorCount () const
 Return the number of colors in the palette.

Private Member Functions

void decodeRLE (Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerScanline, bool compressed)

Private Attributes

Graphics::Surface_surface
byte_palette
uint16 _paletteColorCount

Detailed Description

Definition at line 44 of file pcx.h.


Constructor & Destructor Documentation

Image::PCXDecoder::PCXDecoder (  ) 

Definition at line 39 of file pcx.cpp.

Image::PCXDecoder::~PCXDecoder (  )  [virtual]

Definition at line 45 of file pcx.cpp.


Member Function Documentation

void Image::PCXDecoder::decodeRLE ( Common::SeekableReadStream stream,
byte dst,
uint32  bytesPerScanline,
bool  compressed 
) [private]

Definition at line 194 of file pcx.cpp.

void Image::PCXDecoder::destroy (  )  [virtual]

Destroy this decoder's surface and palette.

This should be called by a loadStream() implementation as well as the destructor.

Implements Image::ImageDecoder.

Definition at line 49 of file pcx.cpp.

const byte* Image::PCXDecoder::getPalette (  )  const [inline, virtual]

Get the decoded palette.

This palette is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

The palette's format is the same as PaletteManager's palette (interleaved RGB values).

Returns:
the decoded palette, or undefined if no palette is present

Reimplemented from Image::ImageDecoder.

Definition at line 53 of file pcx.h.

uint16 Image::PCXDecoder::getPaletteColorCount (  )  const [inline, virtual]

Return the number of colors in the palette.

Reimplemented from Image::ImageDecoder.

Definition at line 54 of file pcx.h.

virtual const Graphics::Surface* Image::PCXDecoder::getSurface (  )  const [inline, virtual]

Get the decoded surface.

This surface is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

Returns:
the decoded surface, or 0 if no surface is present

Implements Image::ImageDecoder.

Definition at line 52 of file pcx.h.

bool Image::PCXDecoder::loadStream ( Common::SeekableReadStream stream  )  [virtual]

Load an image from the specified stream.

loadStream() should implicitly call destroy() to free the memory of the last loadStream() call.

Parameters:
stream the input stream
Returns:
whether loading the file succeeded
See also:
getSurface
getPalette

Implements Image::ImageDecoder.

Definition at line 61 of file pcx.cpp.


Member Data Documentation

Definition at line 60 of file pcx.h.

Definition at line 61 of file pcx.h.

Definition at line 59 of file pcx.h.


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


Generated on Sat Mar 16 2019 05:06:30 for ResidualVM by doxygen 1.7.1
curved edge   curved edge