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
Sourcepub fn set_rendering_mode(&mut self, mode: TextRenderingMode) -> &mut Self
pub fn set_rendering_mode(&mut self, mode: TextRenderingMode) -> &mut Self
Set the text rendering mode
Sourcepub fn set_fill_color(&mut self, color: Color) -> &mut Self
pub fn set_fill_color(&mut self, color: Color) -> &mut Self
Set the text fill color
Sourcepub fn set_stroke_color(&mut self, color: Color) -> &mut Self
pub fn set_stroke_color(&mut self, color: Color) -> &mut Self
Set the text stroke color
Sourcepub fn text_matrix(&self) -> [f64; 6]
pub fn text_matrix(&self) -> [f64; 6]
Get the current text matrix
Sourcepub fn operations(&self) -> &str
pub fn operations(&self) -> &str
Get the raw operations string
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