rustfmt Bitmap

This commit is contained in:
nworbnhoj 2022-07-28 06:07:35 +10:00
parent afef00a028
commit 7626be7043

View file

@ -1,21 +1,3 @@
use core::cmp::{max, min};
use graphics_server::api::*;
use graphics_server::PixelColor;
use std::convert::TryInto;
use std::io::Read;
use std::ops::Deref;
mod img;
pub use img::*;
mod decode_png;
pub use decode_png::*;
mod greyscale;
pub use greyscale::*;
mod shrink;
pub use shrink::*;
mod dither;
pub use dither::*;
/*
* The basic idea is to define a Bitmap as a variable mosaic of Sized Tiles.
*
@ -32,6 +14,25 @@ pub use dither::*;
* author: nworbnhoj
*/
use std::cmp::{max, min};
use std::convert::TryInto;
use std::io::Read;
use std::ops::Deref;
use graphics_server::api::*;
use graphics_server::PixelColor;
mod img;
pub use img::*;
mod decode_png;
pub use decode_png::*;
mod greyscale;
pub use greyscale::*;
mod shrink;
pub use shrink::*;
mod dither;
pub use dither::*;
#[derive(Debug)]
pub struct Bitmap {
width: usize,
@ -364,10 +365,8 @@ impl<'a> From<&Img> for Bitmap {
}
}
// **********************************************************************
#[cfg(test)]
mod tests {
use super::*;