ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index

Class CL_BMPProvider

Surface provider that can load BMP files.
Contained in: global
Derived from: CL_SurfaceProvider_Generic
Derived by: none
Group: Display (Surface Providers)

#include <ClanLib/display.h>


public function member index:

Construction:

static CL_Surface* create(std::string handle, CL_InputSourceProvider* provider, bool transparent=false, short trans_col=-1);
CL_BMPProvider(std::string name, CL_InputSourceProvider* provider, bool transparent=false, short trans_col=-1);
virtual ~CL_BMPProvider();

Attributes:

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;
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 CL_Palette* get_palette() const;
virtual bool is_indexed() const;
virtual bool uses_src_colorkey() const;
virtual unsigned int get_src_colorkey() const;
virtual void* get_data() const;

Operations:

virtual void perform_lock();
virtual void perform_unlock();
 

Description:

This code currently supports Win32 DIBs in uncompressed 8 and 24 bpp.


Function Member Descriptions:

CL_BMPProvider::CL_BMPProvider - Constructs a surface provider that can read bmp files.
CL_BMPProvider(std::string name, CL_InputSourceProvider* provider, bool transparent=false, short trans_col=-1);
name - Name of the bmp file to load.
provider - Input source provider that delivers the bmp file.
transparent - True if a color in image should be transparent.
trans_col - Transparency color used if 'transparent' is true. Defaults to color 0.



CL_BMPProvider::create - Loads the bmp file 'handle' from the inputsource provider 'provider.
Creates a CL_Surface using the bmp image and returns it.
static CL_Surface* create(std::string handle, CL_InputSourceProvider* provider, bool transparent=false, short trans_col=-1);


CL_BMPProvider::get_alpha_mask - Get alpha mask
virtual unsigned int get_alpha_mask() const;


CL_BMPProvider::get_blue_mask - Get blue mask
virtual unsigned int get_blue_mask() const;


CL_BMPProvider::get_data - Returns the image data. Provider must be locked before pointer is valid.
virtual void* get_data() const;


CL_BMPProvider::get_depth - Get depth
virtual unsigned int get_depth() const;


CL_BMPProvider::get_green_mask - Get green mask
virtual unsigned int get_green_mask() const;


CL_BMPProvider::get_height - Returns the height of the image.
virtual unsigned int get_height() const;


CL_BMPProvider::get_num_frames - Returns the number of subsprites in the image.
virtual unsigned int get_num_frames() const;


CL_BMPProvider::get_palette - Returns the palette used by the image. NULL if system palette.
virtual CL_Palette* get_palette() const;


CL_BMPProvider::get_pitch - Returns the pitch of the image (bytes per line).
virtual unsigned int get_pitch() const;


CL_BMPProvider::get_red_mask - Get red mask
virtual unsigned int get_red_mask() const;


CL_BMPProvider::get_src_colorkey - Returns the transparency color used, -1 if none.
virtual unsigned int get_src_colorkey() const;


CL_BMPProvider::get_width - Returns the width of the image.
virtual unsigned int get_width() const;


CL_BMPProvider::is_indexed - Is Indexed
virtual bool is_indexed() const;


CL_BMPProvider::perform_lock - Locks the surface provider.
virtual void perform_lock();


CL_BMPProvider::perform_unlock - Unlocks the surface provider.
virtual void perform_unlock();


CL_BMPProvider::uses_src_colorkey - Uses src colourkey
virtual bool uses_src_colorkey() const;


CL_BMPProvider::~CL_BMPProvider - BMP Provider Destructor
virtual ~CL_BMPProvider();



Variable Member Descriptions: