[librsvg/librsvg-2.50] Make another call to push_view_box(1.0, 1.0) consistent
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [librsvg/librsvg-2.50] Make another call to push_view_box(1.0, 1.0) consistent
- Date: Fri,  2 Oct 2020 19:24:37 +0000 (UTC)
commit a116a421ae11ec4613868449c56de7c7c46d0658
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Sep 22 14:16:10 2020 -0500
    Make another call to push_view_box(1.0, 1.0) consistent
 rsvg_internals/src/drawing_ctx.rs | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 870f14ca..2144f46b 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -1061,16 +1061,20 @@ impl DrawingCtx {
             caffine = Transform::new_scale(sw, sh).pre_translate(x, y);
 
             self.push_view_box(vbox.width(), vbox.height())
-        } else if content_units == PatternContentUnits(CoordUnits::ObjectBoundingBox) {
-            // If coords are in terms of the bounding box, use them
-            let (bbw, bbh) = bbox.rect.unwrap().size();
-
-            caffine = Transform::new_scale(bbw, bbh);
-
-            self.push_view_box(1.0, 1.0)
         } else {
-            caffine = Transform::identity();
-            self.get_view_params()
+            caffine = if content_units == PatternContentUnits(CoordUnits::ObjectBoundingBox) {
+                // If coords are in terms of the bounding box, use them
+                let (bbw, bbh) = bbox.rect.unwrap().size();
+                Transform::new_scale(bbw, bbh)
+            } else {
+                Transform::identity()
+            };
+
+            if content_units == PatternContentUnits(CoordUnits::ObjectBoundingBox) {
+                self.push_view_box(1.0, 1.0)
+            } else {
+                self.get_view_params()
+            }
         };
 
         if !scwscale.approx_eq_cairo(1.0) || !schscale.approx_eq_cairo(1.0) {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]