[gtk] recorder: Print the matrix for transform nodes



commit 36ac867ea9da70d062123af0e3cb475a03c7aa6b
Author: Benjamin Otte <otte redhat com>
Date:   Tue Feb 19 04:16:00 2019 +0100

    recorder: Print the matrix for transform nodes

 gtk/inspector/recorder.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 8601e77c37..26ae9cbdd2 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -899,8 +899,24 @@ populate_render_node_properties (GtkListStore  *store,
       add_float_row (store, "y offset", gsk_offset_node_get_y_offset (node));
       break;
 
-    case GSK_NOT_A_RENDER_NODE:
     case GSK_TRANSFORM_NODE:
+      {
+        float f[16];
+        guint i;
+
+        graphene_matrix_to_float (gsk_transform_node_peek_transform (node), f);
+        for (i = 0; i < 4; i++)
+          {
+            char *row_string = g_strdup_printf ("%.2f, %.2f, %.2f, %.2f",
+                                                f[4 * i], f[4 * i + 1],
+                                                f[4 * i + 2], f[4 * i + 3]);
+            add_text_row (store, i == 0 ? "Matrix" : "", row_string);
+            g_free (row_string);
+          }
+      }
+      break;
+
+    case GSK_NOT_A_RENDER_NODE:
     default:
       break;
     }


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