diff options
author | Marvin Borner | 2020-06-17 18:31:46 +0200 |
---|---|---|
committer | Marvin Borner | 2020-06-17 18:31:46 +0200 |
commit | eed77bd2970a00d1394ed027ceca5b646e4671ce (patch) | |
tree | c44643d98aed2b6818f2b33417c0dea9c5853094 /src/userspace/libgui/draw.c | |
parent | 49dfa1f4021026bf7c4d77817959c8aa24067016 (diff) |
Started rewrite
Diffstat (limited to 'src/userspace/libgui/draw.c')
-rw-r--r-- | src/userspace/libgui/draw.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/userspace/libgui/draw.c b/src/userspace/libgui/draw.c deleted file mode 100644 index 4576808..0000000 --- a/src/userspace/libgui/draw.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <gui.h> -#include <stdint.h> -#include <stdio.h> - -void gui_draw_rectangle(int x1, int y1, int x2, int y2, const u32 color[3]) -{ - int pos1 = x1 * vbe_bpl + y1 * vbe_pitch; - char *draw = (char *)&fb[pos1]; - for (int i = 0; i <= y2 - y1; i++) { - for (int j = 0; j <= x2 - x1; j++) { - draw[vbe_bpl * j] = (char)color[2]; - draw[vbe_bpl * j + 1] = (char)color[1]; - draw[vbe_bpl * j + 2] = (char)color[0]; - } - draw += vbe_pitch; - } -} - -void gui_screen_clear() -{ - gui_draw_rectangle(0, 0, vbe_width - 1, vbe_height - 1, terminal_background); -}
\ No newline at end of file |