[][src]Trait embedded_layout::HorizontalAlignment

pub trait HorizontalAlignment {
    fn align(&self, what: &impl Dimensions, reference: &impl Dimensions) -> i32;
}

Implement this trait for horizontal alignment algorithms

Required methods

fn align(&self, what: &impl Dimensions, reference: &impl Dimensions) -> i32

Loading content...

Implementors

impl HorizontalAlignment for Center[src]

Center the objects horizontally

Note: in certain cases it's not possible to center objects perfectly because of the integer cordinates used.

impl HorizontalAlignment for Left[src]

Align the left edge of the object to the left edge of the reference

impl HorizontalAlignment for NoAlignment[src]

Keep the object's horizontal coordinate unchanged

impl HorizontalAlignment for Right[src]

Align the right edge of the object to the right edge of the reference

Loading content...