-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphics.h
More file actions
29 lines (19 loc) · 949 Bytes
/
graphics.h
File metadata and controls
29 lines (19 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* OneOS-ARM Graphics Library */
#ifndef GRAPHICS_H
#define GRAPHICS_H
#include "fb.h"
/* Font: 8x8 bitmap font (ASCII) */
extern const unsigned char font8x8[128][8];
/* Draw character at position */
void gfx_draw_char(int x, int y, char c, unsigned int fg_color, unsigned int bg_color);
/* Draw string */
void gfx_draw_string(int x, int y, const char *str, unsigned int fg_color, unsigned int bg_color);
/* Draw character with transparent background */
void gfx_draw_char_transparent(int x, int y, char c, unsigned int fg_color);
/* Draw string with transparent background */
void gfx_draw_string_transparent(int x, int y, const char *str, unsigned int fg_color);
/* Draw a filled rectangle with border */
void gfx_draw_window(int x, int y, int width, int height, unsigned int border_color, unsigned int bg_color);
/* Draw button */
void gfx_draw_button(int x, int y, int width, int height, const char *label, unsigned int color);
#endif