pub enum Text {
    Paragraph {
        paragraph: Weak,
        position: Point,
        color: Color,
        clip_bounds: Rectangle,
        transformation: Transformation,
    },
    Editor {
        editor: Weak,
        position: Point,
        color: Color,
        clip_bounds: Rectangle,
        transformation: Transformation,
    },
    Cached {
        content: String,
        bounds: Rectangle,
        color: Color,
        size: Pixels,
        line_height: Pixels,
        font: Font,
        align_x: Alignment,
        align_y: Vertical,
        shaping: Shaping,
        clip_bounds: Rectangle,
    },
    Raw {
        raw: Raw,
        transformation: Transformation,
    },
}Expand description
A text primitive.
Variants§
Paragraph
A paragraph.
Editor
An editor.
Cached
Some cached text.
Fields
§
bounds: RectangleThe bounds of the text.
§
color: ColorThe color of the text.
§
size: PixelsThe size of the text in logical pixels.
§
line_height: PixelsThe line height of the text.
§
font: FontThe font of the text.
§
align_x: AlignmentThe horizontal alignment of the text.
§
align_y: VerticalThe vertical alignment of the text.
§
shaping: ShapingThe shaping strategy of the text.
§
clip_bounds: RectangleThe clip bounds of the text.
Raw
Some raw text.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more