pub struct TextContext { /* private fields */ }Implementations§
Source§impl TextContext
impl TextContext
pub fn new() -> Self
pub fn set_font(&mut self, font: Font, size: f64) -> &mut Self
pub fn at(&mut self, x: f64, y: f64) -> &mut Self
pub fn write(&mut self, text: &str) -> Result<&mut Self>
pub fn write_line(&mut self, text: &str) -> Result<&mut Self>
pub fn set_character_spacing(&mut self, spacing: f64) -> &mut Self
pub fn set_word_spacing(&mut self, spacing: f64) -> &mut Self
pub fn set_horizontal_scaling(&mut self, scale: f64) -> &mut Self
pub fn set_leading(&mut self, leading: f64) -> &mut Self
pub fn set_text_rise(&mut self, rise: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for TextContext
impl Clone for TextContext
Source§fn clone(&self) -> TextContext
fn clone(&self) -> TextContext
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for TextContext
impl RefUnwindSafe for TextContext
impl Send for TextContext
impl Sync for TextContext
impl Unpin for TextContext
impl UnwindSafe for TextContext
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