pub trait Renderer {
    type Image;
    type NativeTexture;

    fn set_size(&mut self, width: u32, height: u32, dpi: f32);
    fn render(
        &mut self,
        images: &mut ImageStore<Self::Image>,
        verts: &[Vertex],
        commands: Vec<Command>
    ); fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>; fn create_image_from_native_texture(
        &mut self,
        native_texture: Self::NativeTexture,
        info: ImageInfo
    ) -> Result<Self::Image, ErrorKind>; fn update_image(
        &mut self,
        image: &mut Self::Image,
        data: ImageSource<'_>,
        x: usize,
        y: usize
    ) -> Result<(), ErrorKind>; fn delete_image(&mut self, image: Self::Image, image_id: ImageId); fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>; }
Expand description

This is the main renderer trait that the Canvas draws to.

Required Associated Types

Required Methods

Implementors