forked from AuroraMiddleware/gtk
picture: Use new snapshot transforms
This commit is contained in:
parent
b96e835d9e
commit
6e19fb7b36
@ -133,9 +133,10 @@ gtk_picture_snapshot (GtkWidget *widget,
|
||||
x = (width - ceil (w)) / 2;
|
||||
y = floor(height - ceil (h)) / 2;
|
||||
|
||||
gtk_snapshot_offset (snapshot, x, y);
|
||||
gtk_snapshot_save (snapshot);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y));
|
||||
gdk_paintable_snapshot (self->paintable, snapshot, w, h);
|
||||
gtk_snapshot_offset (snapshot, -x, -y);
|
||||
gtk_snapshot_restore (snapshot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user