[gtk/wip/baedert/transforms6: 242/273] widget: Add gtk_widget_set_transform



commit 8c32799676a6c254f891406e5d1e60c98f802e70
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 fa33327ae7..64a2f50f0b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13712,3 +13712,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 9b89f70246..c150b81dc0 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1050,6 +1050,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]