diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-12-13 12:45:52 +0000 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-12-13 13:02:44 +0000 |
commit | f30f869ea40ad7633ec34903d0f1594c860a32ae (patch) | |
tree | 7905bab26942e4d71f909d61344be83b006dfa5d /content/handlers/image | |
parent | 68a4cd39cdb7e57ff45aea6ad892b727851603e6 (diff) | |
download | netsurf-f30f869ea40ad7633ec34903d0f1594c860a32ae.tar.gz netsurf-f30f869ea40ad7633ec34903d0f1594c860a32ae.tar.bz2 |
rsvg246: Fix build against librsvg 2.48
The version of librsvg is used on Ubuntu 20.04TLS.
Diffstat (limited to 'content/handlers/image')
-rw-r--r-- | content/handlers/image/rsvg246.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/handlers/image/rsvg246.c b/content/handlers/image/rsvg246.c index 5c61c86ad..0e337132f 100644 --- a/content/handlers/image/rsvg246.c +++ b/content/handlers/image/rsvg246.c @@ -147,6 +147,7 @@ rsvg_cache_convert(struct content *c) static void rsvg__get_demensions(const rsvg_content *svgc, int *width, int *height) { +#if LIBRSVG_MAJOR_VERSION >= 2 && LIBRSVG_MINOR_VERSION >= 52 gdouble rwidth; gdouble rheight; gboolean gotsize; @@ -168,7 +169,13 @@ static void rsvg__get_demensions(const rsvg_content *svgc, *width = ink_rect.width; *height = ink_rect.height; } +#else + RsvgDimensionData rsvgsize; + rsvg_handle_get_dimensions(svgc->rsvgh, &rsvgsize); + *width = rsvgsize.width; + *height = rsvgsize.height; +#endif NSLOG(netsurf, DEBUG, "rsvg width:%d height:%d.", *width, *height); } |