[−][src]Struct plotters::prelude::FontDesc
Describes a font
Methods
impl<'a> FontDesc<'a>[src]
pub fn new(typeface: &'a str, size: f64) -> Self[src]
Create a new font
pub fn resize(&self, size: f64) -> FontDesc<'a>[src]
Create a new font desc with the same font but different size
pub fn get_name(&self) -> &'a str[src]
Get the name of the font
pub fn get_size(&self) -> f64[src]
Get the size of font
pub fn box_size(&self, text: &str) -> FontResult<(u32, u32)>[src]
Get the size of the text if rendered in this font
pub fn draw<E, DrawFunc: FnMut(u32, u32, f32) -> Result<(), E>>(
&self,
text: &str,
(x, y): (u32, u32),
draw: DrawFunc
) -> FontResult<Result<(), E>>[src]
&self,
text: &str,
(x, y): (u32, u32),
draw: DrawFunc
) -> FontResult<Result<(), E>>
Actually draws a font with a drawing function
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value as a parameter of self.