pub struct Text {
pub content: String,
pub position: Point,
pub color: Color,
pub size: f32,
pub font: Font,
pub horizontal_alignment: Horizontal,
pub vertical_alignment: Vertical,
}
Available on crate feature
pure
only.Expand description
A bunch of text that can be drawn to a canvas
Fields
content: String
The contents of the text
position: Point
The position where to begin drawing the text (top-left corner coordinates)
color: Color
The color of the text
size: f32
The size of the text
font: Font
The font of the text
horizontal_alignment: Horizontal
The horizontal alignment of the text
vertical_alignment: Vertical
The vertical alignment of the text
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more