Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_Sprite2Provider

Sprite 2 Provider Class
Contained in: global
Derived from: CL_SurfaceProvider_Generic
Derived by: none
Group: Display (Surface Providers)

#include <ClanLib/display.h>

### public function member index:

### Construction:

`` | `CL_Sprite2Provider` | `(`CL_InputSource`* `source`)`;
`` | `CL_Sprite2Provider` | `(`CL_SurfaceProvider`* `src`, `int` `x`, `int` `y`, `int` `width`, `int` `height`, `int`* `tcols`, `int` `tcols_num`)`;
``virtual`` | `~CL_Sprite2Provider` | `()`;

### Attributes:

``virtual` `unsigned` `int`` | `get_width` | `() `const``;
``virtual` `unsigned` `int`` | `get_height` | `() `const``;
``virtual` `unsigned` `int`` | `get_pitch` | `() `const``;
``virtual` `unsigned` `int`` | `get_num_frames` | `() `const``;
``virtual` `CL_Palette`*` | `get_palette` | `() `const``;
``virtual` `bool`` | `uses_src_colorkey` | `() `const``;
``virtual` `unsigned` `int`` | `get_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` `unsigned` `int`` | `get_depth` | `() `const``;
``virtual` `void`*` | `get_data` | `() `const``;

### Operations:

``virtual` `void`` | `perform_lock` | `()`;
``virtual` `void`` | `perform_unlock` | `()`;

### protected function member index:

``void`` | `load_data` | `(`CL_InputSource`* `datafile`)`;

## Description:

Sprite surface provider especially designed for the font class. Most likely not very usable other places.

## Function Member Descriptions:

CL_Sprite2Provider::CL_Sprite2Provider - Sprite 2 Provider Constructor
`` `CL_Sprite2Provider` `(`CL_InputSource`* `source`)`;

CL_Sprite2Provider::CL_Sprite2Provider - Sprite 2 Provider Constructor
`` `CL_Sprite2Provider` `(`CL_SurfaceProvider`* `src`, `int` `x`, `int` `y`, `int` `width`, `int` `height`, `int`* `tcols`, `int` `tcols_num`)`;

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

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

CL_Sprite2Provider::get_data - Returns a pointer to the sprite2s image data. Can only be called between lock() and unlock().
``virtual` `void`*` `get_data` `() `const``;

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

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

CL_Sprite2Provider::get_height - Returns the height of the sprite2.
``virtual` `unsigned` `int`` `get_height` `() `const``;

CL_Sprite2Provider::get_num_frames - Returns the number of subsprite2s in this sprite2.
``virtual` `unsigned` `int`` `get_num_frames` `() `const``;

CL_Sprite2Provider::get_palette - Returns the palette used by the surface. NULL if the system palette is used.
``virtual` `CL_Palette`*` `get_palette` `() `const``;

CL_Sprite2Provider::get_pitch - Returns the pitch of the sprite2.
``virtual` `unsigned` `int`` `get_pitch` `() `const``;

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

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

CL_Sprite2Provider::get_width - Returns the width of the sprite2.
``virtual` `unsigned` `int`` `get_width` `() `const``;

CL_Sprite2Provider::is_indexed - Is indexed
``virtual` `bool`` `is_indexed` `() `const``;

CL_Sprite2Provider::perform_lock - Locks the surface provider. This causes the sprite2 to retrieve its surface data from the datafile.
``virtual` `void`` `perform_lock` `()`;

CL_Sprite2Provider::perform_unlock - Unlocks the surface provider. The sprite2 releases its surface data when it is called.
``virtual` `void`` `perform_unlock` `()`;

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

CL_Sprite2Provider::~CL_Sprite2Provider - Sprite 2 Provider Destructor
``virtual`` `~CL_Sprite2Provider` `()`;

## Variable Member Descriptions: