From 00e05ac35b85fdf0e7eb5f5db9db4b0a563fa14d Mon Sep 17 00:00:00 2001 From: cc Date: Wed, 20 Aug 2025 22:23:34 -0700 Subject: Externalize Label Structure --- src/label_formats/mod.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/label_formats/mod.rs (limited to 'src/label_formats/mod.rs') diff --git a/src/label_formats/mod.rs b/src/label_formats/mod.rs deleted file mode 100644 index b48486a..0000000 --- a/src/label_formats/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -mod large_label_format; -mod label_format; - -pub use large_label_format::LargeLabelFormat; -pub use label_format::LabelFormat; - -pub(crate) fn flood(source: &LargeLabelFormat, destination: &mut Vec, - x: usize, y: usize, - from_color: u32, to_color: u16) { - let width = source.width; - let destination_color = destination[x + y * width]; - if destination_color != 0 { - return; - } - let source_color = source.buffer[x + y * width]; - if source_color != from_color { - return; - } - destination[x + y * width] = to_color; - if x > 0 { - flood(source, destination, x-1, y, from_color, to_color); - } - if (x+1) < width { - flood(source, destination, x+1, y, from_color, to_color); - } - if y > 0 { - flood(source, destination, x, y-1, from_color, to_color); - } - if (y+1) < source.height { - flood(source, destination, x, y+1, from_color, to_color); - } -} - -- cgit v1.2.1