diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-03-13 15:58:24 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2000-03-13 15:58:24 +0000 |
commit | 1f0791dbac416903409b420ce5bdd73a1944c3d4 (patch) | |
tree | c72c000f26428a310cd2778e7c301ca24e026e09 /display.c | |
parent | 713dd4045fdc6312cb80a4aee9b17a3dd5cc1368 (diff) | |
download | lcd4linux-1f0791dbac416903409b420ce5bdd73a1944c3d4.tar.gz |
[lcd4linux @ 2000-03-13 15:58:24 by reinelt]
release 0.9
moved row parsing to parser.c
all basic work finished
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@10 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.4 2000/03/10 17:36:02 reinelt Exp $ +/* $Id: display.c,v 1.5 2000/03/13 15:58:24 reinelt Exp $ * * framework for device drivers * @@ -20,6 +20,12 @@ * * * $Log: display.c,v $ + * Revision 1.5 2000/03/13 15:58:24 reinelt + * + * release 0.9 + * moved row parsing to parser.c + * all basic work finished + * * Revision 1.4 2000/03/10 17:36:02 reinelt * * first unstable but running release @@ -59,6 +65,7 @@ #include <stdlib.h> #include <stdio.h> +#include <math.h> #include "cfg.h" #include "display.h" @@ -118,6 +125,12 @@ int lcd_bar (int type, int row, int col, int max, int len1, int len2) { if (row<1 || row>Display->rows) return -1; if (col<1 || col>Display->cols) return -1; + if (!(type & (BAR_H2 | BAR_V2))) len2=len1; + if (type & BAR_LOG) { + type &= ~BAR_LOG; + len1=(double)max*log(len1+1)/log(max); + len2=(double)max*log(len2+1)/log(max); + } return Display->bar(type, row-1, col-1, max, len1, len2); } |