#include "rrd_tool.h"
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <io.h>
#include <fcntl.h>
#endif
if (! im->rigid) {
/* keep yval as-is */
} else if (yval > im->yorigin) {
- yval = im->yorigin;
+ yval = im->yorigin +0.00001;
} else if (yval < im->yorigin - im->ysize){
- yval = im->yorigin - im->ysize;
+ yval = im->yorigin - im->ysize - 0.00001;
}
return yval;
}
node=gfx_new_area ( im->canvas,
0, 0,
- im->ximg, 0,
- im->ximg, im->yimg,
+ 0, im->yimg,
+ im->ximg, im->yimg,
im->graph_col[GRC_BACK]);
- gfx_add_point(node,0, im->yimg);
+ gfx_add_point(node,im->ximg, 0);
#ifdef WITH_PIECHART
if (piechart != 2) {
}
if ( !isnan(ybase0) ){
node = gfx_new_area(im->canvas,
- (double)ii-1.1+(double)im->xorigin,ybase0-0.1,
- (double)ii-1.1+(double)im->xorigin,ytop0+0.1,
- (double)ii+0.1+(double)im->xorigin,ytop+0.1,
+ (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,
- (double)ii+0.01+im->xorigin,ybase-0.1
+ (double)ii+0.02+im->xorigin,ybase-0.2
);
}
ybase0=ybase;
if (strcmp(im->graphfile,"-")==0) {
fo = im->graphhandle ? im->graphhandle : stdout;
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/* Change translation mode for stdout to BINARY */
_setmode( _fileno( fo ), O_BINARY );
#endif
return (-1);
}
}
- gfx_render (im->canvas,im->ximg,im->yimg,0x0,fo);
+ gfx_render (im->canvas,im->ximg,im->yimg,0x00000000,fo);
if (strcmp(im->graphfile,"-") != 0)
fclose(fo);
return 0;
for(i=0;i<DIM(graph_col);i++)
im->graph_col[i]=graph_col[i];
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
{
char *windir;
char rrd_win_default_font[1000];
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;