From e475d4bdc58342578166fac2ca4b979b4a5841bf Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sun, 21 Jul 2019 18:21:04 -0700 Subject: [PATCH] textlayout: fix bounds for clipping This should match gtk_snapshot_append_layout(), which means that we expect the bounds to be rooted at 0, 0. --- gtk/gtktextlayout.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index acf003912e..6974353b7c 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -4036,11 +4036,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, crenderer->snapshot = snapshot; crenderer->fg_color = color; - graphene_rect_init (&crenderer->bounds, - clip->x, - clip->y, - clip->width, - clip->height); + graphene_rect_init (&crenderer->bounds, 0, 0, clip->width, clip->height); gtk_text_layout_wrap_loop_start (layout);