X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_gfx.h;h=990aec97b532ceccd5dd7647b59e9faec1d26746;hb=fbe390e15d3484315efe5802577249c8959e3556;hp=8dfc6d3dc8517c3b44ad148a5165bb9da4bb665f;hpb=f9e5bd6a9d41c4607291cbbd88280129184ab325;p=rrdtool.git diff --git a/src/rrd_gfx.h b/src/rrd_gfx.h index 8dfc6d3..990aec9 100644 --- a/src/rrd_gfx.h +++ b/src/rrd_gfx.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2rc6 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.21 Copyright by Tobi Oetiker, 1997-2007 **************************************************************************** * rrd_gfx.h generic graphics adapter library ****************************************************************************/ @@ -8,14 +8,22 @@ #define RRD_GFX_H #define LIBART_COMPILATION +#define y0 libart_y0 +#define y1 libart_y1 +#define gamma libart_gamma #include #include #include "art_rgba_svp.h" +#undef gamma +#undef y0 +#undef y1 + enum gfx_if_en {IF_PNG=0,IF_SVG,IF_EPS,IF_PDF}; enum gfx_en { GFX_LINE=0,GFX_AREA,GFX_TEXT }; enum gfx_h_align_en { GFX_H_NULL=0, GFX_H_LEFT, GFX_H_RIGHT, GFX_H_CENTER }; enum gfx_v_align_en { GFX_V_NULL=0, GFX_V_TOP, GFX_V_BOTTOM, GFX_V_CENTER }; +enum gfx_aa_type_en {AA_NORMAL=0,AA_LIGHT,AA_NONE}; typedef unsigned long gfx_color_t; typedef struct gfx_node_t { @@ -45,6 +53,8 @@ typedef struct gfx_canvas_t enum gfx_if_en imgformat; /* image format */ int interlaced; /* will the graph be interlaced? */ double zoom; /* zoom for graph */ + double font_aa_threshold; /* no anti-aliasing for sizes <= */ + enum gfx_aa_type_en aa_type; /* anti-aliasing type (normal/light/none) */ } gfx_canvas_t; gfx_canvas_t *gfx_new_canvas (void); @@ -103,8 +113,9 @@ int gfx_destroy (gfx_canvas_t *canvas); int gfx_render_png (gfx_canvas_t *canvas, art_u32 width, art_u32 height, gfx_color_t background, FILE *fo); -double gfx_get_text_width_libart ( double start, char* font, double size, - double tabwidth, char* text, int rotation); +double gfx_get_text_width_libart ( gfx_canvas_t *canvas, double start, + char* font, double size, double tabwidth, + char* text, int rotation ); /* SVG support */ int gfx_render_svg (gfx_canvas_t *canvas,