[gtk/wip/otte/transform: 22/41] cellrendererpixbuf: Use new snapshot transforms
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/transform: 22/41] cellrendererpixbuf: Use new snapshot transforms
- Date: Thu, 21 Feb 2019 04:40:11 +0000 (UTC)
commit afe6cb17e3ad2215f3cbd82ccb39380aaaedf53c
Author: Benjamin Otte <otte redhat com>
Date: Thu Feb 21 05:34:12 2019 +0100
cellrendererpixbuf: Use new snapshot transforms
gtk/gtkcellrendererpixbuf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index 37e8167203..d9349a5488 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -554,9 +554,10 @@ gtk_cell_renderer_pixbuf_snapshot (GtkCellRenderer *cell,
icon_helper = create_icon_helper (cellpixbuf, widget);
}
- gtk_snapshot_offset (snapshot, pix_rect.x, pix_rect.y);
+ gtk_snapshot_save (snapshot);
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (pix_rect.x, pix_rect.y));
gdk_paintable_snapshot (GDK_PAINTABLE (icon_helper), snapshot, pix_rect.width, pix_rect.height);
- gtk_snapshot_offset (snapshot, - pix_rect.x, - pix_rect.y);
+ gtk_snapshot_restore (snapshot);
g_object_unref (icon_helper);
gtk_style_context_restore (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]