Struct nanovg::ImageBuilder
[−]
[src]
pub struct ImageBuilder<'a> { /* fields omitted */ }
Methods
impl<'a> ImageBuilder<'a>
[src]
pub fn context(&self) -> &'a Context
[src]
Get the underlying context this ImageBuilder was created on.
pub fn mipmaps(self) -> Self
[src]
Create mipmaps during the creation of the image.
pub fn repeat_x(self) -> Self
[src]
Repeat the image on the X axis.
pub fn repeat_y(self) -> Self
[src]
Repeat the image on the Y axis.
pub fn flipy(self) -> Self
[src]
Flip (invert) the image in the Y direction during rendering.
pub fn premultiplied(self) -> Self
[src]
The image data contains premultiplied alpha.
pub fn nearest(self) -> Self
[src]
Use nearest interpolation instead of linear.
pub fn build_from_file<P: AsRef<IoPath>>(
self,
file: P
) -> ImageBuilderResult<'a>
[src]
self,
file: P
) -> ImageBuilderResult<'a>
Construct the image by loading it from an image file on the file system.
pub fn build_from_memory(self, data: &[u8]) -> ImageBuilderResult<'a>
[src]
Construct the image by loading it from an image file in memory.
pub fn build_from_rgba(
self,
width: usize,
height: usize,
data: &[u32]
) -> ImageBuilderResult<'a>
[src]
self,
width: usize,
height: usize,
data: &[u32]
) -> ImageBuilderResult<'a>
Construct the image by filling it with pixel data from memory (always 32bit RGBA).