Commit b53e627e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fixed handling of librsvg API change, based on a patch by S. Mukund (bug

2005-12-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/svg.c: fixed handling of librsvg API change,
	based on a patch by S. Mukund (bug #314400).
parent b5044904
2005-12-19 Sven Neumann <sven@gimp.org>
* plug-ins/common/svg.c: fixed handling of librsvg API change,
based on a patch by S. Mukund (bug #314400).
2005-12-18 Manish Singh <yosh@gimp.org>
* plug-ins/script-fu/siod-wrapper.c: Finish the reverting here.
......
......@@ -417,6 +417,25 @@ load_set_size_callback (gint *width,
}
}
static RsvgHandle *
load_rsvg_handle_new (gdouble xres,
gdouble yres)
{
RsvgHandle *handle = rsvg_handle_new ();
#if (((LIBRSVG_MAJOR_VERSION == 2) && (LIBRSVG_MINOR_VERSION == 13) && \
((LIBRSVG_MICRO_VERSION == 0) || \
(LIBRSVG_MICRO_VERSION == 1) || \
(LIBRSVG_MICRO_VERSION == 2))) || \
((LIBRSVG_MAJOR_VERSION == 2) && (LIBRSVG_MINOR_VERSION == 11) && \
(LIBRSVG_MICRO_VERSION == 0)))
rsvg_handle_set_dpi (handle, xres, yres);
#else
rsvg_handle_set_dpi_x_y (handle, xres, yres);
#endif
return handle;
}
/* This function renders a pixbuf from an SVG file according to vals. */
static GdkPixbuf *
......@@ -436,13 +455,7 @@ load_rsvg_pixbuf (const gchar *filename,
g_io_channel_set_encoding (io, NULL, NULL);
handle = rsvg_handle_new ();
#if (LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION < 99)
rsvg_handle_set_dpi_x_y (handle, vals->resolution, vals->resolution);
#else
rsvg_handle_set_dpi (handle, vals->resolution, vals->resolution);
#endif
handle = load_rsvg_handle_new (vals->resolution, vals->resolution);
rsvg_handle_set_size_callback (handle, load_set_size_callback, vals, NULL);
......@@ -538,13 +551,7 @@ load_rsvg_size (const gchar *filename,
g_io_channel_set_encoding (io, NULL, NULL);
handle = rsvg_handle_new ();
#if (LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION < 99)
rsvg_handle_set_dpi_x_y (handle, vals->resolution, vals->resolution);
#else
rsvg_handle_set_dpi (handle, vals->resolution, vals->resolution);
#endif
handle = load_rsvg_handle_new (vals->resolution, vals->resolution);
rsvg_handle_set_size_callback (handle, load_get_size_callback, vals, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment