pub struct Picture<'a> { /* private fields */ }
Implementations
sourceimpl<'a> Picture<'a>
impl<'a> Picture<'a>
pub fn size(format: Pixel, width: u32, height: u32) -> Result<usize, Error>
pub fn new(format: Pixel, width: u32, height: u32) -> Result<Self, Error>
pub fn format(&self) -> Pixel
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn layout(&self, out: &mut [u8]) -> Result<usize, Error>
pub fn layout_as(
&self,
format: Pixel,
width: u32,
height: u32,
out: &mut [u8]
) -> Result<usize, Error>
pub fn crop(
&self,
source: &mut Picture<'_>,
top: u32,
left: u32
) -> Result<(), Error>
pub fn data(&self) -> Vec<&[u8]>
pub fn data_mut(&mut self) -> Vec<&mut [u8]>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Picture<'a>
impl<'a> !Send for Picture<'a>
impl<'a> !Sync for Picture<'a>
impl<'a> Unpin for Picture<'a>
impl<'a> UnwindSafe for Picture<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more