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§
source§impl Clone for TextAlignment
impl Clone for TextAlignment
source§fn clone(&self) -> TextAlignment
fn clone(&self) -> TextAlignment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextAlignment
impl Debug for TextAlignment
source§impl Default for TextAlignment
impl Default for TextAlignment
source§fn default() -> TextAlignment
fn default() -> TextAlignment
Returns the “default value” for a type. Read more
source§impl PartialEq<TextAlignment> for TextAlignment
impl PartialEq<TextAlignment> for TextAlignment
source§fn eq(&self, other: &TextAlignment) -> bool
fn eq(&self, other: &TextAlignment) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.