Struct tiny_skia::Pixmap [−][src]
pub struct Pixmap { /* fields omitted */ }Expand description
A container that owns premultiplied RGBA pixels.
The data is not aligned, therefore width == stride.
Implementations
Allocates a new pixmap.
A pixmap is filled with transparent black by default, aka (0, 0, 0, 0).
Zero size in an error.
Pixmap’s width is limited by i32::MAX/4.
Decodes a PNG data into a Pixmap.
Only 8-bit images are supported. Index PNGs are not supported.
Loads a PNG file into a Pixmap.
Only 8-bit images are supported. Index PNGs are not supported.
Encodes pixmap into a PNG data.
Saves pixmap as a PNG file.
Returns a pixel color.
Returns None when position is out of bounds.
Returns a mutable slice of pixels.
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.
Draws a filled rectangle onto the pixmap.
See PixmapMut::fill_rect for details.
Draws a filled path onto the pixmap.
See PixmapMut::fill_path for details.
Strokes a path.
See PixmapMut::stroke_path for details.
Draws a Pixmap on top of the current Pixmap.
See PixmapMut::draw_pixmap for details.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pixmap
impl UnwindSafe for Pixmap
Blanket Implementations
Mutably borrows from an owned value. Read more