diff options
Diffstat (limited to '')
-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); } |