X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_gfx.c;h=5a8c289dffcb31d54e2bfac406e8a209ab6efcc8;hp=8d4a35c2c4187e4b74ad59252cc5c4b20ecdf4ba;hb=f207955a7e325708d056d3dd912863dc9930a71c;hpb=99cad73f747d237be957a95911224b27a0dcc6f7 diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index 8d4a35c..5a8c289 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2rc3 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2rc6 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd_gfx.c graphics wrapper for rrdtool **************************************************************************/ @@ -321,14 +321,6 @@ static void gfx_libart_close_path(gfx_node_t *node, ArtVpath **vec) art_vpath_add_point (vec, &points, &points_max, ART_END, 0, 0); } -static void gfx_round_scaled_coordinates(ArtVpath *vec) -{ - while (vec->code != ART_END) { - vec->x = floor(vec->x - LINEOFFSET + 0.5) + LINEOFFSET; - vec->y = floor(vec->y - LINEOFFSET + 0.5) + LINEOFFSET; - vec++; - } -} /* find bbox of a string */ static void compute_string_bbox(gfx_string string) { @@ -524,7 +516,7 @@ int gfx_render_png (gfx_canvas_t *canvas, vec = art_vpath_affine_transform(node->path,dst); if (node->closed_path) gfx_libart_close_path(node, &vec); - gfx_round_scaled_coordinates(vec); + /* gfx_round_scaled_coordinates(vec); */ pvec = art_vpath_perturb(vec); art_free(vec); if(node->type == GFX_LINE){ @@ -535,7 +527,7 @@ int gfx_render_png (gfx_canvas_t *canvas, svp = art_svp_from_vpath ( pvec ); svpt = art_svp_uncross( svp ); art_free(svp); - svp = art_svp_rewind_uncrossed(svpt,ART_WIND_RULE_ODDEVEN); + svp = art_svp_rewind_uncrossed(svpt,ART_WIND_RULE_NONZERO); art_free(svpt); } art_free(pvec); @@ -565,8 +557,10 @@ int gfx_render_png (gfx_canvas_t *canvas, (char *)node->filename, 0, &face ); - if ( error ) break; - + if ( error ) { + rrd_set_error("failed to load %s",node->filename); + break; + } error = FT_Set_Char_Size(face, /* handle to face object */ (long)(node->size*64), (long)(node->size*64), @@ -1337,7 +1331,7 @@ static int eps_prologue(eps_state *state) gfx_node_t *node; fputs( "%!PS-Adobe-3.0 EPSF-3.0\n" - "%%Creator: RRDtool 1.2rc3 Tobias Oetiker, http://tobi.oetiker.ch\n" + "%%Creator: RRDtool 1.2rc6 Tobias Oetiker, http://tobi.oetiker.ch\n" /* can't like weird chars here */ "%%Title: (RRDtool output)\n" "%%DocumentData: Clean7Bit\n"