|
tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
|
Mutable view into RGBA pixel data. Does not own memory. Primary drawing target for all rendering operations.
#include <tiny_skia/Pixmap.h>
Public Member Functions | |
| std::span< std::uint8_t > | data () const |
| Raw mutable byte data (premultiplied RGBA). | |
| std::span< PremultipliedColorU8 > | pixels () const |
| Pixel data as mutable PremultipliedColorU8 span. | |
| MutableSubPixmapView | subpixmap () const |
| Returns a sub-view covering the full pixmap. | |
| std::optional< MutableSubPixmapView > | subpixmap (const IntRect &rect) const |
| Returns a sub-view for the given rectangle, or nullopt if out of bounds. | |
Static Public Member Functions | |
| static std::optional< MutablePixmapView > | fromBytes (std::span< std::uint8_t > data, std::uint32_t width, std::uint32_t height) |
| Creates a mutable view from raw byte data. Returns nullopt if size mismatches. | |