summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cbfdb5c)
raw | patch | inline | side by side (parent: cbfdb5c)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 27 Aug 2008 22:06:43 +0000 (22:06 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 27 Aug 2008 22:06:43 +0000 (22:06 +0000) |
src/rrd_gfx.c | patch | blob | history |
diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c
index cb42b8f2465d1831c47a3c77653feee5af2b4d80..6604352c43dbf4d43fa4cf3538b4ff937000a7e1 100644 (file)
--- a/src/rrd_gfx.c
+++ b/src/rrd_gfx.c
/* pango_cairo_update_context(cr, pango_context); */
pango_layout_set_tabs(layout, tab_array);
+ pango_tab_array_free(tab_array);
font_desc = pango_font_description_from_string(font);
pango_font_description_set_size(font_desc, size * PANGO_SCALE);
pango_layout_set_font_description(layout, font_desc);
-
+ pango_font_description_free(font_desc);
/* pango expects the string to be utf-8 encoded */
utf8_text = g_locale_to_utf8((const gchar *) text, -1, NULL, NULL, NULL);
gfx_color_t color = { 0, 0, 0, 0 };
layout = gfx_prep_text(im, start, color, font, size, tabwidth, text);
pango_layout_get_pixel_extents(layout, NULL, &log_rect);
- pango_tab_array_free(pango_layout_get_tabs(layout));
g_object_unref(layout);
return log_rect.width;
}
pango_cairo_update_layout(cr, layout);
cairo_move_to(cr, sx, sy);
pango_cairo_show_layout(cr, layout);
- pango_tab_array_free(pango_layout_get_tabs(layout));
g_object_unref(layout);
cairo_restore(cr);