Browse Source

Pattern X then Y for consistency

Kevin Lee 1 month ago
parent
commit
c34caeed08
1 changed files with 21 additions and 21 deletions
  1. 21 21
      src/config/object.rs

+ 21 - 21
src/config/object.rs

@@ -328,6 +328,27 @@ impl ObjectOperation {
                     }
                 }
 
+                if let Some(hatch_x) = &array.pattern_hatch_x {
+                    if pattern_y {
+                        for y in 0..array.rows {
+                            hatch_x.pattern(
+                                &mut new_obj
+                                    .iter_mut()
+                                    .enumerate()
+                                    .skip(y * array.columns)
+                                    .take(array.columns),
+                            )
+                        }
+                    } else {
+                        hatch_x.pattern(
+                            &mut new_obj
+                                .iter_mut()
+                                .enumerate()
+                                .take(array.columns * array.rows),
+                        );
+                    }
+                }
+
                 if let Some(pen_y) = &array.pattern_pen_y {
                     if pattern_x {
                         for x in 0..array.columns {
@@ -354,27 +375,6 @@ impl ObjectOperation {
                     }
                 }
 
-                if let Some(hatch_x) = &array.pattern_hatch_x {
-                    if pattern_y {
-                        for y in 0..array.rows {
-                            hatch_x.pattern(
-                                &mut new_obj
-                                    .iter_mut()
-                                    .enumerate()
-                                    .skip(y * array.columns)
-                                    .take(array.columns),
-                            )
-                        }
-                    } else {
-                        hatch_x.pattern(
-                            &mut new_obj
-                                .iter_mut()
-                                .enumerate()
-                                .take(array.columns * array.rows),
-                        );
-                    }
-                }
-
                 if let Some(hatch_y) = &array.pattern_hatch_y {
                     if pattern_x {
                         for x in 0..array.columns {