summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: bad8b55)
raw | patch | inline | side by side (from parent 1: bad8b55)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 17 Aug 2010 21:41:03 +0000 (21:41 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 17 Aug 2010 21:41:03 +0000 (21:41 +0000) |
of graphs generated. fix for #208
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2117 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2117 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_graph.c | patch | blob | history |
index b23a3d2f517c69078081a7e23122fe01d8a6b108..f26966cc3eae2eb41e4d19c9501a8db6a728de80 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
free(im->gdes[i].rpnp);
}
free(im->gdes);
free(im->gdes[i].rpnp);
}
free(im->gdes);
+
+ for (i = 0; i < DIM(text_prop);i++){
+ pango_font_description_free(im->text_prop[i].font_desc);
+ im->text_prop[i].font_desc = NULL;
+ }
+
if (im->font_options)
cairo_font_options_destroy(im->font_options);
if (im->font_options)
cairo_font_options_destroy(im->font_options);
status = cairo_status(im->cr);
cairo_destroy(im->cr);
}
status = cairo_status(im->cr);
cairo_destroy(im->cr);
}
+
+
if (im->rendered_image) {
free(im->rendered_image);
}
if (im->rendered_image) {
free(im->rendered_image);
}
if (font){
strncpy(im->text_prop[prop].font, font, sizeof(text_prop[prop].font) - 1);
im->text_prop[prop].font[sizeof(text_prop[prop].font) - 1] = '\0';
if (font){
strncpy(im->text_prop[prop].font, font, sizeof(text_prop[prop].font) - 1);
im->text_prop[prop].font[sizeof(text_prop[prop].font) - 1] = '\0';
+ /* if we already got one, drop it first */
+ pango_font_description_free(im->text_prop[prop].font_desc);
im->text_prop[prop].font_desc = pango_font_description_from_string( font );
};
if (size > 0){
im->text_prop[prop].font_desc = pango_font_description_from_string( font );
};
if (size > 0){
for (i = 0; i < DIM(text_prop); i++) {
im->text_prop[i].size = -1;
for (i = 0; i < DIM(text_prop); i++) {
im->text_prop[i].size = -1;
+ im->text_prop[i].font_desc = NULL;
rrd_set_font_desc(im,i, deffont ? deffont : text_prop[i].font,text_prop[i].size);
}
rrd_set_font_desc(im,i, deffont ? deffont : text_prop[i].font,text_prop[i].size);
}
pango_cairo_update_context(im->cr,context);
im->layout = pango_layout_new(context);
pango_cairo_update_context(im->cr,context);
im->layout = pango_layout_new(context);
+ g_object_unref (context);
// im->layout = pango_cairo_create_layout(im->cr);
// im->layout = pango_cairo_create_layout(im->cr);