[librsvg/alatiera/debug] debug dimension



commit 781b82907fc16726f78eb1d4e63aa3ae36788cfc
Author: Jordan Petridis <jpetridis gnome org>
Date:   Mon Feb 25 23:36:34 2019 +0200

    debug dimension

 rsvg_internals/src/handle.rs | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 3ad1c8cd..c599a891 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -42,6 +42,7 @@ pub struct RsvgHandle {
 
 // Keep in sync with rsvg.h:RsvgDimensionData
 #[repr(C)]
+#[derive(Debug)]
 pub struct RsvgDimensionData {
     pub width: libc::c_int,
     pub height: libc::c_int,
@@ -890,6 +891,9 @@ pub unsafe extern "C" fn rsvg_handle_rust_render_cairo_sub(
 
 fn get_pixbuf_sub(handle: &mut Handle, id: Option<&str>) -> Result<Pixbuf, RenderingError> {
     let dimensions = handle.get_dimensions()?;
+    dbg!(&dimensions);
+    dbg!(&dimensions.width);
+    dbg!(&dimensions.height);
 
     let surface = ImageSurface::create(cairo::Format::ARgb32, dimensions.width, dimensions.height)?;
 


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