projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
started updating for 1.2 release
[rrdtool.git]
/
src
/
rrd_gfx.c
diff --git
a/src/rrd_gfx.c
b/src/rrd_gfx.c
index
8d4a35c
..
5a8c289
100644
(file)
--- a/
src/rrd_gfx.c
+++ b/
src/rrd_gfx.c
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * RRDtool 1.2rc
3
Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2rc
6
Copyright by Tobi Oetiker, 1997-2005
****************************************************************************
* rrd_gfx.c graphics wrapper for rrdtool
**************************************************************************/
****************************************************************************
* 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);
}
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) {
/* 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);
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){
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_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);
art_free(svpt);
}
art_free(pvec);
@@
-565,8
+557,10
@@
int gfx_render_png (gfx_canvas_t *canvas,
(char *)node->filename,
0,
&face );
(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),
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"
gfx_node_t *node;
fputs(
"%!PS-Adobe-3.0 EPSF-3.0\n"
- "%%Creator: RRDtool 1.2rc
3
Tobias Oetiker, http://tobi.oetiker.ch\n"
+ "%%Creator: RRDtool 1.2rc
6
Tobias Oetiker, http://tobi.oetiker.ch\n"
/* can't like weird chars here */
"%%Title: (RRDtool output)\n"
"%%DocumentData: Clean7Bit\n"
/* can't like weird chars here */
"%%Title: (RRDtool output)\n"
"%%DocumentData: Clean7Bit\n"