summaryrefslogtreecommitdiff
path: root/gtk/gtkrendernodepaintable.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-09-05 16:24:25 +0200
committerBenjamin Otte <otte@redhat.com>2018-09-05 16:25:07 +0200
commitab9455ea1bd2a5c6a675a7038e99d4bd621879b6 (patch)
tree4f2f8fe201b31c77bb32115e14ca2e8bfb961b4e /gtk/gtkrendernodepaintable.c
parent89522e69234ea448a45ad4c5153576982c382cd0 (diff)
downloadgtk+-ab9455ea1bd2a5c6a675a7038e99d4bd621879b6.tar.gz
rendernodepaintable: Fix clipping
We need to translate before clipping, otherwise we clip in totally the wrong place.
Diffstat (limited to 'gtk/gtkrendernodepaintable.c')
-rw-r--r--gtk/gtkrendernodepaintable.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkrendernodepaintable.c b/gtk/gtkrendernodepaintable.c
index 2d7248e2f4..35fcd2f545 100644
--- a/gtk/gtkrendernodepaintable.c
+++ b/gtk/gtkrendernodepaintable.c
@@ -60,14 +60,17 @@ gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
&transform);
}
- gtk_snapshot_push_clip (snapshot, &self->bounds);
gtk_snapshot_offset (snapshot, -self->bounds.origin.x, -self->bounds.origin.y);
+ gtk_snapshot_push_clip (snapshot, &self->bounds);
+
gtk_snapshot_append_node (snapshot, self->node);
+ //gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 1, 0, 0, 1 }, &self->bounds);
- gtk_snapshot_offset (snapshot, self->bounds.origin.x, self->bounds.origin.y);
gtk_snapshot_pop (snapshot);
+ gtk_snapshot_offset (snapshot, self->bounds.origin.x, self->bounds.origin.y);
+
if (needs_transform)
gtk_snapshot_pop (snapshot);
}