rearrange
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
idf_component_register(
|
||||
SRCS "gfx.c"
|
||||
INCLUDE_DIRS "."
|
||||
INCLUDE_DIRS "include"
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user