[librsvg: 3/21] Remove extra functions in transform attribute




commit 862a06a7b7db6c8f4ebb50d2b2e53769af5e41a5
Author: Madds H <madds hollandart io>
Date:   Wed Aug 11 22:19:21 2021 -0500

    Remove extra functions in transform attribute
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/576>

 src/transform.rs | 47 -----------------------------------------------
 1 file changed, 47 deletions(-)
---
diff --git a/src/transform.rs b/src/transform.rs
index bb104f31..3cf097ce 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -548,22 +548,6 @@ fn parse_translate_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, Pa
     })
 }
 
-fn parse_translate_x_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
-    parser.parse_nested_block(|p| {
-        let tx = f64::parse(p)?;
-
-        Ok(Transform::new_translate(tx, 0.0))
-    })
-}
-
-fn parse_translate_y_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
-    parser.parse_nested_block(|p| {
-        let ty = f64::parse(p)?;
-
-        Ok(Transform::new_translate(0.0, ty))
-    })
-}
-
 fn parse_scale_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
     parser.parse_nested_block(|p| {
         let x = f64::parse(p)?;
@@ -579,22 +563,6 @@ fn parse_scale_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseE
     })
 }
 
-fn parse_scale_x_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
-    parser.parse_nested_block(|p| {
-        let x = f64::parse(p)?;
-
-        Ok(Transform::new_scale(x, 0.0))
-    })
-}
-
-fn parse_scale_y_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
-    parser.parse_nested_block(|p| {
-        let y = f64::parse(p)?;
-
-        Ok(Transform::new_scale(0.0, y))
-    })
-}
-
 fn parse_rotate_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
     parser.parse_nested_block(|p| {
         let angle = Angle::from_degrees(f64::parse(p)?);
@@ -617,21 +585,6 @@ fn parse_rotate_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, Parse
     })
 }
 
-fn parse_skew_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
-    parser.parse_nested_block(|p| {
-        let ax = Angle::from_degrees(f64::parse(p)?);
-
-        let ay = Angle::from_degrees(
-            p.try_parse(|p| {
-                optional_comma(p);
-                f64::parse(p)
-            })
-            .unwrap_or(0.0),
-        );
-        Ok(Transform::new_skew(ax, ay))
-    })
-}
-
 fn parse_skew_x_args<'i>(parser: &mut Parser<'i, '_>) -> Result<Transform, ParseError<'i>> {
     parser.parse_nested_block(|p| {
         let angle = Angle::from_degrees(f64::parse(p)?);


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