Trait Renderer

Source
pub trait Renderer {
    // Required methods
    fn rectangle(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color);
    fn glyph(&mut self, physical_glyph: PhysicalGlyph, color: Color);
}
Expand description

Custom renderer for buffers and editors

Required Methods§

Source

fn rectangle(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color)

Render a rectangle at x, y with size w, h and the provided Color.

Source

fn glyph(&mut self, physical_glyph: PhysicalGlyph, color: Color)

Render a PhysicalGlyph with the provided Color. For performance, consider using SwashCache.

Implementors§

Source§

impl<'a, F: FnMut(i32, i32, u32, u32, Color)> Renderer for LegacyRenderer<'a, F>