Struct piet::ImageBuf [−][src]
pub struct ImageBuf { /* fields omitted */ }
Expand description
An in-memory pixel buffer.
Contains raw bytes, dimensions, and image format (piet::ImageFormat
).
Implementations
Creates a new image buffer from an array of bytes.
format
specifies the pixel format of the pixel data, which must have length
width * height * format.bytes_per_pixel()
.
Panics
Panics if the pixel data has the wrong length.
Returns the raw pixel data of this image buffer.
Returns a shared reference to the raw pixel data of this image buffer.
Returns the format of the raw pixel data.
Returns an iterator over the pixels in this image.
The return value is an iterator over “rows”, where each “row” is an iterator over the color of the pixels in that row.
Converts this buffer an image that is optimized for drawing into a RenderContext
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ImageBuf
impl UnwindSafe for ImageBuf
Blanket Implementations
Mutably borrows from an owned value. Read more