summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-02-21 05:34:12 +0100
committerBenjamin Otte <otte@redhat.com>2019-02-21 19:47:28 +0100
commit65174c7989d52c9722140407ad7fdcde73ed35ac (patch)
tree86dbb969d672168dbcf3d513595f94767489ebc8 /gtk/gtkimage.c
parentf0795a795b4bb07df6edb29863389ccd337a62de (diff)
downloadgtk+-65174c7989d52c9722140407ad7fdcde73ed35ac.tar.gz
image: Use new snapshot transforms
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r--gtk/gtkimage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 20e9bc41e3..b43edd7a41 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1125,9 +1125,10 @@ gtk_image_snapshot (GtkWidget *widget,
else
y = CLAMP (baseline - h * gtk_image_get_baseline_align (image), 0, height - ceil (h));
- gtk_snapshot_offset (snapshot, x, y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y));
gdk_paintable_snapshot (GDK_PAINTABLE (priv->icon_helper), snapshot, w, h);
- gtk_snapshot_offset (snapshot, -x, -y);
+ gtk_snapshot_restore (snapshot);
}
}