Struct tiny_skia::PixmapRef [−][src]
pub struct PixmapRef<'a> { /* fields omitted */ }Expand description
A container that references premultiplied RGBA pixels.
Can be created from Pixmap or from a user provided data.
The data is not aligned, therefore width == stride.
Implementations
Creates a new PixmapRef 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: RGBA).
Creates a new Pixmap from the current data.
Clones the underlying data.
Returns the internal data.
Byteorder: RGBA
Returns a pixel color.
Returns None when position is out of bounds.
Returns a slice of pixels.
Returns a copy of the pixmap that intersects the rect.
Returns None when Pixmap’s rect doesn’t contain rect.
Encodes pixmap into a PNG data.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for PixmapRef<'a>
impl<'a> UnwindSafe for PixmapRef<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
