summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2019-03-12 10:19:36 -0600
committerFederico Mena Quintero <federico@gnome.org>2019-03-12 10:20:26 -0600
commit250ae25b0a671b9de7313c042710bbb6760248c4 (patch)
treec77353e99bf5da4c4474184cbbf0314d6177a918
parent2d1a137f3d27b60538c58b25e867288c7b0b61bc (diff)
Don't use deprecated rsvg_set_default_dpi()
Use rsvg_handle_set_dpi() instead.
-rw-r--r--test/any2ppm.c5
-rw-r--r--test/svg2png.c3
2 files changed, 2 insertions, 6 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c
index 7eb582c04..ac3b7f051 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -438,6 +438,7 @@ _rsvg_render_page (const char *filename,
if (handle == NULL)
return error->message; /* XXX g_error_free */
+ rsvg_handle_set_dpi (handle, 72.0);
rsvg_handle_get_dimensions (handle, &dimensions);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
dimensions.width,
@@ -875,10 +876,6 @@ main (int argc, char **argv)
#endif
#endif
-#if CAIRO_CAN_TEST_SVG_SURFACE
- rsvg_set_default_dpi (72.0);
-#endif
-
#if defined(_WIN32) && !defined (__CYGWIN__)
_setmode (1, _O_BINARY);
#endif
diff --git a/test/svg2png.c b/test/svg2png.c
index 24bdbfa91..52f52d08f 100644
--- a/test/svg2png.c
+++ b/test/svg2png.c
@@ -52,12 +52,11 @@ int main (int argc, char *argv[])
error = NULL;
- rsvg_set_default_dpi (72.0);
-
handle = rsvg_handle_new_from_file (filename, &error);
if (!handle)
FAIL (error->message);
+ rsvg_handle_set_dpi (handle, 72.0);
rsvg_handle_get_dimensions (handle, &dimensions);
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,