diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-28 18:01:15 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-06-29 03:36:34 +0200 |
commit | f05e66bfc1aadb56538e4404836d1a1ea5f6720c (patch) | |
tree | ea5461e067838904599519c2a7c96bfbb3109209 | |
parent | 6ee5f69bfef44e38dd695ed8242c1f44c846700e (diff) | |
download | fiv-f05e66bfc1aadb56538e4404836d1a1ea5f6720c.tar.gz fiv-f05e66bfc1aadb56538e4404836d1a1ea5f6720c.tar.xz fiv-f05e66bfc1aadb56538e4404836d1a1ea5f6720c.zip |
Fix compatibility with newer resvg versions
-rw-r--r-- | fiv-io.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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]); |