Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_PNGProvider Class Reference

clanPNG="Surface Providers". More...

#include <provider_png.h>

Inheritance diagram for CL_PNGProvider:

Inheritance graph
[legend]
Collaboration diagram for CL_PNGProvider:

Collaboration graph
[legend]
List of all members.

Public Methods

CL_InputSourceget_input_source ()
 CL_PNGProvider (CL_String name, CL_InputSourceProvider *provider=NULL, bool transparent=true, bool ignore_alphachannel=false)
virtual ~CL_PNGProvider ()
 param: name - Name of the PNG file to load.param: provider - Input source provider that delivers the PNG file.param: transparent - True if a transparency color should be used.param: ignore_alphachannel - True if the alpha component should be ignored.param: trans_red - Red component of the transparency color.param: trans_green - Green component of the transparency color.param: trans_blue - blue component of the transparency color.

virtual unsigned int get_pitch () const
virtual unsigned int get_width () const
virtual unsigned int get_height () const
virtual unsigned int get_num_frames () const
 retval: A pointer that points to the beginning of the target pixel data.

virtual EPixelFormat get_pixel_format () const
virtual CL_Paletteget_palette () const
virtual unsigned int get_src_colorkey () const
virtual bool uses_src_colorkey () const
 retval: The y-offset of the surface data.

virtual bool is_indexed () const
virtual unsigned int get_red_mask () const
virtual unsigned int get_green_mask () const
virtual unsigned int get_blue_mask () const
virtual unsigned int get_alpha_mask () const
virtual unsigned int get_depth () const
virtual void* get_data () const
virtual void perform_lock ()
virtual void perform_unlock ()

Static Public Methods

CL_Surfacecreate (CL_String handle, CL_InputSourceProvider *provider=NULL, bool transparent=true, bool ignore_alphachannel=false)
void pngread_file (png_structp png_ptr, png_bytep data, png_size_t length)

Private Methods

void read_data ()
void read_data_rgb ()
void read_data_rgba ()
void read_data_grayscale ()
void read_data_grayscale_alpha ()
void read_data_palette ()

Private Attributes

CL_String filename
int locked
bool m_uses_src_colorkey
unsigned char* image
int pitch
int no_sprs
int width
int height
EPixelFormat pixel_format
bool transparent
bool ignore_alphachannel
CL_Palettepalette
bool indexed
int trans_col
int color_type
unsigned char trans_redcol
unsigned char trans_greencol
unsigned char trans_bluecol
CL_InputSourceProviderprovider
CL_InputSourceinput_source
png_structp png_ptr
png_infop info_ptr
png_infop end_info

Detailed Description

clanPNG="Surface Providers".

Definition at line 35 of file provider_png.h.


Constructor & Destructor Documentation

CL_PNGProvider::CL_PNGProvider ( CL_String name,
CL_InputSourceProvider * provider = NULL,
bool transparent = true,
bool ignore_alphachannel = false )
 

CL_PNGProvider::~CL_PNGProvider ( ) [virtual]
 

param: name - Name of the PNG file to load.param: provider - Input source provider that delivers the PNG file.param: transparent - True if a transparency color should be used.param: ignore_alphachannel - True if the alpha component should be ignored.param: trans_red - Red component of the transparency color.param: trans_green - Green component of the transparency color.param: trans_blue - blue component of the transparency color.


Member Function Documentation

CL_Surface* CL_PNGProvider::create ( CL_String handle,
CL_InputSourceProvider * provider = NULL,
bool transparent = true,
bool ignore_alphachannel = false ) [static]
 

virtual unsigned int CL_PNGProvider::get_alpha_mask ( ) const [virtual]
 

Reimplemented from CL_Target.

virtual unsigned int CL_PNGProvider::get_blue_mask ( ) const [virtual]
 

Reimplemented from CL_Target.

virtual void* CL_PNGProvider::get_data ( ) const [virtual]
 

Reimplemented from CL_Target.

virtual unsigned int CL_PNGProvider::get_depth ( ) const [virtual]
 

Reimplemented from CL_Target.

virtual unsigned int CL_PNGProvider::get_green_mask ( ) const [virtual]
 

Reimplemented from CL_Target.

unsigned int CL_PNGProvider::get_height ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 72 of file provider_png.h.

CL_InputSource * CL_PNGProvider::get_input_source ( ) [inline]
 

Definition at line 39 of file provider_png.h.

Referenced by pngread_file().

unsigned int CL_PNGProvider::get_num_frames ( ) const [inline, virtual]
 

retval: A pointer that points to the beginning of the target pixel data.

