tffplot.h - ploot - simple plotting tools HTML git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot DIR Log DIR Files DIR Refs DIR Tags DIR README --- tffplot.h (990B) --- 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 /**/ 26 void ffplot_pixel (struct ffplot *, struct ffcolor *, int, int); 27 void ffplot_rectangle (struct ffplot *, struct ffcolor *, int, int, int, int); 28 void ffplot_line (struct ffplot *, struct ffcolor *, int, int, int, int); 29 int ffplot_char (struct ffplot *, struct ffcolor *, struct font *, char, int, int); 30 size_t ffplot_text_left (struct ffplot *, struct ffcolor *, struct font *, char *, int, int); 31 size_t ffplot_text_center (struct ffplot *, struct ffcolor *, struct font *, char *, int, int); 32 size_t ffplot_text_right (struct ffplot *, struct ffcolor *, struct font *, char *, int, int); 33 void ffplot_print (FILE *, struct ffplot *); 34 35 #endif