rendernodepaintable: Fix rendering position
authorBenjamin Otte <otte@redhat.com>
Tue, 19 Jun 2018 17:43:12 +0000 (19:43 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 19 Jun 2018 17:44:17 +0000 (19:44 +0200)
When the given size had an offset, we were moving that offset in the
wrong direction.

gtk/gtkrendernodepaintable.c

index 0ca586d8202f35e73bdcc3a9caa4235f2914de7e..2d7248e2f401133b621d004f1fb955103f3eedf4 100644 (file)
@@ -61,11 +61,11 @@ gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
     }
 
   gtk_snapshot_push_clip (snapshot, &self->bounds);
-  gtk_snapshot_offset (snapshot, self->bounds.origin.x, self->bounds.origin.y);
+  gtk_snapshot_offset (snapshot, -self->bounds.origin.x, -self->bounds.origin.y);
 
   gtk_snapshot_append_node (snapshot, self->node);
 
-  gtk_snapshot_offset (snapshot, -self->bounds.origin.x, -self->bounds.origin.y);
+  gtk_snapshot_offset (snapshot, self->bounds.origin.x, self->bounds.origin.y);
   gtk_snapshot_pop (snapshot);
 
   if (needs_transform)