[][src]Trait thyme::Renderer

pub trait Renderer {
    fn register_font(
        &mut self,
        handle: FontHandle,
        source: &FontSource,
        size: f32,
        scale: f32
    ) -> Result<Font, Error>;
fn register_texture(
        &mut self,
        handle: TextureHandle,
        image_data: &[u8],
        dimensions: (u32, u32)
    ) -> Result<TextureData, Error>; }

A trait to be implemented on the type to be used for rendering the UI. See GliumRenderer for an example implementation. The Renderer takes a completed frame and renders the widget tree stored within it.

Required methods

fn register_font(
    &mut self,
    handle: FontHandle,
    source: &FontSource,
    size: f32,
    scale: f32
) -> Result<Font, Error>

Register a font with Thyme. This method is called via the ContextBuilder.

fn register_texture(
    &mut self,
    handle: TextureHandle,
    image_data: &[u8],
    dimensions: (u32, u32)
) -> Result<TextureData, Error>

Register a texture with Thyme. This method is called via the ContextBuilder.

Loading content...

Implementors

impl Renderer for GliumRenderer[src]

impl<'a> Renderer for WgpuRenderer[src]

Loading content...