mirror of https://github.com/GNOME/gimp.git
file-svg: fix deprecated use of rsvg_handle_get_dimensions()
This commit is contained in:
parent
6f8f481ee2
commit
a6756b515b
|
@ -483,8 +483,8 @@ load_rsvg_size (GFile *file,
|
|||
GError **error)
|
||||
{
|
||||
RsvgHandle *handle;
|
||||
RsvgDimensionData dim;
|
||||
gboolean has_size;
|
||||
gdouble width, height;
|
||||
|
||||
handle = rsvg_handle_new_from_gfile_sync (file, rsvg_flags, NULL, error);
|
||||
|
||||
|
@ -493,12 +493,10 @@ load_rsvg_size (GFile *file,
|
|||
|
||||
rsvg_handle_set_dpi (handle, vals->resolution);
|
||||
|
||||
rsvg_handle_get_dimensions (handle, &dim);
|
||||
|
||||
if (dim.width > 0 && dim.height > 0)
|
||||
if (rsvg_handle_get_intrinsic_size_in_pixels (handle, &width, &height))
|
||||
{
|
||||
vals->width = dim.width;
|
||||
vals->height = dim.height;
|
||||
vals->width = ceil (width);
|
||||
vals->height = ceil (height);
|
||||
has_size = TRUE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue