tffplot.h - ploot - simple plotting tools
(HTM) git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
---
tffplot.h (965B)
---
1 #ifndef FFPLOT_H
2 #define FFPLOT_H
3
4 #include <stdio.h>
5 #include <stddef.h>
6 #include <stdint.h>
7
8 #include "font.h"
9
10 struct ffcolor {
11 uint16_t red;
12 uint16_t green;
13 uint16_t blue;
14 uint16_t alpha;
15 };
16
17 struct ffplot {
18 int w; /* width */
19 int h; /* height */
20 int x; /* x offset */
21 int y; /* y offset */
22 struct ffcolor *buf;
23 };
24
25 void ffplot_pixel(struct ffplot *, struct ffcolor *, int, int);
26 void ffplot_rectangle(struct ffplot *, struct ffcolor *, int, int, int, int);
27 void ffplot_line(struct ffplot *, struct ffcolor *, int, int, int, int);
28 int ffplot_char(struct ffplot *, struct ffcolor *, struct font *, char, int, int);
29 size_t ffplot_text_left(struct ffplot *, struct ffcolor *, struct font *, char *, int, int);
30 size_t ffplot_text_center(struct ffplot *, struct ffcolor *, struct font *, char *, int, int);
31 size_t ffplot_text_right(struct ffplot *, struct ffcolor *, struct font *, char *, int, int);
32 void ffplot_print(FILE *, struct ffplot *);
33
34 #endif