[−][src]Trait embedded_layout::HorizontalAlignment
Implement this trait for horizontal alignment algorithms
Required methods
fn align(&self, what: &impl Dimensions, reference: &impl Dimensions) -> i32
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.
fn align(&self, object: &impl Dimensions, reference: &impl Dimensions) -> i32[src]
impl HorizontalAlignment for Left[src]
Align the left edge of the object to the left edge of the reference
fn align(&self, object: &impl Dimensions, reference: &impl Dimensions) -> i32[src]
impl HorizontalAlignment for NoAlignment[src]
Keep the object's horizontal coordinate unchanged
fn align(&self, _object: &impl Dimensions, _reference: &impl Dimensions) -> i32[src]
impl HorizontalAlignment for Right[src]
Align the right edge of the object to the right edge of the reference