forked from AuroraMiddleware/gtk
rendernodepaintable: Fix clipping
We need to translate before clipping, otherwise we clip in totally the wrong place.
This commit is contained in:
parent
89522e6923
commit
ab9455ea1b
@ -60,13 +60,16 @@ gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
|
|||||||
&transform);
|
&transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
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_push_clip (snapshot, &self->bounds);
|
||||||
|
|
||||||
gtk_snapshot_append_node (snapshot, self->node);
|
gtk_snapshot_append_node (snapshot, self->node);
|
||||||
|
//gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 1, 0, 0, 1 }, &self->bounds);
|
||||||
|
|
||||||
|
gtk_snapshot_pop (snapshot);
|
||||||
|
|
||||||
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)
|
if (needs_transform)
|
||||||
gtk_snapshot_pop (snapshot);
|
gtk_snapshot_pop (snapshot);
|
||||||
|
Loading…
Reference in New Issue
Block a user