[librsvg] Handle.get_node_geometry() - Don't use RsvgDimensionData anymore



commit 9a07d376b9d90e6d4b913b1c8d0ea867a1311659
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Mar 4 18:55:13 2019 -0600

    Handle.get_node_geometry() - Don't use RsvgDimensionData anymore

 rsvg_internals/src/handle.rs | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 25b8e7e5..41bb1751 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -441,25 +441,16 @@ impl Handle {
         node: &RsvgNode,
     ) -> Result<(RsvgRectangle, RsvgRectangle), RenderingError> {
         // This is just to start with an unknown viewport size
-        let dimensions = RsvgDimensionData {
-            width: 1,
-            height: 1,
-            em: 1.0,
-            ex: 1.0,
+        let viewport = cairo::Rectangle {
+            x: 0.0,
+            y: 0.0,
+            width: 1.0,
+            height: 1.0,
         };
 
         let target = ImageSurface::create(cairo::Format::Rgb24, 1, 1)?;
         let cr = cairo::Context::new(&target);
-        let mut draw_ctx = self.create_drawing_ctx_for_node(
-            &cr,
-            &cairo::Rectangle {
-                x: 0.0,
-                y: 0.0,
-                width: f64::from(dimensions.width),
-                height: f64::from(dimensions.height),
-            },
-            Some(node),
-        );
+        let mut draw_ctx = self.create_drawing_ctx_for_node(&cr, &viewport, Some(node));
         let root = self.get_root();
 
         draw_ctx.draw_node_from_stack(&root.get_cascaded_values(), &root, false)?;


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