Enum piet_common::TextAlignment
source · pub enum TextAlignment {
Start,
End,
Center,
Justified,
}Expand description
The alignment of text in a TextLayout.
Variants
Start
Text is aligned to the left edge in left-to-right scripts, and the right edge in right-to-left scripts.
End
Text is aligned to the right edge in left-to-right scripts, and the left edge in right-to-left scripts.
Center
Lines are centered in the available space.
Justified
Line width is increased to fill available space.
This may be achieved through increases in word or character spacing, or through ligatures where available.
Trait Implementations
sourceimpl Clone for TextAlignment
impl Clone for TextAlignment
sourcefn clone(&self) -> TextAlignment
fn clone(&self) -> TextAlignment
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for TextAlignment
impl Debug for TextAlignment
sourceimpl Default for TextAlignment
impl Default for TextAlignment
sourcefn default() -> TextAlignment
fn default() -> TextAlignment
Returns the “default value” for a type. Read more
sourceimpl PartialEq<TextAlignment> for TextAlignment
impl PartialEq<TextAlignment> for TextAlignment
sourcefn eq(&self, other: &TextAlignment) -> bool
fn eq(&self, other: &TextAlignment) -> bool
impl Copy for TextAlignment
impl Eq for TextAlignment
impl StructuralEq for TextAlignment
impl StructuralPartialEq for TextAlignment
Auto Trait Implementations
impl RefUnwindSafe for TextAlignment
impl Send for TextAlignment
impl Sync for TextAlignment
impl Unpin for TextAlignment
impl UnwindSafe for TextAlignment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.