From a669be0918d3b0427e6ce549c1877963ce046b95 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 16 May 2005 06:33:30 +0000 Subject: [PATCH] reintroduced the FRAME color ... somehow it was lost from 1.0.x git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@561 a5681a0c-68f1-0310-ab6d-d61299d08faa --- doc/rrdgraph.pod | 13 +++++++------ src/rrd_graph.c | 8 +++++--- src/rrd_graph.h | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/rrdgraph.pod b/doc/rrdgraph.pod index a0a5422..6017efd 100644 --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@ -252,12 +252,13 @@ Override the default colors for the standard elements of the graph. The I is one of C background, C for the background of the actual graph, C for the left and top border, C for the right and bottom border, C, C for the major grid, C for -the color of the font, C for the axis of the graph and finally C -for the arrow head pointing to the future. Each color is composed out of -three hexadecimal numbers specifying its rgb color component (00 is off, FF is -maximum) of red, green and blue. Optionally you may add another hexadecimal -number specifying the transparency (FF is solid). You may set this option -several times to alter multiple defaults. +the color of the font, C for the axis of the graph, C for the +line around the color spots and finally C for the arrow head pointing +up and forward. Each color is composed out of three hexadecimal numbers +specifying its rgb color component (00 is off, FF is maximum) of red, green +and blue. Optionally you may add another hexadecimal number specifying the +transparency (FF is solid). You may set this option several times to alter +multiple defaults. A green arrow is made by: C<--color ARROW:00FF00> diff --git a/src/rrd_graph.c b/src/rrd_graph.c index a399491..a258685 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -100,8 +100,9 @@ gfx_color_t graph_col[] = /* default colors */ 0xE0505080, /* major grid */ 0x000000FF, /* font */ 0x802020FF, /* arrow */ - 0x202020FF /* axis */ -}; + 0x202020FF, /* axis */ + 0x000000FF /* frame */ +}; /* #define DEBUG */ @@ -222,6 +223,7 @@ enum grc_en grc_conv(char *string){ conv_if(FONT,GRC_FONT) conv_if(ARROW,GRC_ARROW) conv_if(AXIS,GRC_AXIS) + conv_if(FRAME,GRC_FRAME) return -1; } @@ -2021,7 +2023,7 @@ grid_paint(image_desc_t *im) node = gfx_new_line(im->canvas, X0-1,Y0-boxV, X0-1,Y0, - 1,im->graph_col[GRC_FONT]); + 1,im->graph_col[GRC_FRAME]); gfx_add_point(node,X0+boxH,Y0); gfx_add_point(node,X0+boxH,Y0-boxV); gfx_close_path(node); diff --git a/src/rrd_graph.h b/src/rrd_graph.h index ca3e7c3..9cbfd02 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -21,7 +21,7 @@ enum tmt_en {TMT_SECOND=0,TMT_MINUTE,TMT_HOUR,TMT_DAY, TMT_WEEK,TMT_MONTH,TMT_YEAR}; enum grc_en {GRC_CANVAS=0,GRC_BACK,GRC_SHADEA,GRC_SHADEB, - GRC_GRID,GRC_MGRID,GRC_FONT,GRC_ARROW,GRC_AXIS,__GRC_END__}; + GRC_GRID,GRC_MGRID,GRC_FONT,GRC_ARROW,GRC_AXIS,GRC_FRAME,__GRC_END__}; #define MGRIDWIDTH 0.6 #define GRIDWIDTH 0.4 -- 2.11.0