libsysprof-gtk: add line layer which can line_to and curve_to

This commit is contained in:
Christian Hergert
2023-06-20 15:35:25 -07:00
parent 2a6d1a988c
commit 985bd35221
5 changed files with 373 additions and 0 deletions

View File

@ -143,6 +143,7 @@ main (int argc,
sysprof_xy_series_add (samples_series, time, depth, i);
}
sysprof_xy_series_sort (samples_series);
window = g_object_new (GTK_TYPE_WINDOW,
"default-width", 800,
@ -175,6 +176,18 @@ main (int argc,
SYSPROF_CHART_LAYER (layer));
gtk_box_append (GTK_BOX (box), chart);
chart = g_object_new (SYSPROF_TYPE_CHART,
"session", session,
"height-request", 128,
NULL);
layer = g_object_new (SYSPROF_TYPE_LINE_LAYER,
"series", samples_series,
"title", "Stack Depth as Line",
NULL);
sysprof_chart_add_layer (SYSPROF_CHART (chart),
SYSPROF_CHART_LAYER (layer));
gtk_box_append (GTK_BOX (box), chart);
gtk_window_present (window);
g_main_loop_run (main_loop);