This is a library of generic implementations of various graphics primitives.
They are meant to simplify the implementation of the low-level graphics driver by providing generic implementations of primitives that aren't directly supported by the hardware.
Data Structures | |
struct | gfx_bitmap |
Storage structure for bitmap pixel data and metadata. More... | |
Typedefs | |
typedef void(* | gfx_ext_draw_handler_t )(struct gfx_bitmap const *bmp, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y) |
Function pointer type for external bitmap draw handlers. More... | |
Enumerations | |
enum | gfx_bitmap_type { GFX_BITMAP_SOLID, GFX_BITMAP_RAM, GFX_BITMAP_PROGMEM, GFX_BITMAP_EXT } |
Valid bitmap types. More... | |
typedef void(* gfx_ext_draw_handler_t)(struct gfx_bitmap const *bmp, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y) |
Function pointer type for external bitmap draw handlers.
bmp | Pointer to the bitmap. |
map_x | Start pos x. |
map_y | Start pos y. |
x | Width length. |
y | Height length. |
enum gfx_bitmap_type |
|
static |
Generic implementation of gfx_draw_bitmap().
References gfx_put_bitmap(), gfx_bitmap::height, and gfx_bitmap::width.
void gfx_generic_draw_bitmap_tiled | ( | const struct gfx_bitmap * | bmp, |
gfx_coord_t | x1, | ||
gfx_coord_t | y1, | ||
gfx_coord_t | x2, | ||
gfx_coord_t | y2, | ||
gfx_coord_t | tile_origin_x, | ||
gfx_coord_t | tile_origin_y | ||
) |
Generic implementation of gfx_draw_bitmap_tiled().
References Assert, gfx_bitmap::color, gfx_bitmap::data, GFX_BITMAP_SOLID, gfx_draw_filled_rect, gfx_put_bitmap(), gfx_bitmap::height, gfx_bitmap::type, and gfx_bitmap::width.
void gfx_generic_draw_circle | ( | gfx_coord_t | x, |
gfx_coord_t | y, | ||
gfx_coord_t | radius, | ||
gfx_color_t | color, | ||
uint8_t | octant_mask | ||
) |
Generic implementation of gfx_draw_circle().
References gfx_draw_pixel(), GFX_OCTANT0, GFX_OCTANT1, GFX_OCTANT2, GFX_OCTANT3, GFX_OCTANT4, GFX_OCTANT5, GFX_OCTANT6, and GFX_OCTANT7.
void gfx_generic_draw_filled_circle | ( | gfx_coord_t | x, |
gfx_coord_t | y, | ||
gfx_coord_t | radius, | ||
gfx_color_t | color, | ||
uint8_t | quadrant_mask | ||
) |
Generic implementation of gfx_draw_filled_circle().
References gfx_draw_pixel(), gfx_draw_vertical_line, GFX_QUADRANT0, GFX_QUADRANT1, GFX_QUADRANT2, and GFX_QUADRANT3.
void gfx_generic_draw_filled_rect | ( | gfx_coord_t | x, |
gfx_coord_t | y, | ||
gfx_coord_t | width, | ||
gfx_coord_t | height, | ||
gfx_color_t | color | ||
) |
Generic implementation of gfx_draw_filled_rect().
References gfx_duplicate_pixel(), gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, and gfx_set_limits().
|
static |
Generic implementation of gfx_draw_horizontal_line().
References gfx_draw_filled_rect.
void gfx_generic_draw_line | ( | gfx_coord_t | x1, |
gfx_coord_t | y1, | ||
gfx_coord_t | x2, | ||
gfx_coord_t | y2, | ||
gfx_color_t | color | ||
) |
Generic implementation of gfx_draw_line().
References gfx_draw_line_pixel(), gfx_height, gfx_set_bottom_right_limit(), and gfx_width.
|
static |
Generic implementation of gfx_draw_rect().
References gfx_draw_horizontal_line, and gfx_draw_vertical_line.
|
static |
Generic implementation of gfx_draw_vertical_line().
References gfx_draw_filled_rect.
void gfx_generic_get_pixmap | ( | gfx_color_t * | pixmap, |
gfx_coord_t | map_width, | ||
gfx_coord_t | map_x, | ||
gfx_coord_t | map_y, | ||
gfx_coord_t | x, | ||
gfx_coord_t | y, | ||
gfx_coord_t | width, | ||
gfx_coord_t | height | ||
) |
Generic implementation of gfx_get_pixmap().
References Assert, gfx_copy_pixels_from_screen(), gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_bottom_right_limit(), and gfx_set_top_left_limit().
void gfx_generic_put_bitmap | ( | const struct gfx_bitmap * | bmp, |
gfx_coord_t | map_x, | ||
gfx_coord_t | map_y, | ||
gfx_coord_t | x, | ||
gfx_coord_t | y, | ||
gfx_coord_t | width, | ||
gfx_coord_t | height | ||
) |
Generic implementation of gfx_put_bitmap().
References Assert, gfx_bitmap::color, gfx_bitmap::data, GFX_BITMAP_EXT, GFX_BITMAP_PROGMEM, GFX_BITMAP_RAM, GFX_BITMAP_SOLID, gfx_copy_pixels_to_screen(), gfx_copy_progmem_pixels_to_screen(), gfx_draw_filled_rect, gfx_ext_draw_func, gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_bottom_right_limit(), gfx_set_top_left_limit(), NULL, gfx_bitmap::pixmap, gfx_bitmap::progmem, PROGMEM_PTR_T, gfx_bitmap::type, and gfx_bitmap::width.
void gfx_generic_put_pixmap | ( | const gfx_color_t * | pixmap, |
gfx_coord_t | map_width, | ||
gfx_coord_t | map_x, | ||
gfx_coord_t | map_y, | ||
gfx_coord_t | x, | ||
gfx_coord_t | y, | ||
gfx_coord_t | width, | ||
gfx_coord_t | height | ||
) |
Generic implementation of gfx_put_pixmap().
References Assert, gfx_copy_pixels_to_screen(), gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, gfx_set_bottom_right_limit(), and gfx_set_top_left_limit().
void gfx_generic_set_ext_handler | ( | gfx_ext_draw_handler_t | gfx_ext_draw | ) |
Generic implementation of setting external bitmap draw interface.
References gfx_ext_draw_func.
|
static |
Generic implementation of gfx_sync().