[librsvg: 7/11] rsvg_handle_set_default_dpi(): implement in terms of rsvg_handle_set_default_dpi_x_y()




commit 040c826513c4be958ccbe433e86db099075d6812
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Aug 9 12:49:50 2022 -0500

    rsvg_handle_set_default_dpi(): implement in terms of rsvg_handle_set_default_dpi_x_y()
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/727>

 src/c_api/dpi.rs | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/c_api/dpi.rs b/src/c_api/dpi.rs
index 6dc408ce7..b2e15eef7 100644
--- a/src/c_api/dpi.rs
+++ b/src/c_api/dpi.rs
@@ -62,11 +62,5 @@ pub unsafe extern "C" fn rsvg_set_default_dpi_x_y(dpi_x: libc::c_double, dpi_y:
 
 #[no_mangle]
 pub unsafe extern "C" fn rsvg_set_default_dpi(dpi: libc::c_double) {
-    if dpi <= 0.0 {
-        DPI_X = DEFAULT_DPI_X;
-        DPI_Y = DEFAULT_DPI_Y;
-    } else {
-        DPI_X = dpi;
-        DPI_Y = dpi;
-    }
+    rsvg_set_default_dpi_x_y(dpi, dpi);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]