[][src]Enum mief::elements::scoreboard::TextAlignment

enum TextAlignment {
    Left,
    Center,
    Right,
}

Alignment of text.

Variants

Left

Align text on the left edge of the text's bounding box.

Center

Align text in the center of the text's bounding box.

Right

Align text on the right edge of the text's bounding box.

Methods

impl TextAlignment[src]

pub fn align(&self, position_x: f64, width: f64) -> f64[src]

Compute the x-position where the text will be drawn depending on the alignment.