Struct embedded_layout::layout::linear::spacing::FixedMargin [−][src]
pub struct FixedMargin(pub i32);
Expand description
Lay out objects with fixed margin between them
The margin can be negative, in which case the elements will be placed over one another.
Example:
use embedded_layout::{ layout::linear::{spacing::FixedMargin, LinearLayout}, prelude::*, }; use embedded_graphics::{prelude::*, primitives::Line}; // Apply a 3px margin between objects let _ = LinearLayout::horizontal( Views::new(&mut [ Line::new(Point::zero(), Point::new(0, 5)), Line::new(Point::zero(), Point::new(0, 5)), Line::new(Point::zero(), Point::new(0, 5)), ]) ) .with_spacing(FixedMargin(3));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FixedMarginimpl Send for FixedMarginimpl Sync for FixedMarginimpl Unpin for FixedMarginimpl UnwindSafe for FixedMarginBlanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
Casts the value.
Casts the value.