Enum piet::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§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 ==
.