X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.h;h=cffce4b00570710674437aa0b2ec670988b3e7a3;hb=210e991460e82d01d086f853e65485040eb2fffb;hp=c21f35681d3a8ac3173f9484ac55ea140da7ddf0;hpb=6d19d9d651c2b710f26ba98417f280d1b6cd9cf4;p=rrdtool.git diff --git a/src/rrd_graph.h b/src/rrd_graph.h index c21f356..cffce4b 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -61,11 +61,13 @@ enum vdef_op_en { , VDEF_LSLINT /* least squares line y_intercept */ , VDEF_LSLCORREL /* least squares line correlation coefficient */ }; -enum text_prop_en { TEXT_PROP_DEFAULT = 0, /* default settings */ +enum text_prop_en { + TEXT_PROP_DEFAULT = 0, /* default settings */ TEXT_PROP_TITLE, /* properties for the title */ TEXT_PROP_AXIS, /* for the numbers next to the axis */ TEXT_PROP_UNIT, /* for the vertical unit description */ - TEXT_PROP_LEGEND, /* fot the legend below the graph */ + TEXT_PROP_LEGEND, /* for the legend below the graph */ + TEXT_PROP_WATERMARK, /* for the little text to the side of the graph */ TEXT_PROP_LAST }; @@ -87,6 +89,7 @@ typedef struct gfx_color_t { typedef struct text_prop_t { double size; char font[1024]; + PangoFontDescription *font_desc; } text_prop_t; @@ -244,7 +247,7 @@ typedef struct image_desc_t { cairo_t *cr; /* drawin context */ cairo_font_options_t *font_options; /* cairo font options */ cairo_antialias_t graph_antialias; /* antialiasing for the graph */ - + PangoLayout *layout; /* the pango layout we use for writing fonts */ rrd_info_t *grinfo; /* root pointer to extra graph info */ rrd_info_t *grinfo_current; /* pointing to current entry */ } image_desc_t; @@ -339,6 +342,7 @@ int scan_for_col( char *const); void rrd_graph_init( image_desc_t *); + void rrd_graph_options( int, char **, @@ -418,8 +422,7 @@ void gfx_text( double x, double y, gfx_color_t color, - char *font, - double size, + PangoFontDescription *font_desc, double tabwidth, double angle, enum gfx_h_align_en h_align, @@ -430,8 +433,7 @@ void gfx_text( double gfx_get_text_width( image_desc_t *im, double start, - char *font, - double size, + PangoFontDescription *font_desc, double tabwidth, char *text); @@ -455,5 +457,4 @@ void gfx_area_fit( void grinfo_push( image_desc_t *im, char *key, - rrd_info_type_t type, - rrd_infoval_t value); + rrd_info_type_t type, rrd_infoval_t value);