/****************************************************************************
- * RRDtool 1.2.5 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005
****************************************************************************
* rrd__graph.c produce graphs from data in rrdfiles
****************************************************************************/
}
} else {
- float ybase0 = DNAN,ytop0=DNAN;
+ double ybase0 = DNAN,ytop0=DNAN;
for(ii=0;ii<im->xsize;ii++){
/* keep things simple for now, just draw these bars
do not try to build a big and complex area */
- float ybase,ytop;
+ double ybase,ytop;
if ( im->slopemode == 0 && ii==0){
continue;
}
/* every area has to be wound clock-wise,
so we have to make sur base remains base */
if (ybase > ytop){
- float extra = ytop;
+ double extra = ytop;
ytop = ybase;
ybase = extra;
}
}
if ( !isnan(ybase0) ){
node = gfx_new_area(im->canvas,
- ii-1+im->xorigin,ybase0,
- ii-1+im->xorigin,ytop0,
- ii+im->xorigin,ytop,
+ (double)ii-1.2+(double)im->xorigin,ybase0-0.2,
+ (double)ii-1.2+(double)im->xorigin,ytop0+0.2,
+ (double)ii+0.2+(double)im->xorigin,ytop+0.2,
im->gdes[i].col
);
gfx_add_point(node,
- ii+im->xorigin,ybase
+ (double)ii+0.02+im->xorigin,ybase-0.2
);
}
ybase0=ybase;
int ci;
int col_len = col_end - col_start;
switch (col_len){
+ case 3:
+ color = (
+ ((color & 0xF00) * 0x110000) |
+ ((color & 0x0F0) * 0x011000) |
+ ((color & 0x00F) * 0x001100) |
+ 0x000000FF
+ );
+ break;
+ case 4:
+ color = (
+ ((color & 0xF000) * 0x11000) |
+ ((color & 0x0F00) * 0x01100) |
+ ((color & 0x00F0) * 0x00110) |
+ ((color & 0x000F) * 0x00011)
+ );
+ break;
case 6:
color = (color << 8) + 0xff /* shift left by 8 */;
break;