[librsvg: 12/14] Propagate alpha_only through scale()



commit 27a919d09d61016cdd6c720805d9a3f4f3d153c2
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Sun Jul 15 14:46:20 2018 +0300

    Propagate alpha_only through scale()

 rsvg_internals/src/surface_utils/shared_surface.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/surface_utils/shared_surface.rs 
b/rsvg_internals/src/surface_utils/shared_surface.rs
index 870f8196..6fd66097 100644
--- a/rsvg_internals/src/surface_utils/shared_surface.rs
+++ b/rsvg_internals/src/surface_utils/shared_surface.rs
@@ -218,7 +218,11 @@ impl SharedImageSurface {
             cr.paint();
         }
 
-        SharedImageSurface::new(output_surface)
+        if self.alpha_only {
+            SharedImageSurface::new_alpha_only(output_surface)
+        } else {
+            SharedImageSurface::new(output_surface)
+        }
     }
 
     /// Returns a scaled version of a surface and bounds.


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