4 #include <twr_common.h>
5 #include <twr_font_common.h>
25 bool (*is_ready)(
void *
self);
28 void (*clear)(
void *
self);
31 void (*draw_pixel)(
void *
self,
int left,
int top, uint32_t color);
34 uint32_t (*get_pixel)(
void *
self,
int left,
int top);
37 bool (*update)(
void *
self);
void twr_gfx_draw_fill_round_corner(twr_gfx_t *self, int x0, int y0, int radius, twr_gfx_round_corner_t corner, uint32_t color)
Lcd draw fill round corner, using Midpoint circle algorithm.
void twr_gfx_draw_rectangle(twr_gfx_t *self, int x0, int y0, int x1, int y1, uint32_t color)
Display draw rectangle.
void twr_gfx_draw_fill_rectangle(twr_gfx_t *self, int x0, int y0, int x1, int y1, uint32_t color)
Display draw fill rectangle.
void twr_gfx_draw_round_corner(twr_gfx_t *self, int x0, int y0, int radius, twr_gfx_round_corner_t corner, uint32_t color)
Lcd draw round corner, using Midpoint circle algorithm.
void twr_gfx_draw_line(twr_gfx_t *self, int x0, int y0, int x1, int y1, uint32_t color)
Display draw line.
void twr_gfx_set_font(twr_gfx_t *self, const twr_font_t *font)
Set font.
twr_gfx_caps_t twr_gfx_get_caps(twr_gfx_t *self)
Get Display capabilities.
void twr_gfx_set_rotation(twr_gfx_t *self, twr_gfx_rotation_t rotation)
Set rotation.
int twr_gfx_draw_char(twr_gfx_t *self, int left, int top, uint8_t ch, uint32_t color)
Display draw char.
void twr_gfx_init(twr_gfx_t *self, void *display, const twr_gfx_driver_t *driver)
Initialize button.
twr_gfx_rotation_t twr_gfx_get_rotation(twr_gfx_t *self)
Get rotation.
bool twr_gfx_display_is_ready(twr_gfx_t *self)
Check if display driver is ready for commands.
int twr_gfx_calc_string_width(twr_gfx_t *self, char *str)
Calc width string.
void twr_gfx_draw_fill_rectangle_dithering_color(twr_gfx_t *self, int x0, int y0, int x1, int y1, uint16_t pattern, uint32_t color_fg, uint32_t color_bg)
Display draw fill rectangle with a dithering pattern defined in the pattern parameter,...
void twr_gfx_draw_fill_rectangle_dithering(twr_gfx_t *self, int x0, int y0, int x1, int y1, uint32_t color)
Display draw fill rectangle with a dithering pattern defined in the color parameter.
void twr_gfx_draw_circle(twr_gfx_t *self, int x0, int y0, int radius, uint32_t color)
Lcd draw circle, using Midpoint circle algorithm.
twr_gfx_rotation_t
Rotation.
void twr_gfx_draw_pixel(twr_gfx_t *self, int x, int y, uint32_t color)
Draw pixel.
void twr_gfx_clear(twr_gfx_t *self)
Clear.
int twr_gfx_draw_string(twr_gfx_t *self, int left, int top, char *str, uint32_t color)
Display draw string.
void twr_gfx_draw_fill_circle(twr_gfx_t *self, int x0, int y0, int radius, uint32_t color)
Lcd draw fill circle, using Midpoint circle algorithm.
int twr_gfx_printf(twr_gfx_t *self, int left, int top, uint32_t color, char *format,...)
Display string.
bool twr_gfx_update(twr_gfx_t *self)
Display update, send data.
int twr_gfx_calc_char_width(twr_gfx_t *self, uint8_t ch)
Calc width character.
@ TWR_GFX_ROTATION_270
Rotation 270 degrees.
@ TWR_GFX_ROTATION_180
Rotation 180 degrees.
@ TWR_GFX_ROTATION_90
Rotation 90 degrees.
@ TWR_GFX_ROTATION_0
Rotation 0 degrees.
@ TWR_GFX_ROUND_CORNER_RIGHT_TOP
Round corner right top.
@ TWR_GFX_ROUND_CORNER_LEFT_TOP
Round corner left top.
@ TWR_GFX_ROUND_CORNER_RIGHT_BOTTOM
Round corner right bottom.
@ TWR_GFX_ROUND_CORNER_LEFT_BOTTOM
Round corner left bottom.
Display driver interface.