[][src]Trait femtovg::renderer::Renderer

pub trait Renderer {
    type Image;
    pub fn set_size(&mut self, width: u32, height: u32, dpi: f32);
pub fn render(
        &mut self,
        images: &ImageStore<Self::Image>,
        verts: &[Vertex],
        commands: &[Command]
    );
pub fn alloc_image(
        &mut self,
        info: ImageInfo
    ) -> Result<Self::Image, ErrorKind>;
pub fn update_image(
        &mut self,
        image: &mut Self::Image,
        data: ImageSource<'_>,
        x: usize,
        y: usize
    ) -> Result<(), ErrorKind>;
pub fn delete_image(&mut self, image: Self::Image);
pub fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>; }

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

Associated Types

Loading content...

Required methods

pub fn set_size(&mut self, width: u32, height: u32, dpi: f32)[src]

pub fn render(
    &mut self,
    images: &ImageStore<Self::Image>,
    verts: &[Vertex],
    commands: &[Command]
)
[src]

pub fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>[src]

pub fn update_image(
    &mut self,
    image: &mut Self::Image,
    data: ImageSource<'_>,
    x: usize,
    y: usize
) -> Result<(), ErrorKind>
[src]

pub fn delete_image(&mut self, image: Self::Image)[src]

pub fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>[src]

Loading content...

Implementors

impl Renderer for OpenGl[src]

type Image = GlTexture

impl Renderer for Void[src]

type Image = VoidImage

Loading content...