[librsvg: 13/90] DrawingCtx: clarify the mask vs. no-mask case a bit



commit 21810bd729c95633f47a2ef16b4f9f1e1e8da4eb
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Mar 11 12:50:01 2019 -0600

    DrawingCtx: clarify the mask vs. no-mask case a bit

 rsvg_internals/src/drawing_ctx.rs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 4f3aaaf5..3c55f67d 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -505,10 +505,12 @@ impl DrawingCtx {
                             mask,
                         );
                     }
-                } else if opacity < 1.0 {
-                    original_cr.paint_with_alpha(opacity);
                 } else {
-                    original_cr.paint();
+                    if opacity < 1.0 {
+                        original_cr.paint_with_alpha(opacity);
+                    } else {
+                        original_cr.paint();
+                    }
                 }
 
                 let bbox = self.bbox;


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