[gtk/wip/baedert/transforms6: 46/70] widget: Add gtk_widget_set_transform



commit 4b3987d78e1ec1cfc5ecd65e2e82a6d6038c5281
Author: Timm Bäder <mail baedert org>
Date:   Sat Jul 28 12:13:30 2018 +0200

    widget: Add gtk_widget_set_transform
    
    This might not stay until the end but for now it's good enough to test
    widget transforms.

 gtk/gtkwidget.c | 9 +++++++++
 gtk/gtkwidget.h | 4 ++++
 2 files changed, 13 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 54588f05b5..fc34990a31 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13639,3 +13639,12 @@ gtk_widget_get_height (GtkWidget *widget)
          border.top  - border.bottom -
          padding.top - padding.bottom;
 }
+
+void
+gtk_widget_set_transform (GtkWidget               *widget,
+                          const graphene_matrix_t *transform)
+{
+  GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
+
+  graphene_matrix_init_from_matrix (&priv->transform, transform);
+}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 5d6236ea8a..85ea4aab43 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1046,6 +1046,10 @@ void                    gtk_widget_snapshot_child       (GtkWidget   *widget,
                                                          GtkWidget   *child,
                                                          GtkSnapshot *snapshot);
 
+GDK_AVAILABLE_IN_ALL
+void                    gtk_widget_set_transform        (GtkWidget               *widget,
+                                                         const graphene_matrix_t *transform);
+
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRequisition, gtk_requisition_free)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]