From 5146eb2377a9001f52d3d84a5f0bbf3bb1f48f61 Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Wed, 10 Sep 2003 14:01:53 +0000 Subject: [lcd4linux @ 2003-09-10 14:01:52 by reinelt] icons nearly finished\! --- pixmap.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'pixmap.c') diff --git a/pixmap.c b/pixmap.c index 26f3b2f..8cd086e 100644 --- a/pixmap.c +++ b/pixmap.c @@ -1,4 +1,4 @@ -/* $Id: pixmap.c,v 1.10 2002/08/19 04:41:20 reinelt Exp $ +/* $Id: pixmap.c,v 1.11 2003/09/10 14:01:53 reinelt Exp $ * * generic pixmap driver * @@ -20,6 +20,9 @@ * * * $Log: pixmap.c,v $ + * Revision 1.11 2003/09/10 14:01:53 reinelt + * icons nearly finished\! + * * Revision 1.10 2002/08/19 04:41:20 reinelt * introduced bar.c, moved bar stuff from display.h to bar.h * @@ -84,14 +87,19 @@ * int pix_bar (int type, int row, int col, int max, int len1, int len2); * draws a bar into the pixmap * + * void pix_icon (int ascii, char *buffer) + * used as the "define char" function for icons + * */ + #include #include #include #include "display.h" #include "bar.h" +#include "icon.h" #include "pixmap.h" #include "fontmap.h" #include "debug.h" @@ -103,6 +111,7 @@ static int YRES=0; unsigned char *LCDpixmap=NULL; + int pix_clear(void) { int i; @@ -114,6 +123,7 @@ int pix_clear(void) return 0; } + int pix_init (int rows, int cols, int xres, int yres) { if (rows<1 || cols<1 || xres<1 || yres<1) @@ -133,6 +143,7 @@ int pix_init (int rows, int cols, int xres, int yres) return pix_clear(); } + int pix_put (int row, int col, char *text) { int c, x, y, mask; @@ -157,6 +168,7 @@ int pix_put (int row, int col, char *text) return 0; } + #define N_BAR_T 10 int pix_bar (int type, int row, int col, int max, int len1, int len2) @@ -273,3 +285,28 @@ int pix_bar (int type, int row, int col, int max, int len1, int len2) return 0; } + +void pix_icon (int ascii, char *buffer) +{ + // we have to peek the whole screen for this particular icon, + // and render it again + + int row, col; + int x, y, mask; + int c; + + for (row=0; row>=1; + LCDpixmap[(row*YRES+y)*COLS+col*XRES+x]=buffer[y]&mask?1:0; + } + } + } + } + +} -- cgit v1.2.3