|
file | libtui_draw.h |
| The group of functions that provide a nice interface for the client to draw to screen.
|
|
All the things about the draw module
◆ LIBTUI_DRAW_ERR
Error Codes For Draw Module.
Enumerator |
---|
DRAW_ERROR_OK | No Error.
|
DRAW_ERROR_NULL_RENDERER | The libtui_renderer* passed in as an argument is NULL.
|
DRAW_ERROR_INVALID_DIMENSIONS | The dimensions that were passed to the function were invalid.
|
DRAW_ERROR_COUNT | Count of errors.
|
◆ libtui_draw_clear()
Clears the screen.
Clears the screen with ' '.
- Parameters
-
renderer | The renderer to clear |
- Returns
- Returns an enum LIBTUI_DRAW_ERR as the function result;
◆ libtui_draw_clear_with_char()
Clears the screen with the specified char.
example: if c == 'X': whole screen will be made up of 'X' chars.
- Parameters
-
renderer | The renderer to clear. |
c | The char to clear with. |
- Returns
- Return an enum LIBTUI_DRAW_ERR as the function result;
◆ libtui_draw_err_str()
This function returns the string that corresponds to the given LIBTUI_DRAW_ERR.
- Parameters
-
err | The error code to get the correspinding string. |
◆ libtui_draw_single_char()
Draws a single char at the specified (x, y).
The origin of the screen is top-left.
- Parameters
-
renderer | The renderer to draw to. |
c | The char to draw. |
x | The x position of the draw position. |
y | The y position of the draw position. |
- Returns
- Returns an enum LIBTUI_DRAW_ERR as the function result;