summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-26 02:45:16 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-26 02:45:16 -0700
commitf29d8d7f801dab7c5b8381c0a0be733ebb21e7a7 (patch)
tree83dbc909d77c1d52255b93dd7fce0e038b23230f
parent9d4d28e099fb8e462a36151551d6a8db1263bdd5 (diff)
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.
-rw-r--r--src/charts.c6
1 files changed, 3 insertions, 3 deletions
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);
© All Rights Reserved