From f05e66bfc1aadb56538e4404836d1a1ea5f6720c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 28 Jun 2023 18:01:15 +0200 Subject: Fix compatibility with newer resvg versions --- fiv-io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fiv-io.c b/fiv-io.c index bf97457..3c31a79 100644 --- a/fiv-io.c +++ b/fiv-io.c @@ -2291,11 +2291,16 @@ load_resvg_render_internal(FivIoRenderClosureResvg *self, } uint32_t *pixels = (uint32_t *) image->data; +#if RESVG_MAJOR_VERSION == 0 && RESVG_MINOR_VERSION < 33 resvg_fit_to fit_to = { scale == 1 ? RESVG_FIT_TO_TYPE_ORIGINAL : RESVG_FIT_TO_TYPE_ZOOM, scale}; resvg_render(self->tree, fit_to, resvg_transform_identity(), image->width, image->height, (char *) pixels); +#else + resvg_render(self->tree, (resvg_transform) {.a = scale, .d = scale}, + image->width, image->height, (char *) pixels); +#endif for (int i = 0; i < w * h; i++) { uint32_t rgba = g_ntohl(pixels[i]); -- cgit v1.2.3