[][src]Trait embedded_layout::VerticalAlignment

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

Implement this trait for vertical alignment algorithms

Vertical alignment assumes lower coordinate values are higher up

Required methods

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

Loading content...

Implementors

impl VerticalAlignment for Bottom[src]

Align the bottom edge of the object to the bottom edge of the reference

impl VerticalAlignment for Center[src]

Center the objects vertically

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

impl VerticalAlignment for NoAlignment[src]

Keep the object's vertical coordinate unchanged

impl VerticalAlignment for Top[src]

Align the top edge of the object to the top edge of the reference

Loading content...