[librsvg: 2/3] rect: drop outer() method



commit ab1a9fadd21ee13b3a0eb9384346bdad16c363d3
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Dec 9 11:27:31 2019 +0100

    rect: drop outer() method
    
    It is not used anymore.

 rsvg_internals/src/rect.rs | 28 ----------------------------
 1 file changed, 28 deletions(-)
---
diff --git a/rsvg_internals/src/rect.rs b/rsvg_internals/src/rect.rs
index 5c875be2..896f2c3a 100644
--- a/rsvg_internals/src/rect.rs
+++ b/rsvg_internals/src/rect.rs
@@ -11,7 +11,6 @@ pub trait RectangleExt {
     fn intersection(&self, rect: &cairo::Rectangle) -> Option<cairo::Rectangle>;
     fn union(&self, rect: &cairo::Rectangle) -> cairo::Rectangle;
     fn translate(&self, by: (f64, f64)) -> cairo::Rectangle;
-    fn outer(&self) -> cairo::Rectangle;
 }
 
 impl RectangleExt for cairo::Rectangle {
@@ -90,17 +89,6 @@ impl RectangleExt for cairo::Rectangle {
             height: self.height,
         }
     }
-
-    fn outer(&self) -> cairo::Rectangle {
-        let (x, y) = (self.x.floor(), self.y.floor());
-
-        cairo::Rectangle {
-            x,
-            y,
-            width: (self.x + self.width).ceil() - x,
-            height: (self.y + self.height).ceil() - y,
-        }
-    }
 }
 
 pub trait TransformRect {
@@ -347,22 +335,6 @@ mod tests {
         assert_approx_eq_cairo!(4.34_f64, r.height);
     }
 
-    #[test]
-    fn outer_rect() {
-        let r = cairo::Rectangle {
-            x: 1.42,
-            y: 1.42,
-            width: 3.14,
-            height: 3.14,
-        };
-
-        let or = r.outer();
-        assert_eq!(1.0, or.x);
-        assert_eq!(1.0, or.y);
-        assert_eq!(4.0, or.width);
-        assert_eq!(4.0, or.height);
-    }
-
     #[test]
     fn transform_rect() {
         let r = cairo::Rectangle {


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