|
tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
|
Immutable view into RGBA pixel data. Does not own memory.
#include <tiny_skia/Pixmap.h>
Public Member Functions | |
| std::span< const std::uint8_t > | data () const |
| Raw byte data (premultiplied RGBA). | |
| std::span< const PremultipliedColorU8 > | pixels () const |
| Pixel data as PremultipliedColorU8 span. | |
| std::optional< PremultipliedColorU8 > | pixel (std::uint32_t x, std::uint32_t y) const |
| Returns the pixel at (x, y), or nullopt if out of bounds. | |
| std::optional< Pixmap > | cloneRect (const IntRect &rect) const |
| Clones a rectangular region into a new Pixmap. | |
Static Public Member Functions | |
| static std::optional< PixmapView > | fromBytes (std::span< const std::uint8_t > data, std::uint32_t width, std::uint32_t height) |
| Creates a view from raw byte data. Returns nullopt if size mismatches. | |