From f29d8d7f801dab7c5b8381c0a0be733ebb21e7a7 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 26 Aug 2021 02:45:16 -0700 Subject: charts: use composed height pixmap/ximage renders Was using the underlying chart dimensions which mirror the window dimensions, which worked fine but this wastes less space in the produced images when there's not much vertical content. --- src/charts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/charts.c') diff --git a/src/charts.c b/src/charts.c index b25f548..25f2fb6 100644 --- a/src/charts.c +++ b/src/charts.c @@ -1198,8 +1198,8 @@ void vwm_chart_render_as_pixmap(vwm_charts_t *charts, vwm_chart_t *chart, const if (!bg_color) bg_color = &blackness; - dest = create_picture_fill(charts, chart->width, chart->height, 32, 0, NULL, bg_color, res_pixmap); - vwm_chart_render(charts, chart, PictOpOver, dest, 0, 0, chart->width, chart->height); + dest = create_picture_fill(charts, chart->width, vwm_chart_composed_height(charts, chart), 32, 0, NULL, bg_color, res_pixmap); + vwm_chart_render(charts, chart, PictOpOver, dest, 0, 0, chart->width, vwm_chart_composed_height(charts, chart)); XRenderFreePicture(charts->xserver->display, dest); } @@ -1218,7 +1218,7 @@ void vwm_chart_render_as_ximage(vwm_charts_t *charts, vwm_chart_t *chart, const 0, 0, chart->width, - chart->height, + vwm_chart_composed_height(charts, chart), AllPlanes, ZPixmap); -- cgit v1.2.3