A SDL2 based library to implement work queue based drawing of graphical elements. Allows for drawing using SDL2 from multiple threads.
More...
|
static uint32_t | SwapBytes (unsigned int x) |
|
void | setErrorMessage (char *msg) |
|
static draw_job_t * | pushDrawJob (void) |
|
static draw_job_t * | popDrawJob (void) |
|
static int | _clearDisplay (unsigned int colour) |
|
static int | _drawRectangle (signed short x, signed short y, signed short w, signed short h, unsigned int colour) |
|
static int | _drawFilledRectangle (signed short x, signed short y, signed short w, signed short h, unsigned int colour) |
|
static int | _drawArc (signed short x, signed short y, signed short radius, signed short start, signed short end, unsigned int colour) |
|
static int | _drawEllipse (signed short x, signed short y, signed short rx, signed short ry, unsigned int colour) |
|
static int | _drawCircle (signed short x, signed short y, signed short radius, unsigned int colour) |
|
static int | _drawLine (signed short x1, signed short y1, signed short x2, signed short y2, unsigned char thickness, unsigned int colour) |
|
static int | _drawPoly (coord_t *points, unsigned int n, int x_offset, int y_offset, signed short colour) |
|
static int | _drawTriangle (coord_t *points, int x_offset, int y_offset, unsigned int colour) |
|
static SDL_Texture * | loadImage (char *filename, SDL_Renderer *ren) |
|
static int | _renderCroppedImage (SDL_Texture *tex, SDL_Renderer *ren, signed short x, signed short y, signed short c_x, signed short c_y, int w, int h) |
|
static int | _renderScaledImage (SDL_Texture *tex, SDL_Renderer *ren, signed short x, signed short y, int w, int h) |
|
static int | _getImageSize (char *filename, int *w, int *h) |
|
animation_handle_t | tumDrawAnimationCreate (image_handle_t spritesheet, unsigned sprite_cols, unsigned sprite_rows) |
| Creates an animation object with an attached spritesheet that must be loaded prior as an image. More...
|
|
int | tumDrawAnimationAddSequence (animation_handle_t animation, char *name, unsigned start_row, unsigned start_col, enum sprite_sequence_direction sprite_step_direction, unsigned frames) |
| Adds an animation sequence to a previously created animation. More...
|
|
sequence_handle_t | tumDrawAnimationSequenceInstantiate (animation_handle_t animation, char *sequence_name, unsigned frame_period_ms) |
| Creates an instance of an animation from a loaded animation object and a sequence name of a sequence previously added to the animation object. More...
|
|
static int | freeLoadedImage (loaded_image_t **img) |
|
static void | vPutLoadedImage (image_handle_t img) |
|
int | xDrawLoadedImageCropped (loaded_image_t *img, SDL_Renderer *ren, signed short x, signed short y, signed short c_x, signed short c_y, signed short c_w, signed short c_h) |
|
int | xDrawLoadedImage (loaded_image_t *img, SDL_Renderer *ren, signed short x, signed short y) |
|
static int | _drawScaledImage (SDL_Texture *tex, SDL_Renderer *ren, signed short x, signed short y, float scale) |
|
static int | _drawImage (SDL_Texture *tex, SDL_Renderer *ren, signed short x, signed short y) |
|
static int | _drawText (char *string, signed short x, signed short y, unsigned int colour, TTF_Font *font) |
|
static int | _getTextSize (char *string, int *width, int *height) |
|
static int | _drawArrow (signed short x1, signed short y1, signed short x2, signed short y2, signed short head_length, unsigned char thickness, unsigned int colour) |
|
static int | vHandleDrawJob (draw_job_t *job) |
|
static void | logCriticalError (char *msg) |
|
int | tumDrawUpdateScreen (void) |
| Executes the queued draw jobs. More...
|
|
char * | tumGetErrorMessage (void) |
| Returns a string error message from the TUM Draw back end. More...
|
|
int | tumDrawInit (char *path) |
| Initializes the TUM Draw backend. More...
|
|
int | tumDrawBindThread (void) |
| Transfers the drawing ability to the calling thread/taskd. More...
|
|
void | tumDrawExit (void) |
| Exits the TUM Draw backend. More...
|
|
int | tumDrawText (char *str, signed short x, signed short y, unsigned int colour) |
| Prints a string to the screen. More...
|
|
int | tumGetTextSize (char *str, int *width, int *height) |
| Finds the width and height of a strings bounding box. More...
|
|
int | tumDrawEllipse (signed short x, signed short y, signed short rx, signed short ry, unsigned int colour) |
| Draws an ellipse on the screen. More...
|
|
int | tumDrawArc (signed short x, signed short y, signed short radius, signed short start, signed short end, unsigned int colour) |
| Draws an arc on the screen. More...
|
|
int | tumDrawFilledBox (signed short x, signed short y, signed short w, signed short h, unsigned int colour) |
| Draws an unfilled box on the screen. More...
|
|
int | tumDrawBox (signed short x, signed short y, signed short w, signed short h, unsigned int colour) |
| Draws a filled box on the screen. More...
|
|
void | tumDrawDuplicateBuffer (void) |
|
int | tumDrawClear (unsigned int colour) |
| Sets the screen to a solid colour. More...
|
|
int | tumDrawCircle (signed short x, signed short y, signed short radius, unsigned int colour) |
| Draws a filled circle on the screen. More...
|
|
int | tumDrawLine (signed short x1, signed short y1, signed short x2, signed short y2, unsigned char thickness, unsigned int colour) |
| Draws a line on the screen. More...
|
|
int | tumDrawPoly (coord_t *points, int n, unsigned int colour) |
| Draws a polygon on the screen. More...
|
|
int | tumDrawTriangle (coord_t *points, unsigned int colour) |
| Draws a triangle on the screen. More...
|
|
image_handle_t | tumDrawLoadScaledImage (char *filename, float scale) |
| Loads an image from disk and scales the image, loaded image file can be closed using tumDrawFreeLoadedImage(). Note that scaled images have large overheads compared to manually scaled images (changing image file's dimensions) More...
|
|
image_handle_t | tumDrawLoadImage (char *filename) |
| Loads an image file from disk, loaded image file can be closed using tumDrawFreeLoadedImage() More...
|
|
int | tumDrawFreeLoadedImage (image_handle_t *img) |
| Closes a loaded image and frees all memory used by the image structure. More...
|
|
int | tumDrawLoadedImage (image_handle_t img, signed short x, signed short y) |
| Draws a loaded image to the screen. More...
|
|
int | tumDrawSetLoadedImageScale (image_handle_t img, float scale) |
| Scales a loaded image, the scale is a value where, for example, 1.0 represents the original image's size. The scaling factor scales the image relative to the image file's dimensions on disk. More...
|
|
float | tumDrawGetLoadedImageScale (image_handle_t img) |
| Retrieves the current scaling factor of an image. More...
|
|
int | tumDrawGetLoadedImageWidth (image_handle_t img) |
| Retrieves the image's width when drawn to screen, ie. after scaling. More...
|
|
int | tumDrawGetLoadedImageHeight (image_handle_t img) |
| Retrieves the image's height when drawn to screen, ie. after scaling. More...
|
|
int | tumDrawGetLoadedImageSize (image_handle_t img, int *w, int *h) |
| Retrieves bother the image's width and height when drawn to screen, ie. after scaling. More...
|
|
int __attribute_deprecated__ | tumDrawImage (char *filename, signed short x, signed short y) |
| Draws an image on the screen. More...
|
|
int __attribute_deprecated__ | tumGetImageSize (char *filename, int *w, int *h) |
| Gets the width and height of an image. More...
|
|
int __attribute_deprecated__ | tumDrawScaledImage (char *filename, signed short x, signed short y, float scale) |
| Draws a scaled image on the screen. More...
|
|
int | tumDrawArrow (signed short x1, signed short y1, signed short x2, signed short y2, signed short head_length, unsigned char thickness, unsigned int colour) |
| Draws an arrow on the screen. More...
|
|
int | tumDrawAnimationDrawFrame (sequence_handle_t sequence, unsigned ms_timestep, int x, int y) |
| Draws the target intantiated animation sequence at a given location. More...
|
|
int | tumDrawSetGlobalXOffset (int offset) |
| Sets the global draw position offset's X axis value. More...
|
|
int | tumDrawSetGlobalYOffset (int offset) |
| Sets the global draw position offset's Y axis value. More...
|
|
int | tumDrawGetGlobalXOffset (int *offset) |
| Retrieves a copy of the current global X axis drawing offset. More...
|
|
int | tumDrawGetGlobalYOffset (int *offset) |
| Retrieves a copy of the current global X axis drawing offset. More...
|
|