[librsvg] Remove hand_normalize(); it is unused now. Yay!
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Remove hand_normalize(); it is unused now. Yay!
- Date: Tue, 19 Feb 2019 19:55:00 +0000 (UTC)
commit 2a79f16a603a362ca27f10b114ddf64415fb132e
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Feb 19 13:53:52 2019 -0600
Remove hand_normalize(); it is unused now. Yay!
rsvg_internals/src/length.rs | 29 -----------------------------
1 file changed, 29 deletions(-)
---
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index a6c1d853..887fbf25 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -135,16 +135,6 @@ macro_rules! define_length_type {
}
}
- pub fn hand_normalize(
- &self,
- pixels_per_inch: f64,
- width_or_height: f64,
- font_size: f64,
- ) -> f64 {
- self.0
- .hand_normalize(pixels_per_inch, width_or_height, font_size)
- }
-
pub fn from_cssparser(parser: &mut Parser<'_, '_>) -> Result<Self, ValueErrorKind> {
Ok($name(Length::from_cssparser(parser)?))
}
@@ -238,25 +228,6 @@ impl Length {
self.length
}
- pub fn hand_normalize(
- &self,
- pixels_per_inch: f64,
- width_or_height: f64,
- font_size: f64,
- ) -> f64 {
- match self.unit {
- LengthUnit::Percent => self.length * width_or_height,
- LengthUnit::Px => self.length,
- LengthUnit::Em => self.length * font_size,
- LengthUnit::Ex => self.length * font_size / 2.0,
- LengthUnit::In => self.length * pixels_per_inch,
- LengthUnit::Cm => self.length * pixels_per_inch / CM_PER_INCH,
- LengthUnit::Mm => self.length * pixels_per_inch / MM_PER_INCH,
- LengthUnit::Pt => self.length * pixels_per_inch / POINTS_PER_INCH,
- LengthUnit::Pc => self.length * pixels_per_inch / PICA_PER_INCH,
- }
- }
-
pub fn from_cssparser(parser: &mut Parser<'_, '_>) -> Result<Length, ValueErrorKind> {
let length = {
let token = parser.next().map_err(|_| {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]