From 51cca132e0d91a5cc9db8407d8eee42992acd1e6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 20 Feb 2012 10:09:05 +0000 Subject: [PATCH] paint-nodes: Use logical extents for the TextNode::draw When we decide if we ought to clip, we should use the logical extents of the PangoLayout, just like we do for ClutterText. --- clutter/clutter-paint-nodes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-paint-nodes.c b/clutter/clutter-paint-nodes.c index 4a4a6c323..549ef4eb0 100644 --- a/clutter/clutter-paint-nodes.c +++ b/clutter/clutter-paint-nodes.c @@ -701,13 +701,13 @@ static void clutter_text_node_draw (ClutterPaintNode *node) { ClutterTextNode *tnode = CLUTTER_TEXT_NODE (node); - PangoRectangle ink_extents; + PangoRectangle extents; guint i; if (node->operations == NULL) return; - pango_layout_get_pixel_extents (tnode->layout, &ink_extents, NULL); + pango_layout_get_pixel_extents (tnode->layout, NULL, &extents); for (i = 0; i < node->operations->len; i++) { @@ -727,8 +727,8 @@ clutter_text_node_draw (ClutterPaintNode *node) * we clip the layout when drawin, to avoid spilling * it out */ - if (ink_extents.width > op_width || - ink_extents.height > op_height) + if (extents.width > op_width || + extents.height > op_height) { cogl_clip_push_rectangle (op->op.texrect[0], op->op.texrect[1],