Trait femtovg::renderer::Renderer [−][src]
pub trait Renderer { type Image; fn set_size(&mut self, width: u32, height: u32, dpi: f32); fn render(
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
); fn alloc_image(&mut self, 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>; }
This is the main renderer trait that the Canvas draws to.
Associated Types
Loading content...Required methods
fn set_size(&mut self, width: u32, height: u32, dpi: f32)
[src]
fn render(
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
[src]
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>
[src]
fn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
[src]
&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)
[src]
fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>
[src]
Implementors
impl Renderer for OpenGl
[src]
impl Renderer for OpenGl
[src]type Image = GlTexture
fn set_size(&mut self, width: u32, height: u32, _dpi: f32)
[src]
fn render(
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
[src]
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>
[src]
fn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
[src]
&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)
[src]
fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>
[src]
impl Renderer for Void
[src]
impl Renderer for Void
[src]type Image = VoidImage
fn set_size(&mut self, width: u32, height: u32, dpi: f32)
[src]
fn render(
&mut self,
images: &ImageStore<VoidImage>,
verts: &[Vertex],
commands: &[Command]
)
[src]
&mut self,
images: &ImageStore<VoidImage>,
verts: &[Vertex],
commands: &[Command]
)
fn alloc_image(&mut self, info: ImageInfo) -> Result<Self::Image, ErrorKind>
[src]
fn update_image(
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
[src]
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>