diff options
author | 2022-11-03 04:35:16 +0100 | |
---|---|---|
committer | 2022-11-03 04:35:16 +0100 | |
commit | b95745340441835bd25b5cadc2342254631f8c05 (patch) | |
tree | 38f103e59a9decdc83ac5c7514fe89006bf0c7dd /graphics/src/layer.rs | |
parent | 20a0577034b40a6bbabee9bbbfc085f3fd5016c0 (diff) | |
download | iced-b95745340441835bd25b5cadc2342254631f8c05.tar.gz iced-b95745340441835bd25b5cadc2342254631f8c05.tar.bz2 iced-b95745340441835bd25b5cadc2342254631f8c05.zip |
Run `cargo fmt`
Diffstat (limited to '')
-rw-r--r-- | graphics/src/layer.rs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs index 56a42a9d..40e006a2 100644 --- a/graphics/src/layer.rs +++ b/graphics/src/layer.rs @@ -1,17 +1,17 @@ //! Organize rendering primitives into a flattened list of layers. +mod image; pub mod mesh; mod quad; mod text; -mod image; use crate::alignment; -use crate::{ - Background, Font, Point, Primitive, Rectangle, Size, Vector, Viewport, -}; pub use crate::layer::image::Image; pub use crate::layer::mesh::Mesh; pub use crate::layer::quad::Quad; pub use crate::layer::text::Text; +use crate::{ + Background, Font, Point, Primitive, Rectangle, Size, Vector, Viewport, +}; /// A group of primitives that should be clipped together. #[derive(Debug)] @@ -178,14 +178,12 @@ impl<'a> Layer<'a> { // Only draw visible content if let Some(clip_bounds) = layer.bounds.intersection(&bounds) { - layer.meshes.push( - Mesh { - origin: Point::new(translation.x, translation.y), - buffers, - clip_bounds, - style, - } - ); + layer.meshes.push(Mesh { + origin: Point::new(translation.x, translation.y), + buffers, + clip_bounds, + style, + }); } } Primitive::Clip { bounds, content } => { @@ -244,4 +242,4 @@ impl<'a> Layer<'a> { } } } -}
\ No newline at end of file +} |