57 #ifdef CONF_GFX_USE_CLIPPING 102 if ( (width == 0) || (height == 0) )
120 #ifdef CONF_GFX_USE_CLIPPING 146 #ifdef CONF_GFX_USE_CLIPPING 211 for ( i = 0; i <= dx; ++i )
235 for ( i = 0; i <= dy; ++i )
271 error = 3 - 2 * radius;
274 while ( offset_x <= offset_y )
320 error += ((offset_x << 2) + 6);
324 error += (((offset_x - offset_y) << 2) + 10);
349 error = 3 - 2 * radius;
352 while ( offset_x <= offset_y )
382 error += ((offset_x << 2) + 6);
386 error += (((offset_x - offset_y) << 2) + 10);
401 if ( (width == 0) || (height == 0) )
408 Assert( (map_x + width) <= map_width );
414 #ifdef CONF_GFX_USE_CLIPPING 442 #ifdef CONF_GFX_USE_CLIPPING 462 pixmap += (uint32_t) map_y * map_width;
471 if ( (map_width == width) && (map_x == 0) )
481 while ( lines_left > 0 )
501 if ( (width == 0) || (height == 0) )
508 Assert( (map_x + width) <= map_width );
514 #ifdef CONF_GFX_USE_CLIPPING 542 #ifdef CONF_GFX_USE_CLIPPING 562 pixmap += (uint32_t) map_y * map_width;
571 if ( (map_width == width) && (map_x == 0) )
581 while ( lines_left > 0 )
610 Assert( tile_origin_x <= x1 );
611 Assert( tile_origin_y <= y1 );
621 map_width = bmp->
width;
623 start_x = tile_origin_x;
624 start_y = tile_origin_y;
626 while ( start_x <= (x1 - map_width) )
628 start_x += map_width;
630 while ( start_y <= (y1 - map_height) )
632 start_y += map_height;
636 for ( index_y = start_y; index_y <= y2; index_y += map_height )
638 for ( index_x = start_x; index_x <= x2; index_x += map_width )
640 gfx_put_bitmap( bmp, 0, 0, index_x, index_y, map_width, map_height );
656 if ( (width == 0) || (height == 0) )
663 Assert( (map_x + width) <= map_width );
669 #ifdef CONF_GFX_USE_CLIPPING 698 #ifdef CONF_GFX_USE_CLIPPING 732 pixmap = bmp->data.
pixmap;
739 pixmap += (uint32_t) map_y * map_width;
747 if ( (map_width == width) && (map_x == 0) )
757 while ( lines_left > 0 )
774 progmem_pixmap = bmp->data.
progmem;
777 progmem_pixmap += map_x;
781 progmem_pixmap += (uint32_t) map_y * map_width;
790 if ( (map_width == width) && (map_x == 0) )
800 while ( lines_left > 0 )
808 progmem_pixmap += map_width;
Storage structure for bitmap pixel data and metadata.
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)
#define gfx_draw_line_pixel(x, y, color)
#define gfx_put_bitmap(bmp, map_x, map_y, x, y, width, height)
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)
#define gfx_set_top_left_limit(x, y)
#define gfx_set_bottom_right_limit(x, y)
Commonly used includes, types and macros.
#define Assert(expr)
This macro is used to test fatal errors.
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)
#define gfx_draw_pixel(x, y, color)
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)
enum gfx_bitmap_type type
static gfx_ext_draw_handler_t gfx_ext_draw_func
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.
void gfx_generic_set_ext_handler(gfx_ext_draw_handler_t gfx_ext_draw)
#define gfx_duplicate_pixel(color, count)
#define gfx_copy_progmem_pixels_to_screen(pixels, count, swap)
gfx_color_t PROGMEM_PTR_T progmem
ili9341_coord_t gfx_coord_t
Data type representing a coordinate on the screen.
#define gfx_copy_pixels_from_screen(pixels, count)
Graphical library API header file.
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)
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)
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)
#define gfx_copy_pixels_to_screen(pixels, count)
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)
#define gfx_draw_filled_rect(x, y, width, height, color)
#define gfx_set_limits(x1, y1, x2, y2)
ili9341_color_t gfx_color_t
Data type for color values native to the display.
#define gfx_draw_vertical_line(x, y, length, color)