#include <sprite_description.h>
Public Member Functions | |
Construction | |
| CL_SpriteDescription () | |
| Constructs a sprite description. | |
| CL_SpriteDescription (CL_GraphicContext &gc, const CL_StringRef &resource_id, CL_ResourceManager *resources) | |
| Constructs a SpriteDescription. | |
| CL_SpriteDescription (const CL_SpriteDescription ©) | |
| Constructs a SpriteDescription. | |
| ~CL_SpriteDescription () | |
Attributes | |
| const std::vector< CL_SpriteDescriptionFrame > & | get_frames () const |
| Returns a list over all available frames. | |
Operations | |
| CL_SpriteDescription & | operator= (const CL_SpriteDescription ©) |
| Copy assignment operator. | |
| void | add_frame (const CL_PixelBuffer &pixelbuffer) |
| Adds a single image. | |
| void | add_frame (const CL_Texture &texture) |
| Add frame. | |
| void | add_frame (const CL_StringRef &fullname) |
| Add frame. | |
| void | add_frame (CL_IODevice &file, const CL_String &image_type) |
| Add frame. | |
| void | add_frame (const CL_StringRef &filename, CL_VirtualDirectory &dir) |
| Add frame. | |
| void | add_frames (const CL_Texture &texture, CL_Rect *frames, int num_frames) |
| Add frames. | |
| void | add_gridclipped_frames (const CL_PixelBuffer &pixelbuffer, int xpos, int ypos, int width, int height, int xarray=1, int yarray=1, int array_skipframes=0, int xspacing=0, int yspacing=0) |
| Adds images formed in a grid. | |
| void | add_gridclipped_frames (const CL_Texture &texture, int xpos, int ypos, int width, int height, int xarray=1, int yarray=1, int array_skipframes=0, int xspacing=0, int yspacing=0) |
| void | add_alphaclipped_frames (const CL_PixelBuffer &pixelbuffer, int xpos=0, int ypos=0, double trans_limit=0.05f) |
| Adds images separated with pure alpha (within trans_limit). | |
| void | add_alphaclipped_frames (const CL_Texture &texture, int xpos=0, int ypos=0, double trans_limit=0.05f) |
| void | add_alphaclipped_frames_free (const CL_PixelBuffer &pixelbuffer, int xpos=0, int ypos=0, double trans_limit=0.05f) |
| Adds images separated with pure alpha (within trans_limit). | |
| void | add_alphaclipped_frames_free (const CL_Texture &texture, int xpos=0, int ypos=0, double trans_limit=0.05f) |
| void | set_frame_delay (int frame, double delay) |
| Sets the duration this frame is displayed, in seconds. | |
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.
|
|
Constructs a sprite description.
|
|
||||||||||||||||
|
Constructs a SpriteDescription.
|
|
|
Constructs a SpriteDescription.
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
Adds images separated with pure alpha (within trans_limit). The alpha clipper will cut out frames from an image based on the transparency in the picture. It first determines the height of a row by searching for the first line that it considers completely transparent. Then it finds the width of each frame on this line by looking for columns that are completely transparency.
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
Adds images separated with pure alpha (within trans_limit). The alpha clipper will cut out frames from an image based on the transparency in the picture. It scans the lines horizontally from top to bottom. As soon as a non-transarent pixel is discovered, the clipper finds the bounding box for that region and then moves on.
|
|
||||||||||||
|
Add frame.
|
|
||||||||||||
|
Add frame.
|
|
|
Add frame.
|
|
|
Add frame.
|
|
|
Adds a single image.
|
|
||||||||||||||||
|
Add frames.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Adds images formed in a grid. This function will cut out a grid of frames from one image.
|
|
|
Returns a list over all available frames.
|
|
|
Copy assignment operator.
|
|
||||||||||||
|
Sets the duration this frame is displayed, in seconds.
|
1.4.6