[gtk/wip/matthiasc/lottie-stroke: 23/24] wip: curve-editor stroke debugging




commit 2d0af17ec31b1494683186b09a77f5bf21b6ef22
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Nov 28 11:22:44 2020 -0500

    wip: curve-editor stroke debugging

 tests/curve-editor.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/tests/curve-editor.c b/tests/curve-editor.c
index c72551cfd1..77007aa5ff 100644
--- a/tests/curve-editor.c
+++ b/tests/curve-editor.c
@@ -438,6 +438,7 @@ bezier_through (const graphene_point_t *S,
 
   find_control_points (t, &A, B, &C, S, E, C1, C2);
 }
+
 /* }}} */
 /* {{{ Utilities */
 static PointData *
@@ -1350,6 +1351,7 @@ curve_editor_snapshot (GtkWidget   *widget,
   CurveEditor *self = (CurveEditor *)widget;
   GskPathBuilder *builder;
   GskPath *path;
+  GskPath *path2;
   GskStroke *stroke;
   int i, j, k;
   float width;
@@ -1368,7 +1370,12 @@ curve_editor_snapshot (GtkWidget   *widget,
   curve_editor_add_path (self, builder);
 
   path = gsk_path_builder_free_to_path (builder);
-  gtk_snapshot_push_stroke (snapshot, path, self->stroke);
+  stroke = gsk_stroke_new (20);
+  path2 = gsk_path_to_stroke (path, stroke);
+  gsk_stroke_free (stroke);
+
+  gtk_snapshot_push_stroke (snapshot, path2, self->stroke);
+  gsk_path_unref (path2);
   gsk_path_unref (path);
 
   gtk_snapshot_append_color (snapshot,


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