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

Class CL_JPEGProvider

Surface provider that can load JPEG (.jpg) files.
Contained in: global
Derived from: CL_SurfaceProvider
Derived by: none
Group: JPEG (Surface Providers)

#include <ClanLib/jpeg.h>


public function member index:

Construction:

static CL_Surface* create(const CL_String& handle, CL_InputSourceProvider* provider=NULL, bool transparent=true, bool ignore_alphachannel=false);
CL_JPEGProvider(CL_String name, CL_InputSourceProvider* provider = NULL, bool transparent=true, bool ignore_alphachannel=false);
virtual ~CL_JPEGProvider();

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

Operations:

virtual void lock();
virtual void unlock();
 

Description:


Function Member Descriptions:

CL_JPEGProvider::CL_JPEGProvider - Constructs a surface provider that can read PNG files.
CL_JPEGProvider(CL_String name, CL_InputSourceProvider* provider = NULL, bool transparent=true, bool ignore_alphachannel=false);
name - Name of the PNG file to load.
provider - Input source provider that delivers the JPEG file.
transparent - True if a transparency color should be used.
ignore_alphachannel - True if the alpha component should be ignored.
trans_red - Red component of the transparency color.
trans_green - Green component of the transparency color.
trans_blue - blue component of the transparency color.



CL_JPEGProvider::create - Loads the JPEG file 'handle' from the inputsource provider 'provider.
Creates a CL_Surface using the JPEG image and returns it.
static CL_Surface* create(const CL_String& handle, CL_InputSourceProvider* provider=NULL, bool transparent=true, bool ignore_alphachannel=false);


CL_JPEGProvider::get_alpha_mask - Returns the alpha mask by the target.
virtual unsigned int get_alpha_mask() const;


CL_JPEGProvider::get_blue_mask - Returns the blue color mask by the target.
virtual unsigned int get_blue_mask() const;


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


CL_JPEGProvider::get_green_mask - Returns the green color mask by the target.
virtual unsigned int get_green_mask() const;


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


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


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


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


CL_JPEGProvider::get_pixel_format - Returns the pixelformat used by the image.
virtual EPixelFormat get_pixel_format() const;


CL_JPEGProvider::get_red_mask - Returns the red color mask used by the target.
virtual unsigned int get_red_mask() const;


CL_JPEGProvider::get_src_colorkey - Returns the transparency color used.
virtual unsigned int get_src_colorkey() const;


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


CL_JPEGProvider::is_indexed - Returns whether the target uses an indexed color mode or not.
virtual bool is_indexed() const;


CL_JPEGProvider::lock - Locks the surface provider.
virtual void lock();


CL_JPEGProvider::unlock - Unlocks the surface provider.
virtual void unlock();


CL_JPEGProvider::uses_src_colorkey - Returns whether a source colorkey is used.
virtual bool uses_src_colorkey() const;


CL_JPEGProvider::~CL_JPEGProvider - JPEG Provider Destructor
virtual ~CL_JPEGProvider();



Variable Member Descriptions: