summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2019-07-21 18:21:04 -0700
committerChristian Hergert <chergert@redhat.com>2019-07-21 18:21:04 -0700
commite475d4bdc58342578166fac2ca4b979b4a5841bf (patch)
tree3b57e0bcb18b0bd2e44a7ef3ba2378c2fa0c93ab
parent980a6a20b1c0fe9df31f5fa5709a2f2e6b8229b3 (diff)
downloadgtk+-e475d4bdc58342578166fac2ca4b979b4a5841bf.tar.gz
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.
-rw-r--r--gtk/gtktextlayout.c6
1 files changed, 1 insertions, 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);