mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
rustfmt Bitmap
This commit is contained in:
parent
afef00a028
commit
7626be7043
1 changed files with 19 additions and 20 deletions
|
|
@ -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.
|
* The basic idea is to define a Bitmap as a variable mosaic of Sized Tiles.
|
||||||
*
|
*
|
||||||
|
|
@ -32,6 +14,25 @@ pub use dither::*;
|
||||||
* author: nworbnhoj
|
* 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)]
|
#[derive(Debug)]
|
||||||
pub struct Bitmap {
|
pub struct Bitmap {
|
||||||
width: usize,
|
width: usize,
|
||||||
|
|
@ -364,10 +365,8 @@ impl<'a> From<&Img> for Bitmap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue