From a174f5d44ab076aed99958c3ff901ae00dd8a406 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Thu, 1 Dec 2011 22:23:16 +0530 Subject: [PATCH] file-svg: Remove obsolete code which was put in to handle librsvg API breakage GIMP now depends on a more recent version of librsvg. --- plug-ins/common/file-svg.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c index 36f186d070..0ae1e28f8f 100644 --- a/plug-ins/common/file-svg.c +++ b/plug-ins/common/file-svg.c @@ -407,26 +407,6 @@ 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 * load_rsvg_pixbuf (const gchar *filename, @@ -446,7 +426,8 @@ load_rsvg_pixbuf (const gchar *filename, g_io_channel_set_encoding (io, NULL, NULL); - handle = load_rsvg_handle_new (vals->resolution, vals->resolution); + handle = rsvg_handle_new (); + rsvg_handle_set_dpi (handle, vals->resolution); /* set the base URI so that librsvg can resolve relative paths */ uri = g_filename_to_uri (filename, NULL, NULL); @@ -521,7 +502,8 @@ load_rsvg_size (const gchar *filename, g_io_channel_set_encoding (io, NULL, NULL); - handle = load_rsvg_handle_new (vals->resolution, vals->resolution); + handle = rsvg_handle_new (); + rsvg_handle_set_dpi (handle, vals->resolution); vals->width = SVG_DEFAULT_SIZE; vals->height = SVG_DEFAULT_SIZE;