diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c index db7f6acd171..88b0f91413e 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -11706,7 +11706,11 @@ DEF_DLL_FN (void, rsvg_handle_get_dimensions, | |||
| 11706 | DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet, | 11706 | DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet, |
| 11707 | (RsvgHandle *, const guint8 *, gsize, GError **)); | 11707 | (RsvgHandle *, const guint8 *, gsize, GError **)); |
| 11708 | # endif | 11708 | # endif |
| 11709 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 11710 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf_and_error, (RsvgHandle *, GError **)); | ||
| 11711 | # else | ||
| 11709 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); | 11712 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); |
| 11713 | # endif | ||
| 11710 | DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); | 11714 | DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); |
| 11711 | DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); | 11715 | DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); |
| 11712 | DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); | 11716 | DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); |
| @@ -11765,8 +11769,11 @@ init_svg_functions (void) | |||
| 11765 | #if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11769 | #if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11766 | LOAD_DLL_FN (library, rsvg_handle_set_stylesheet); | 11770 | LOAD_DLL_FN (library, rsvg_handle_set_stylesheet); |
| 11767 | #endif | 11771 | #endif |
| 11772 | #if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 11773 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf_and_error); | ||
| 11774 | #else | ||
| 11768 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf); | 11775 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf); |
| 11769 | 11776 | #endif | |
| 11770 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width); | 11777 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width); |
| 11771 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height); | 11778 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height); |
| 11772 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels); | 11779 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels); |
| @@ -11811,7 +11818,11 @@ init_svg_functions (void) | |||
| 11811 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11818 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11812 | # undef rsvg_handle_set_stylesheet | 11819 | # undef rsvg_handle_set_stylesheet |
| 11813 | # endif | 11820 | # endif |
| 11814 | # undef rsvg_handle_get_pixbuf | 11821 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) |
| 11822 | # undef rsvg_handle_get_pixbuf_and_error | ||
| 11823 | # else | ||
| 11824 | # undef rsvg_handle_get_pixbuf | ||
| 11825 | # endif | ||
| 11815 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) | 11826 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) |
| 11816 | # undef g_file_new_for_path | 11827 | # undef g_file_new_for_path |
| 11817 | # undef g_memory_input_stream_new_from_data | 11828 | # undef g_memory_input_stream_new_from_data |
| @@ -11852,7 +11863,11 @@ init_svg_functions (void) | |||
| 11852 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11863 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11853 | # define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet | 11864 | # define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet |
| 11854 | # endif | 11865 | # endif |
| 11855 | # define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf | 11866 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) |
| 11867 | # define rsvg_handle_get_pixbuf_and_error fn_rsvg_handle_get_pixbuf_and_error | ||
| 11868 | # else | ||
| 11869 | # define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf | ||
| 11870 | # endif | ||
| 11856 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) | 11871 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) |
| 11857 | # define g_file_new_for_path fn_g_file_new_for_path | 11872 | # define g_file_new_for_path fn_g_file_new_for_path |
| 11858 | # define g_memory_input_stream_new_from_data \ | 11873 | # define g_memory_input_stream_new_from_data \ |
| @@ -12357,8 +12372,13 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 12357 | 12372 | ||
| 12358 | /* We can now get a valid pixel buffer from the svg file, if all | 12373 | /* We can now get a valid pixel buffer from the svg file, if all |
| 12359 | went ok. */ | 12374 | went ok. */ |
| 12375 | #if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 12376 | pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err); | ||
| 12377 | if (err) goto rsvg_error; | ||
| 12378 | #else | ||
| 12360 | pixbuf = rsvg_handle_get_pixbuf (rsvg_handle); | 12379 | pixbuf = rsvg_handle_get_pixbuf (rsvg_handle); |
| 12361 | if (!pixbuf) goto rsvg_error; | 12380 | if (!pixbuf) goto rsvg_error; |
| 12381 | #endif | ||
| 12362 | g_object_unref (rsvg_handle); | 12382 | g_object_unref (rsvg_handle); |
| 12363 | xfree (wrapped_contents); | 12383 | xfree (wrapped_contents); |
| 12364 | 12384 | ||