Home | All Classes | Grouped Classes | Index | Search

Class CL_SpriteDescription

This class contains everything to construct a sprite - its data, default settings etc. More...

Derived from: none
Derived by: none
Group: Display (Sprites)

#include <ClanLib/display.h>

Construction:

CL_SpriteDescription

Constructs a sprite description.

Attributes:

FramePair

CL_PixelBuffer provider, CL_Rect position.

get_frames

Returns a list over all available frames.

get_surface_flag

Returns the surface flag to be used.

Operations:

operator =

Copy assignment operator.

set_surface_flag

Sets what surface flag CL_Sprite should use for its surfaces.

add_frame

Adds a single image.

add_gridclipped_frames

Adds images formed in a grid.

add_alphaclipped_frames

Adds images separated with pure alpha (within trans_limit).

add_alphaclipped_frames_free

Adds images separated with pure alpha (within trans_limit).

add_paletteclipped_frames

Adds images separated with palette-colours defining the boundaries.

Detailed description:

!group=Display/Sprites! !header=display.h!

CL_SpriteDescription is used by CL_Sprite to construct itself based on the description. The description class give a big flexibility creating a sprite, individual frames can come from different image sources, or be cut out from an image source using various different techniques.



Questions or comments, write to the
ClanLib mailing list.