mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-29 09:43:09 +03:00
rsvg246: Fix build against librsvg 2.48
The version of librsvg is used on Ubuntu 20.04TLS.
This commit is contained in:
parent
68a4cd39cd
commit
f30f869ea4
@ -147,6 +147,7 @@ rsvg_cache_convert(struct content *c)
|
|||||||
static void rsvg__get_demensions(const rsvg_content *svgc,
|
static void rsvg__get_demensions(const rsvg_content *svgc,
|
||||||
int *width, int *height)
|
int *width, int *height)
|
||||||
{
|
{
|
||||||
|
#if LIBRSVG_MAJOR_VERSION >= 2 && LIBRSVG_MINOR_VERSION >= 52
|
||||||
gdouble rwidth;
|
gdouble rwidth;
|
||||||
gdouble rheight;
|
gdouble rheight;
|
||||||
gboolean gotsize;
|
gboolean gotsize;
|
||||||
@ -168,7 +169,13 @@ static void rsvg__get_demensions(const rsvg_content *svgc,
|
|||||||
*width = ink_rect.width;
|
*width = ink_rect.width;
|
||||||
*height = ink_rect.height;
|
*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);
|
NSLOG(netsurf, DEBUG, "rsvg width:%d height:%d.", *width, *height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user