Skip to content

Commit 250ae25

Browse files
Don't use deprecated rsvg_set_default_dpi()
Use rsvg_handle_set_dpi() instead.
1 parent 2d1a137 commit 250ae25

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

test/any2ppm.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ _rsvg_render_page (const char *filename,
438438
if (handle == NULL)
439439
return error->message; /* XXX g_error_free */
440440

441+
rsvg_handle_set_dpi (handle, 72.0);
441442
rsvg_handle_get_dimensions (handle, &dimensions);
442443
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
443444
dimensions.width,
@@ -875,10 +876,6 @@ main (int argc, char **argv)
875876
#endif
876877
#endif
877878

878-
#if CAIRO_CAN_TEST_SVG_SURFACE
879-
rsvg_set_default_dpi (72.0);
880-
#endif
881-
882879
#if defined(_WIN32) && !defined (__CYGWIN__)
883880
_setmode (1, _O_BINARY);
884881
#endif

test/svg2png.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,11 @@ int main (int argc, char *argv[])
5252

5353
error = NULL;
5454

55-
rsvg_set_default_dpi (72.0);
56-
5755
handle = rsvg_handle_new_from_file (filename, &error);
5856
if (!handle)
5957
FAIL (error->message);
6058

59+
rsvg_handle_set_dpi (handle, 72.0);
6160
rsvg_handle_get_dimensions (handle, &dimensions);
6261

6362
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,

0 commit comments

Comments
 (0)