mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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.
This commit is contained in:
parent
fa77274e80
commit
51cca132e0
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user