[librsvg/attribute-parsers-737: 16/26] ColorMatrix::hue_rotate_matrix() - reformat nicely




commit 0c43368d439243f867813940ddf435f77711fe6d
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Oct 20 17:09:53 2022 -0500

    ColorMatrix::hue_rotate_matrix() - reformat nicely

 src/filters/color_matrix.rs | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/filters/color_matrix.rs b/src/filters/color_matrix.rs
index 9376cec4a..b31cb9334 100644
--- a/src/filters/color_matrix.rs
+++ b/src/filters/color_matrix.rs
@@ -184,19 +184,26 @@ impl ColorMatrix {
         })
     }
 
+    #[rustfmt::skip]
     pub fn hue_rotate_matrix(radians: f64) -> Matrix5<f64> {
         let (sin, cos) = radians.sin_cos();
 
         let a = Matrix3::new(
-            0.213, 0.715, 0.072, 0.213, 0.715, 0.072, 0.213, 0.715, 0.072,
+            0.213, 0.715, 0.072,
+            0.213, 0.715, 0.072,
+            0.213, 0.715, 0.072,
         );
 
         let b = Matrix3::new(
-            0.787, -0.715, -0.072, -0.213, 0.285, -0.072, -0.213, -0.715, 0.928,
+             0.787, -0.715, -0.072,
+            -0.213,  0.285, -0.072,
+            -0.213, -0.715,  0.928,
         );
 
         let c = Matrix3::new(
-            -0.213, -0.715, 0.928, 0.143, 0.140, -0.283, -0.787, 0.715, 0.072,
+            -0.213, -0.715,  0.928,
+             0.143,  0.140, -0.283,
+            -0.787,  0.715,  0.072,
         );
 
         let top_left = a + b * cos + c * sin;


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