diff options
author | Benjamin Otte <otte@redhat.com> | 2019-02-21 05:34:12 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2019-02-21 19:47:28 +0100 |
commit | 5965ead5a70aa15ae27819c3e6756d2c10f7d35d (patch) | |
tree | 89cb2ea2f4b46070ca4ff3e68d7e8e33d2af5be0 | |
parent | 5fc446dabf1a8a3e6d402bd4422d725c9f819929 (diff) | |
download | gtk+-5965ead5a70aa15ae27819c3e6756d2c10f7d35d.tar.gz |
widget: Use new snapshot transforms
-rw-r--r-- | gtk/gtkwidget.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index feecd3774e..3e8af0b13e 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -13199,9 +13199,8 @@ gtk_widget_render (GtkWidget *widget, snapshot = gtk_snapshot_new (); gtk_root_get_surface_transform (GTK_ROOT (widget), &x, &y); - gtk_snapshot_offset (snapshot, x, y); + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); gtk_widget_snapshot (widget, snapshot); - gtk_snapshot_offset (snapshot, -x, -y); root = gtk_snapshot_free_to_node (snapshot); if (root != NULL) @@ -13495,8 +13494,8 @@ gtk_widget_forall (GtkWidget *widget, * @widget: a #GtkWidget * @child: a child of @widget * @snapshot: #GtkSnapshot as passed to the widget. In particular, no - * calls to gtk_snapshot_offset() should have been applied by the - * parent. + * calls to gtk_snapshot_translate() or other transform calls should + * have been made. * * When a widget receives a call to the snapshot function, it must send * synthetic #GtkWidget::snapshot calls to all children. This function @@ -13518,11 +13517,12 @@ gtk_widget_snapshot_child (GtkWidget *widget, g_return_if_fail (_gtk_widget_get_parent (child) == widget); g_return_if_fail (snapshot != NULL); - gtk_snapshot_push_transform_with_category (snapshot, &priv->transform, priv->transform_category); + gtk_snapshot_save (snapshot); + gtk_snapshot_transform_matrix_with_category (snapshot, &priv->transform, priv->transform_category); gtk_widget_snapshot (child, snapshot); - gtk_snapshot_pop (snapshot); + gtk_snapshot_restore (snapshot); } /** |