update README with text

This commit is contained in:
2026-10-05 02:27:32 +02:00
parent 760d2abc6c
commit e72588f792
+17 -1
View File
@@ -7,7 +7,7 @@
1. Put Pixel - Lets you color one given pixel in the framebuffer.
```c
void put_pixel(unsigned int x, unsigned int y, uint32_t color);
void put_pixel(uint32_t x, uint32_t y, uint32_t color);
```
2. Clear Framebuffer - Lets you fill the entire framebuffer with one color.
@@ -16,6 +16,22 @@ void put_pixel(unsigned int x, unsigned int y, uint32_t color);
void clear_framebuffer(uint32_t color);
```
3. Put String - Lets you display multiline text with a size, foreground and background color on a given (x,y). You can specify the spacing between letters and lines. Supported characters are in `text.c` - feel free to add some if you want to.
```c
void
put_string(
const char *text,
uint32_t x,
uint32_t y,
uint32_t size,
uint32_t spacing,
uint32_t line_spacing,
uint32_t fg_color,
uint32_t bg_color
);
```
#### Usage
The main function of a program that uses this engine should look something like this: