GlyphRenderer

Trait GlyphRenderer 

Source
pub trait GlyphRenderer {
    // Required methods
    fn fill_glyph(&mut self, glyph: PreparedGlyph<'_>);
    fn stroke_glyph(&mut self, glyph: PreparedGlyph<'_>);
    fn take_glyph_caches(&mut self) -> GlyphCaches;
    fn restore_glyph_caches(&mut self, caches: GlyphCaches);
}
Expand description

Trait for types that can render glyphs.

Required Methods§

Source

fn fill_glyph(&mut self, glyph: PreparedGlyph<'_>)

Fill glyphs with the current paint and fill rule.

Source

fn stroke_glyph(&mut self, glyph: PreparedGlyph<'_>)

Stroke glyphs with the current paint and stroke settings.

Source

fn take_glyph_caches(&mut self) -> GlyphCaches

Takes the glyph caches from the renderer for use in a glyph run.

NOTE: The caller must restore the caches after the glyph run is done.

Source

fn restore_glyph_caches(&mut self, caches: GlyphCaches)

Restores the glyph caches after a glyph run.

The caches must have been previously taken with take_glyph_caches.

Implementors§