Reimplemented from CL_Target.

Definition at line 75 of file provider_png.h.

CL_Palette * CL_PNGProvider::get_palette ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 81 of file provider_png.h.

unsigned int CL_PNGProvider::get_pitch ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 66 of file provider_png.h.

EPixelFormat CL_PNGProvider::get_pixel_format ( ) const [inline, virtual]
 

Definition at line 78 of file provider_png.h.

virtual unsigned int CL_PNGProvider::get_red_mask ( ) const [virtual]
 

Reimplemented from CL_Target.

unsigned int CL_PNGProvider::get_src_colorkey ( ) const [inline, virtual]
 

Reimplemented from CL_SurfaceProvider.

Definition at line 84 of file provider_png.h.

unsigned int CL_PNGProvider::get_width ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 69 of file provider_png.h.

bool CL_PNGProvider::is_indexed ( ) const [inline, virtual]
 

Reimplemented from CL_Target.

Definition at line 90 of file provider_png.h.

virtual void CL_PNGProvider::perform_lock ( ) [virtual]
 

Reimplemented from CL_SurfaceProvider_Generic.

virtual void CL_PNGProvider::perform_unlock ( ) [virtual]
 

Reimplemented from CL_SurfaceProvider_Generic.

void CL_PNGProvider::pngread_file ( png_structp png_ptr,
png_bytep data,
png_size_t length ) [inline, static]
 

Definition at line 117 of file provider_png.h.

void CL_PNGProvider::read_data ( ) [private]
 

void CL_PNGProvider::read_data_grayscale ( ) [private]
 

void CL_PNGProvider::read_data_grayscale_alpha ( ) [private]
 

void CL_PNGProvider::read_data_palette ( ) [private]
 

void CL_PNGProvider::read_data_rgb ( ) [private]
 

void CL_PNGProvider::read_data_rgba ( ) [private]
 

bool CL_PNGProvider::uses_src_colorkey ( ) const [inline, virtual]
 

retval: The y-offset of the surface data.

Reimplemented from CL_SurfaceProvider.

Definition at line 87 of file provider_png.h.


Member Data Documentation

int CL_PNGProvider::color_type [private]
 

Definition at line 153 of file provider_png.h.

png_infop CL_PNGProvider::end_info [private]
 

Definition at line 169 of file provider_png.h.

CL_String CL_PNGProvider::filename [private]
 

Definition at line 134 of file provider_png.h.

int CL_PNGProvider::height [private]
 

Definition at line 143 of file provider_png.h.

bool CL_PNGProvider::ignore_alphachannel [private]
 

Definition at line 148 of file provider_png.h.

unsigned char* CL_PNGProvider::image [private]
 

Definition at line 139 of file provider_png.h.

bool CL_PNGProvider::indexed [private]
 

Definition at line 151 of file provider_png.h.

png_infop CL_PNGProvider::info_ptr [private]
 

Definition at line 168 of file provider_png.h.

CL_InputSource* CL_PNGProvider::input_source [private]
 

Definition at line 164 of file provider_png.h.

int CL_PNGProvider::locked [private]
 

Definition at line 135 of file provider_png.h.

bool CL_PNGProvider::m_uses_src_colorkey [private]
 

Definition at line 137 of file provider_png.h.

int CL_PNGProvider::no_sprs [private]
 

Definition at line 141 of file provider_png.h.

CL_Palette* CL_PNGProvider::palette [private]
 

Definition at line 150 of file provider_png.h.

int CL_PNGProvider::pitch [private]
 

Definition at line 140 of file provider_png.h.

EPixelFormat CL_PNGProvider::pixel_format [private]
 

Definition at line 145 of file provider_png.h.

png_structp CL_PNGProvider::png_ptr [private]
 

Definition at line 167 of file provider_png.h.

CL_InputSourceProvider* CL_PNGProvider::provider [private]
 

Definition at line 163 of file provider_png.h.

unsigned char CL_PNGProvider::trans_bluecol [private]
 

Definition at line 154 of file provider_png.h.

int CL_PNGProvider::trans_col [private]
 

Definition at line 152 of file provider_png.h.

unsigned char CL_PNGProvider::trans_greencol [private]
 

Definition at line 154 of file provider_png.h.

unsigned char CL_PNGProvider::trans_redcol [private]
 

Definition at line 154 of file provider_png.h.

bool CL_PNGProvider::transparent [private]
 

Definition at line 147 of file provider_png.h.

int CL_PNGProvider::width [private]
 

Definition at line 142 of file provider_png.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:57:18 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001