[][src]Trait piet::Text

pub trait Text {
    type FontBuilder: FontBuilder<Out = Self::Font>;
    type Font: Font;
    type TextLayoutBuilder: TextLayoutBuilder<Out = Self::TextLayout>;
    type TextLayout: TextLayout;
    type Coord: Into<f64> + RoundFrom<f64>;
    fn new_font_by_name(
        &mut self,
        name: &str,
        size: impl RoundInto<Self::Coord>
    ) -> Result<Self::FontBuilder, Error>;
fn new_text_layout(
        &mut self,
        font: &Self::Font,
        text: &str
    ) -> Result<Self::TextLayoutBuilder, Error>; }

Associated Types

Loading content...

Required methods

fn new_font_by_name(
    &mut self,
    name: &str,
    size: impl RoundInto<Self::Coord>
) -> Result<Self::FontBuilder, Error>

fn new_text_layout(
    &mut self,
    font: &Self::Font,
    text: &str
) -> Result<Self::TextLayoutBuilder, Error>

Loading content...

Implementors

Loading content...