diff options
author | Benjamin Otte <otte@redhat.com> | 2018-09-05 16:24:25 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-09-05 16:25:07 +0200 |
commit | ab9455ea1bd2a5c6a675a7038e99d4bd621879b6 (patch) | |
tree | 4f2f8fe201b31c77bb32115e14ca2e8bfb961b4e | |
parent | 89522e69234ea448a45ad4c5153576982c382cd0 (diff) | |
download | gtk+-ab9455ea1bd2a5c6a675a7038e99d4bd621879b6.tar.gz |
rendernodepaintable: Fix clipping
We need to translate before clipping, otherwise we clip in totally the
wrong place.
-rw-r--r-- | gtk/gtkrendernodepaintable.c | 7 |
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); } |