/* * fblib.h * * Adapted by Florian Klemenz for use in the fb_dash project * * Source and all credit goes to * http://raspberrycompote.blogspot.ie/2014/03/low-level-graphics-on-raspberry-pi-part_14.html * * Original work by J-P Rosti (a.k.a -rst- and 'Raspberry Compote') * * Licensed under the Creative Commons Attribution 3.0 Unported License * (http://creativecommons.org/licenses/by/3.0/deed.en_US) * * Distributed in the hope that this will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ #ifndef FBLIB_H #define FBLIB_H #include #include #include #include #include "fbfont.h" #define WIDTH 240 #define HEIGHT 320 void put_pixel(char *fbp, int x, int y, int r, int g, int b); void clear_screen(char *fbp); void draw_line(char *fbp, int x0, int y0, int x1, int y1, int r, int g, int b); void draw_rect(char *fbp, int x0, int y0, int w, int h, int r, int g, int b); void fill_rect(char *fbp, int x, int y, int w, int h, int r, int g, int b); void draw_circle(char *fbp, int x0, int y0, int radius, int r, int g, int b); void fill_circle(char *fbp, int x0, int y0, int radius, int r, int g, int b); void render_string(char *fbp, fbfont font, char *text, int x, int y, int r, int g, int b); #endif