From b3370e89a98e39dbf2928839c75fb20a108a5817 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 19 Oct 2024 16:29:46 -0700 Subject: vcr: pass vwm_charts_t.marker_distance ref to vcr_new() Since vcr_t implements rendering of borders and backgrounds, to such an extent that when serializing mem->png for headless mode it produces the background and border on the fly on a per-row basis, let's just give it the ability to access the marker distance in vwm_charts_t and draw the markers as needed. It feels hacky to be passing pointers to these values but I really despise repeating setters across abstractions to plumb things through, so I'm doing the stupid simple thing here. --- src/charts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/charts.c') diff --git a/src/charts.c b/src/charts.c index 9d31603..29547f7 100644 --- a/src/charts.c +++ b/src/charts.c @@ -1171,7 +1171,7 @@ vwm_chart_t * vwm_chart_create(vwm_charts_t *charts, int pid, int width, int hei chart->hierarchy_end = CHART_NUM_FIXED_HEADER_ROWS + count_rows(chart->proc); chart->gen_last_composed = -1; - chart->vcr = vcr_new(charts->vcr_backend, &chart->hierarchy_end, &chart->snowflakes_cnt); + chart->vcr = vcr_new(charts->vcr_backend, &chart->hierarchy_end, &chart->snowflakes_cnt, &charts->marker_distance); if (!vwm_chart_set_visible_size(charts, chart, width, height)) { VWM_ERROR("Unable to set initial chart size"); -- cgit v1.2.3