[librsvg: 28/90] NodeClipPath.to_cairo_context() - reorder code a bit



commit bdcd78d8496df20c733dbc26dec704e5d8a6818f
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Mar 13 17:20:34 2019 -0600

    NodeClipPath.to_cairo_context() - reorder code a bit

 rsvg_internals/src/clip_path.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/clip_path.rs b/rsvg_internals/src/clip_path.rs
index 4f8f6aff..b704b72d 100644
--- a/rsvg_internals/src/clip_path.rs
+++ b/rsvg_internals/src/clip_path.rs
@@ -39,6 +39,9 @@ impl NodeClipPath {
 
         let clip_units = self.units.get();
 
+        let cr = draw_ctx.get_cairo_context();
+        let save_affine = cr.get_matrix();
+
         let child_matrix = if clip_units == ClipPathUnits(CoordUnits::ObjectBoundingBox) {
             if bbox.rect.is_none() {
                 // The node being clipped is empty / doesn't have a
@@ -54,8 +57,6 @@ impl NodeClipPath {
             *affine_before_clip
         };
 
-        let cr = draw_ctx.get_cairo_context();
-        let save_affine = cr.get_matrix();
         cr.set_matrix(child_matrix);
 
         // here we don't push a layer because we are clipping


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