[−][src]Trait femtovg::renderer::Renderer
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]
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
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]
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
pub fn delete_image(&mut self, image: Self::Image)
[src]
pub fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>
[src]
Implementors
impl Renderer for OpenGl
[src]
type Image = GlTexture
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]
&mut self,
images: &ImageStore<Self::Image>,
verts: &[Vertex],
commands: &[Command]
)
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]
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>
pub fn delete_image(&mut self, image: Self::Image)
[src]
pub fn screenshot(&mut self) -> Result<ImgVec<RGBA8>, ErrorKind>
[src]
impl Renderer for Void
[src]
type Image = VoidImage
pub fn set_size(&mut self, width: u32, height: u32, dpi: f32)
[src]
pub fn render(
&mut self,
images: &ImageStore<VoidImage>,
verts: &[Vertex],
commands: &[Command]
)
[src]
&mut self,
images: &ImageStore<VoidImage>,
verts: &[Vertex],
commands: &[Command]
)
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]
&mut self,
image: &mut Self::Image,
data: ImageSource<'_>,
x: usize,
y: usize
) -> Result<(), ErrorKind>