rearrange

This commit is contained in:
2026-08-07 10:20:12 +02:00
parent 82ef2ad50d
commit 1d9eebf5ce
9 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
idf_component_register(
SRCS "gfx.c"
INCLUDE_DIRS "."
INCLUDE_DIRS "include"
)

View File

@@ -7,13 +7,16 @@ Made for ST7920 with my own driver library, but it should be pretty universal, i
The API is pretty self-explanatory, but just in case
```c
#include <esp-gfx/gfx.h>
#include <esp-gfx/fonts/NokiaBig.h>
const gfx_canvas_t canvas = {
.ctx = &dev,
.draw_pixel_callback = st7567_draw_pixel,
.clear_pixel_callback = st7567_clear_pixel,
};
const GFXfont *font = &FreeSans9pt7b;
const GFXfont *font = &NokiaBig;
st7567_clear(canvas.ctx);
gfx_fill_box(&canvas, 40, 40, 8, 8, false);
gfx_draw_string(&canvas, font, 0, 16, "Hello", false);