summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-30 04:17:57 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-30 04:17:57 +0000
commit2707f73f24e379c6c96d3c7f72fdd7440dc5a9cd (patch)
tree3ef1eb5a8c3f93e7d43c42666f0dbfaffdc4007c
parent80ec84414fa9096f34be97f762339b3ba35da247 (diff)
downloadpango-2707f73f24e379c6c96d3c7f72fdd7440dc5a9cd.tar.gz
Fix offset to center the underline in requested rectangle.
2006-05-30 Behdad Esfahbod <behdad@gnome.org> * pango/pangocairo-render.c (draw_error_underline): Fix offset to center the underline in requested rectangle. * pango/pangocairo-render.c (pango_cairo_show_glyph_string): Remove unncessary renderer activation and cleanup.
-rw-r--r--ChangeLog8
-rw-r--r--pango/pangocairo-render.c11
2 files changed, 9 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index c91ecd81..f45aeb03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-30 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/pangocairo-render.c (draw_error_underline): Fix offset to
+ center the underline in requested rectangle.
+
+ * pango/pangocairo-render.c (pango_cairo_show_glyph_string): Remove
+ unncessary renderer activation and cleanup.
+
2006-05-23 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c (pango_win32_font_class_init): Initialize the
diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c
index bfd120f3..8d32e378 100644
--- a/pango/pangocairo-render.c
+++ b/pango/pangocairo-render.c
@@ -310,7 +310,7 @@ draw_error_underline (cairo_t *cr,
double y_top, y_bottom;
int i;
- x += (width - width_units * unit_width);
+ x += (width - width_units * unit_width) / 2;
width = width_units * unit_width;
y_top = y;
@@ -440,16 +440,7 @@ pango_cairo_show_glyph_string (cairo_t *cr,
crenderer->do_path = FALSE;
cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset);
- pango_renderer_activate (renderer);
-
- pango_renderer_set_color (renderer, PANGO_RENDER_PART_FOREGROUND, NULL);
- pango_renderer_set_color (renderer, PANGO_RENDER_PART_BACKGROUND, NULL);
- pango_renderer_set_color (renderer, PANGO_RENDER_PART_UNDERLINE, NULL);
- pango_renderer_set_color (renderer, PANGO_RENDER_PART_STRIKETHROUGH, NULL);
-
pango_renderer_draw_glyphs (renderer, font, glyphs, 0, 0);
-
- pango_renderer_deactivate (renderer);
if (G_UNLIKELY (unref_renderer))
g_object_unref (renderer);