Functions for drawing primitives on-screen.
More...
|
| MERROR_RETVAL | retroflat_draw_lock (struct RETROFLAT_BITMAP *bmp) |
| | Lock a bitmap for drawing. This will be done automatically if necessary and not called explicitly, but performance should improve if done before a batch of drawing operations. More...
|
| |
|
MERROR_RETVAL | retroflat_draw_release (struct RETROFLAT_BITMAP *bmp) |
| |
|
void | retroflat_px (struct RETROFLAT_BITMAP *target, const RETROFLAT_COLOR color, retroflat_pxxy_t x, retroflat_pxxy_t y, uint8_t flags) |
| |
| void | retroflat_rect (struct RETROFLAT_BITMAP *target, const RETROFLAT_COLOR color, retroflat_pxxy_t x, retroflat_pxxy_t y, retroflat_pxxy_t w, retroflat_pxxy_t h, uint8_t flags) |
| | Draw a rectangle onto the target ::RETROFLAT_BITMAP. More...
|
| |
| void | retroflat_ellipse (struct RETROFLAT_BITMAP *target, const RETROFLAT_COLOR color, retroflat_pxxy_t x, retroflat_pxxy_t y, retroflat_pxxy_t w, retroflat_pxxy_t h, uint8_t flags) |
| | Draw an ellipse onto the target ::RETROFLAT_BITMAP. More...
|
| |
| void | retroflat_line (struct RETROFLAT_BITMAP *target, const RETROFLAT_COLOR color, retroflat_pxxy_t x1, retroflat_pxxy_t y1, retroflat_pxxy_t x2, retroflat_pxxy_t y2, uint8_t flags) |
| | Draw a straight line onto the target ::RETROFLAT_BITMAP. More...
|
| |
|
void | retroflat_cursor (struct RETROFLAT_BITMAP *target, uint8_t flags) |
| |
|
void | retroflat_get_palette (uint8_t idx, uint32_t *rgb) |
| |
|
MERROR_RETVAL | retroflat_set_palette (uint8_t idx, uint32_t rgb) |
| |
Functions for drawing primitives on-screen.
- Warning
- Drawing functions should not be used outside of the context of the main loop, as the platform may not have fully initialized the drawing window until the main loop is called for the first time!
◆ retroflat_blank
| #define retroflat_blank |
( |
|
target, |
|
|
|
color |
|
) |
| |
Value:
target, color, 0, 0, \
retroflat_bitmap_w( NULL == target ? retroflat_screen_buffer() : target )\
, \
retroflat_bitmap_h( NULL == target ? retroflat_screen_buffer() : target )\
#define RETROFLAT_DRAW_FLAG_FILL
Flag for retroflat_rect() or retroflat_ellipse(), indicating drawn shape should be filled.
Definition: retroflt.h:376
void retroflat_rect(struct RETROFLAT_BITMAP *target, const RETROFLAT_COLOR color, retroflat_pxxy_t x, retroflat_pxxy_t y, retroflat_pxxy_t w, retroflat_pxxy_t h, uint8_t flags)
Draw a rectangle onto the target ::RETROFLAT_BITMAP.
◆ RETROFLAT_FONT_FLAG_ALL_CAPS
| #define RETROFLAT_FONT_FLAG_ALL_CAPS 0x02 |
Flag for retroflat_string() and retroflat_string_sz() to print text in all capital letters. Non-letters are unmodified.
- Todo:
- This has not yet been implemented and is present for backward compatibility.
◆ retroflat_draw_lock()
| MERROR_RETVAL retroflat_draw_lock |
( |
struct RETROFLAT_BITMAP * |
bmp | ) |
|
Lock a bitmap for drawing. This will be done automatically if necessary and not called explicitly, but performance should improve if done before a batch of drawing operations.
- Parameters
-
| bmp | Pointer to a ::RETROFLAT_BITMAP struct to lock. If this is NULL, try to lock the screen. |
- Returns
- RETROFLAT_OK if lock was successful or RetroFlat API Return Values otherwise.
◆ retroflat_ellipse()
Draw an ellipse onto the target ::RETROFLAT_BITMAP.
- Parameters
-
| target | Pointer to the ::RETROFLAT_BITMAP to draw onto, or NULL to draw to the screen buffer. |
| color | Maug_retroflt_color in which to draw. |
| x | Left X coordinate in pixels at which to draw on the target bitmap. |
| y | Top Y coordinate in pixels at which to draw on the target bitmap. |
| flags | Flags to control drawing. The following flags apply: RETROFLAT_DRAW_FLAG_FILL |
◆ retroflat_line()
Draw a straight line onto the target ::RETROFLAT_BITMAP.
- Parameters
-
| target | Pointer to the ::RETROFLAT_BITMAP to draw onto, or NULL to draw to the screen buffer. |
| x1 | Left X coordinate of the line to draw on the target bitmap. |
| y1 | Top Y coordinate of the line to draw on the target bitmap. |
| x2 | Right X coordinate of the line to draw on the target bitmap. |
| y2 | Bottom Y coordinate of the line to draw on the target bitmap. |
| color | Maug_retroflt_color in which to draw. |
| flags | Flags to control drawing. No flags currently apply. |
◆ retroflat_rect()
Draw a rectangle onto the target ::RETROFLAT_BITMAP.
- Parameters
-
| target | Pointer to the ::RETROFLAT_BITMAP to draw onto, or NULL to draw to the screen buffer. |
| color | Maug_retroflt_color in which to draw. |
| x | Left X coordinate in pixels at which to draw on the target bitmap. |
| y | Top Y coordinate in pixels at which to draw on the target bitmap. |
| flags | Flags to control drawing. The following flags apply: RETROFLAT_DRAW_FLAG_FILL |