pub struct Text<'a> {
pub pos: (usize, usize),
pub color: [u8; 4],
pub text: String,
pub font: Font<'a>,
pub scale: Scale,
pub v_metrics: VMetrics,
}Expand description
A drawable object that represents text
Fields§
§pos: (usize, usize)The position of the text on the canvas
color: [u8; 4]The color of the text
text: StringThe text that is rendered to the canvas on draw
font: Font<'a>The font used in rendering the text
scale: ScaleThe scale that is applied to the text
v_metrics: VMetricsThe vertical metrics of the text
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
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