]> git.defcon.no Git - avrfbosd/blob - draw.h
Starting to get somewhere on the video-sync-detect
[avrfbosd] / draw.h
1 #ifndef DRAW_H
2 #define DRAW_H
3
4 #include <stdint.h>
5 #include "video_properties.h"
6
7 #define c_BLACK 0
8 #define c_WHITE 1
9 #define c_INVERT 2
10 #define c_NONE -1
11
12
13 void sp(uint8_t x, uint8_t y, uint8_t color);
14
15 void set_pixel(uint8_t x, uint8_t y, uint8_t color);
16 // TODO: may need unsigned char get_pixel(uint8_t x, uint8_t y);
17
18 void fill(uint8_t color);
19 // TODO: may need void shift(uint8_t distance, uint8_t direction);
20
21 void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t c);
22 void draw_row(uint8_t x, uint8_t y0, uint8_t y1, uint8_t c);
23 void draw_col(uint8_t y, uint8_t x0, uint8_t x1, uint8_t c);
24
25 void _draw_rect(uint8_t x0, uint8_t y0, uint8_t w, uint8_t h, int8_t c, int8_t fc);
26 void _draw_circle(uint8_t x0, uint8_t y0, uint8_t radius, int8_t c, int8_t fc);
27
28 void draw_rect(uint8_t x0, uint8_t y0, uint8_t w, uint8_t h, uint8_t c);
29 void fill_rect(uint8_t x0, uint8_t y0, uint8_t w, uint8_t h, uint8_t c);
30 void draw_circle(uint8_t x0, uint8_t y0, uint8_t radius, char c);
31 void fill_circle(uint8_t x0, uint8_t y0, uint8_t radius, char c);
32
33 // TODO: WILL need void draw_bitmap(uint8_t x, uint8_t y, const unsigned char * bmp, uint16_t i = 0, uint8_t width = 0, uint8_t lines = 0);
34 // TODO draw_bitmap() will be useful for printing text, as printing text
35 // TODO is drawing font elements, and font elements are ... bitmaps.
36
37 #endif