[librsvg] Set the current state's affine in the generic function



commit b59206625d998cdc45d63019937c09d03c31d2e8
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Sep 27 10:20:31 2017 -0500

    Set the current state's affine in the generic function

 rust/src/structure.rs |    1 -
 rust/src/viewport.rs  |    5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/rust/src/structure.rs b/rust/src/structure.rs
index c443049..523e935 100644
--- a/rust/src/structure.rs
+++ b/rust/src/structure.rs
@@ -183,7 +183,6 @@ impl NodeTrait for NodeSvg {
                          draw_ctx,
                          |affine| {
                              drawing_ctx::state_push(draw_ctx);
-                             drawing_ctx::set_current_state_affine(draw_ctx, affine);
                              node.draw_children(draw_ctx, -1); // dominate==-1 so it won't reinherit or push 
a layer
                              drawing_ctx::state_pop(draw_ctx);
                          });
diff --git a/rust/src/viewport.rs b/rust/src/viewport.rs
index f05caa7..63ef312 100644
--- a/rust/src/viewport.rs
+++ b/rust/src/viewport.rs
@@ -21,7 +21,7 @@ pub fn draw_in_viewport<F>(vx: f64, vy: f64, vw: f64, vh: f64,
     // https://www.w3.org/TR/SVG/struct.html#UseElementWidthAttribute
     // https://www.w3.org/TR/SVG/struct.html#ImageElementWidthAttribute
     // https://www.w3.org/TR/SVG/painting.html#MarkerWidthAttribute
-    
+
     if double_equals(vw, 0.0) || double_equals(vh, 0.0) {
         return;
     }
@@ -52,9 +52,10 @@ pub fn draw_in_viewport<F>(vx: f64, vy: f64, vw: f64, vh: f64,
         drawing_ctx::add_clipping_rect(draw_ctx, vx, vy, vw, vh);
     }
 
+    drawing_ctx::set_current_state_affine(draw_ctx, affine);
+
     draw_fn(affine);
 
     drawing_ctx::pop_discrete_layer(draw_ctx);
     drawing_ctx::pop_view_box(draw_ctx);
-    
 }


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