pub struct ImageBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> ImageBuilder<'a>
impl<'a> ImageBuilder<'a>
Sourcepub fn context(&self) -> &'a Context
pub fn context(&self) -> &'a Context
Get the underlying context this ImageBuilder was created on.
Sourcepub fn premultiplied(self) -> Self
pub fn premultiplied(self) -> Self
The image data contains premultiplied alpha.
Sourcepub fn build_from_file<P: AsRef<IoPath>>(
self,
file: P,
) -> ImageBuilderResult<'a>
pub fn build_from_file<P: AsRef<IoPath>>( self, file: P, ) -> ImageBuilderResult<'a>
Construct the image by loading it from an image file on the file system.
Sourcepub fn build_from_memory(self, data: &[u8]) -> ImageBuilderResult<'a>
pub fn build_from_memory(self, data: &[u8]) -> ImageBuilderResult<'a>
Construct the image by loading it from an image file in memory.
Sourcepub fn build_from_rgba(
self,
width: usize,
height: usize,
data: &[u32],
) -> ImageBuilderResult<'a>
pub fn build_from_rgba( self, width: usize, height: usize, data: &[u32], ) -> ImageBuilderResult<'a>
Construct the image by filling it with pixel data from memory (always 32bit RGBA).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ImageBuilder<'a>
impl<'a> RefUnwindSafe for ImageBuilder<'a>
impl<'a> !Send for ImageBuilder<'a>
impl<'a> !Sync for ImageBuilder<'a>
impl<'a> Unpin for ImageBuilder<'a>
impl<'a> UnwindSafe for ImageBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more