53#include "px_gfx_cfg.h"
56#if ( !defined(PX_GFX_DISP_SIZE_X ) \
57 || !defined(PX_GFX_DISP_SIZE_Y ) \
58 || !defined(PX_GFX_CFG_STR_BUFFER_SIZE) \
59 || !defined(PX_GFX_CFG_DEFAULT_FONT ) )
60#error "One or more options not defined in 'px_gfx_cfg.h'"
76#define PX_GFX_X_MID (PX_GFX_DISP_SIZE_X / 2)
77#define PX_GFX_X_MAX (PX_GFX_DISP_SIZE_X - 1)
79#define PX_GFX_Y_MID (PX_GFX_DISP_SIZE_Y / 2)
80#define PX_GFX_Y_MAX (PX_GFX_DISP_SIZE_Y - 1)
89 PX_GFX_COLOR_TRANSPARENT,
105#define PX_GFX_ALIGN_TOP_LEFT (px_gfx_align_t)(PX_GFX_ALIGN_V_TOP | PX_GFX_ALIGN_H_LEFT )
106#define PX_GFX_ALIGN_TOP_MID (px_gfx_align_t)(PX_GFX_ALIGN_V_TOP | PX_GFX_ALIGN_H_MID )
107#define PX_GFX_ALIGN_TOP_RIGHT (px_gfx_align_t)(PX_GFX_ALIGN_V_TOP | PX_GFX_ALIGN_H_RIGHT)
108#define PX_GFX_ALIGN_MID (px_gfx_align_t)(PX_GFX_ALIGN_V_MID | PX_GFX_ALIGN_H_MID )
109#define PX_GFX_ALIGN_BOT_LEFT (px_gfx_align_t)(PX_GFX_ALIGN_V_BOT | PX_GFX_ALIGN_H_LEFT )
110#define PX_GFX_ALIGN_BOT_MID (px_gfx_align_t)(PX_GFX_ALIGN_V_BOT | PX_GFX_ALIGN_H_MID )
111#define PX_GFX_ALIGN_BOT_RIGHT (px_gfx_align_t)(PX_GFX_ALIGN_V_BOT | PX_GFX_ALIGN_H_RIGHT)
119 const uint8_t * data;
127 const uint8_t * data;
393 const char * format, ...);
px_gfx_xy_ref_t xy_ref
Coordinate reference.
px_gfx_xy_t height
Height.
void px_gfx_draw_line_hor(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t width)
Draw a horizontal line using the current foreground color.
px_gfx_color_t
Foreground and background color definitions.
void px_gfx_printf(px_gfx_xy_t x, px_gfx_xy_t y, const char *format,...)
Draw a formatted font string using the current foreground color.
void px_gfx_view_port_set(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t width, px_gfx_xy_t height, px_gfx_xy_ref_t xy_ref)
Set a drawing view port.
px_gfx_align_t px_gfx_align_set(px_gfx_align_t align)
Set the new alignment.
px_gfx_xy_ref_t
X Y coordinate reference.
void px_gfx_draw(void)
Redraw whole display using display buffer.
void px_gfx_draw_char(px_gfx_xy_t x, px_gfx_xy_t y, char glyph)
Draw a font character using the current foreground color.
px_gfx_color_t px_gfx_color_bg_set(px_gfx_color_t color)
Set the new background drawing color.
px_gfx_align_t
Alignment definition.
void px_gfx_view_port_reset(void)
Reset view port.
void px_gfx_draw_img(px_gfx_xy_t x, px_gfx_xy_t y, const px_gfx_img_t *img)
Draw a graphic image using the current foreground and background color.
void px_gfx_draw_line(px_gfx_xy_t x1, px_gfx_xy_t y1, px_gfx_xy_t x2, px_gfx_xy_t y2)
Draw a line using the current foreground color.
int16_t px_gfx_xy_t
Size definition of an X or Y coordinate.
bool px_gfx_update_area_get(px_gfx_area_t *area)
Get total area of frame that has changed.
void px_gfx_draw_fill_fg(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t width, px_gfx_xy_t height)
Draw a solid rectangular fill in the current foreground color.
void px_gfx_draw_str(px_gfx_xy_t x, px_gfx_xy_t y, const char *str)
Draw a font string using the current foreground color.
void px_gfx_draw_rect(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t width, px_gfx_xy_t height)
Draw a rectangle using the current foreground color.
void px_gfx_draw_prop_reset(void)
Reset drawing properties to default.
void px_gfx_draw_update(void)
Update display with total area that has changed in display buffer.
void px_gfx_buf_clear(void)
Clear display buffer.
void px_gfx_draw_pixel(px_gfx_xy_t x, px_gfx_xy_t y)
Draw a pixel using the current foreground color.
void px_gfx_draw_circ(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t radius)
Draw a circle using the current foreground color.
void px_gfx_draw_fill_bg(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t width, px_gfx_xy_t height)
Draw a solid rectangular fill in the current background color.
void px_gfx_init(void)
Initialise graphics library.
px_gfx_color_t px_gfx_color_fg_set(px_gfx_color_t color)
Set the new foreground drawing color.
const px_gfx_font_t * px_gfx_font_set(const px_gfx_font_t *font)
Set the new font.
void px_gfx_draw_line_ver(px_gfx_xy_t x, px_gfx_xy_t y, px_gfx_xy_t height)
Draw a vertical line using the current foreground color.
@ PX_GFX_XY_REF_ABS
Coordinate references are absolute (relative to display)
@ PX_GFX_XY_REF_REL
Coordinate references are relative to view port.
@ PX_GFX_ALIGN_V_BOT
Vertical (y) bottom.
@ PX_GFX_ALIGN_H_LEFT
Horizontal (x) left.
@ PX_GFX_ALIGN_V_MID
Vertical (y) middle.
@ PX_GFX_ALIGN_H_MID
Horizontal (x) middle.
@ PX_GFX_ALIGN_V_TOP
Vertical (y) top.
@ PX_GFX_ALIGN_H_RIGHT
Horizontal (x) right.