[librsvg] inches_to_pixels(): inline into the only caller



commit e8c0c17cb84551a9be8908510b94072b2049d45c
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Jan 21 19:06:51 2019 -0600

    inches_to_pixels(): inline into the only caller

 rsvg_internals/src/length.rs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 46e540f1..a494d770 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -310,17 +310,13 @@ impl Length {
     }
 }
 
-fn inches_to_pixels(length: f64, dir: LengthDir, params: &ViewParams) -> f64 {
-    length * dir.scaling_factor(|| params.dpi_x(), || params.dpi_y())
-}
-
 fn font_size_from_values(values: &ComputedValues, params: &ViewParams) -> f64 {
     let v = &values.font_size.0.value().0;
 
     match v.unit {
         LengthUnit::Default => v.length,
 
-        LengthUnit::Inch => inches_to_pixels(v.length, v.dir, params),
+        LengthUnit::Inch => v.length * v.dir.scaling_factor(|| params.dpi_x(), || params.dpi_y()),
 
         LengthUnit::Percent => unreachable!("ComputedValues can't have a relative font size"),
 


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