Enum druid::piet::TextAlignment
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§
§impl Clone for TextAlignment
impl Clone for TextAlignment
§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 Data for TextAlignment
impl Data for TextAlignment
§impl Debug for TextAlignment
impl Debug for TextAlignment
§impl Default for TextAlignment
impl Default for TextAlignment
§fn default() -> TextAlignment
fn default() -> TextAlignment
Returns the “default value” for a type. Read more
§impl PartialEq<TextAlignment> for TextAlignment
impl PartialEq<TextAlignment> for TextAlignment
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.