This class contains everything to construct a cursor - its data, default settings etc. More...
#include <cursor_description.h>
Public Member Functions | |
Attributes | |
const std::vector< CursorDescriptionFrame > & | get_frames () const |
Returns a list over all available frames. More... | |
Point | get_hotspot () const |
the offset of where the cursor is drawn relative to cursor image More... | |
bool | operator== (const CursorDescription &that) const |
bool | operator!= (const CursorDescription &that) const |
bool | operator< (const CursorDescription &that) const |
bool | operator> (const CursorDescription &that) const |
bool | operator<= (const CursorDescription &that) const |
bool | operator>= (const CursorDescription &that) const |
Operations | |
CursorDescription & | operator= (const CursorDescription ©) |
Copy assignment operator. More... | |
void | add_frame (const PixelBuffer &pixelbuffer) |
Adds a single image. More... | |
void | add_frame (const std::string &fullname, const ImageImportDescription &import_desc=ImageImportDescription()) |
Add frame. More... | |
void | add_frame (IODevice &file, const std::string &image_type, const ImageImportDescription &import_desc=ImageImportDescription()) |
Add frame. More... | |
void | add_frame (const std::string &filename, FileSystem &fs, const ImageImportDescription &import_desc=ImageImportDescription()) |
Add frame. More... | |
void | add_gridclipped_frames (const 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. More... | |
void | add_alphaclipped_frames (const PixelBuffer &pixelbuffer, int xpos=0, int ypos=0, float trans_limit=0.05f) |
Adds images separated with pure alpha (within trans_limit). More... | |
void | add_alphaclipped_frames_free (const PixelBuffer &pixelbuffer, int xpos=0, int ypos=0, float trans_limit=0.05f) |
Adds images separated with pure alpha (within trans_limit). More... | |
void | set_frame_delay (int frame, double delay) |
Sets the duration this frame is displayed, in seconds. More... | |
void | set_hotspot (const Point &hotspot) |
Sets the offset of where the cursor is drawn relative to the cursor image. More... | |
Construction | |
CursorDescription () | |
Constructs a cursor description. More... | |
CursorDescription (const CursorDescription ©) | |
Constructs a CursorDescription. More... | |
~CursorDescription () | |
static CursorDescription | load (GraphicContext &gc, const std::string &resource_id, const XMLResourceDocument &doc, const ImageImportDescription &import_desc=ImageImportDescription()) |
Loads a CursorDescription from a XML resource definition. More... | |
This class contains everything to construct a cursor - its data, default settings etc.
CursorDescription is used by Cursor to construct itself based on the description. The description class give a big flexibility creating a cursor, individual frames can come from different image sources, or be cut out from an image source using various different techniques.