[gtk/wip/matthiasc/lottie-stroke: 62/67] wip: curve-editor stroke debugging
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/lottie-stroke: 62/67] wip: curve-editor stroke debugging
- Date: Thu, 3 Dec 2020 02:46:44 +0000 (UTC)
commit bddedce58f731fc525dd192ff852890a7a3ebcf1
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 2 08:43:15 2020 -0500
wip: curve-editor stroke debugging
tests/curve-editor.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/tests/curve-editor.c b/tests/curve-editor.c
index adf42d7c7d..2b6e1fc84e 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 *
@@ -1352,7 +1353,9 @@ curve_editor_snapshot (GtkWidget *widget,
CurveEditor *self = (CurveEditor *)widget;
GskPathBuilder *builder;
GskPath *path;
+ GskPath *path2;
GskStroke *stroke;
+ GskPathMeasure *measure;
int i, j, k;
float width;
float height;
@@ -1370,7 +1373,14 @@ 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);
+ measure = gsk_path_measure_new (path);
+ stroke = gsk_stroke_new (20);
+ path2 = gsk_path_measure_stroke (measure, stroke);
+ gsk_stroke_free (stroke);
+ gsk_path_measure_unref (measure);
+
+ 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]