[−][src]Struct tiny_skia::PixmapMut
A container that references mutable premultiplied RGBA pixels.
Can be created from Pixmap
or from a user provided data.
The data is not aligned, therefore width == stride.
Implementations
impl<'a> PixmapMut<'a>
[src]
pub fn from_bytes(data: &'a mut [u8], width: u32, height: u32) -> Option<Self>
[src]
Creates a new PixmapMut
from bytes.
The size must be at least size.width() * size.height() * BYTES_PER_PIXEL
.
Zero size in an error. Width is limited by i32::MAX/4.
The data
is assumed to have premultiplied RGBA pixels (byteorder: ABGR).
pub fn to_owned(&self) -> Pixmap
[src]
Creates a new Pixmap
from the current data.
Clones the underlying data.
pub fn width(&self) -> u32
[src]
Returns pixmap's width.
pub fn height(&self) -> u32
[src]
Returns pixmap's height.
pub fn data_mut(&mut self) -> &mut [u8]
[src]
Returns the mutable internal data.
Bytes are ordered as RGBA.
pub fn pixels_mut(&mut self) -> &mut [PremultipliedColorU8]
[src]
Returns a mutable slice of pixels.
Trait Implementations
impl Debug for PixmapMut<'_>
[src]
impl<'a> From<PixmapMut<'a>> for Canvas<'a>
[src]
impl<'a> PartialEq<PixmapMut<'a>> for PixmapMut<'a>
[src]
pub fn eq(&self, other: &PixmapMut<'a>) -> bool
[src]
pub fn ne(&self, other: &PixmapMut<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for PixmapMut<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for PixmapMut<'a>
[src]
impl<'a> Send for PixmapMut<'a>
[src]
impl<'a> Sync for PixmapMut<'a>
[src]
impl<'a> Unpin for PixmapMut<'a>
[src]
impl<'a> !UnwindSafe for PixmapMut<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,