[gtk] puzzlepiece: Use new snapshot transforms



commit 407307c7e4f6f84bf1f9ddee8d3b8ba3de3e53c1
Author: Benjamin Otte <otte redhat com>
Date:   Thu Feb 21 05:34:12 2019 +0100

    puzzlepiece: Use new snapshot transforms

 demos/gtk-demo/puzzlepiece.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/puzzlepiece.c b/demos/gtk-demo/puzzlepiece.c
index cb8a81b9b9..23bdf21a65 100644
--- a/demos/gtk-demo/puzzlepiece.c
+++ b/demos/gtk-demo/puzzlepiece.c
@@ -47,9 +47,11 @@ gtk_puzzle_piece_snapshot (GdkPaintable *paintable,
   gtk_snapshot_push_clip (snapshot,
                           &GRAPHENE_RECT_INIT (0, 0, width, height));
 
-  gtk_snapshot_offset (snapshot,
-                       - width * self->x,
-                       - height * self->y);
+  gtk_snapshot_translate (snapshot,
+                          &GRAPHENE_POINT_INIT (
+                              - width * self->x,
+                              - height * self->y
+                          ));
   gdk_paintable_snapshot (self->puzzle,
                           snapshot,
                           width * self->width,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]