# Trait Renderer

    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§

#### 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`.

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

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

## Implementors§

§

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