[gtk/wip/otte/transform: 18/37] image: Use new snapshot transforms
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/transform: 18/37] image: Use new snapshot transforms
- Date: Thu, 21 Feb 2019 06:22:20 +0000 (UTC)
commit 3cd737b28a44c875e240e7240647723249d7ce04
Author: Benjamin Otte <otte redhat com>
Date: Thu Feb 21 05:34:12 2019 +0100
image: Use new snapshot transforms
gtk/gtkimage.c | 5 +++--
1 file 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]