#include <Pt/Gfx/Api.h>
Image storing pixels in ARGB-32 format. More...
Inherits BasicImage< Argb32 >.
Public Member Functions | |
| Argb32Image (const Argb32 &format=Argb32::get()) | |
| Constructs an empty image. More... | |
| Argb32Image (Pt::ssize_t width, Pt::ssize_t height, const Argb32 &format=Argb32::get()) | |
| Constructs an image of the given size. More... | |
| Argb32Image (Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding, const Argb32 &format=Argb32::get()) | |
| Constructs an image of the given size with row padding. More... | |
| Argb32Image (Pt::uint8_t *data, Pt::ssize_t width, Pt::ssize_t height, const Argb32 &format=Argb32::get()) | |
| Constructs an image over external pixel data. More... | |
| Argb32Image (Pt::uint8_t *data, Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding, const Argb32 &format=Argb32::get()) | |
| Constructs an image over external pixel data with row padding. More... | |
| Argb32Image (const Argb32Image &image) | |
| Copy constructor. More... | |
| void | reset (Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding, const Format &format) |
| Reset to new size. | |
| void | reset (Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding) |
| Reset to new size, keep existing format. | |
| void | reset (Pt::uint8_t *data, Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding, const Format &format) |
| Reset to new data. | |
| void | reset (Pt::uint8_t *data, Pt::ssize_t width, Pt::ssize_t height, Pt::ssize_t padding) |
| Reset to new data, keep existing format. | |
| void | clear () |
| Clears the image. | |
Argb32Image owns its pixel data and stores each pixel as a 32-bit value with four 8-bit channels: alpha, red, green, and blue.
|
explicit |
Creates an image with no pixel data. The format parameter selects the pixel format and defaults to Argb32::get().
| Argb32Image | ( | Pt::ssize_t | width, |
| Pt::ssize_t | height, | ||
| const Argb32 & | format = Argb32::get() |
||
| ) |
Allocates pixel data for width x height pixels. The format parameter selects the pixel format and defaults to Argb32::get().
| Argb32Image | ( | Pt::ssize_t | width, |
| Pt::ssize_t | height, | ||
| Pt::ssize_t | padding, | ||
| const Argb32 & | format = Argb32::get() |
||
| ) |
Allocates pixel data for width x height pixels. Each row is extended by padding extra bytes beyond the last pixel, which is useful when the image data must be aligned to a specific stride. The format parameter selects the pixel format and defaults to Argb32::get().
| Argb32Image | ( | Pt::uint8_t * | data, |
| Pt::ssize_t | width, | ||
| Pt::ssize_t | height, | ||
| const Argb32 & | format = Argb32::get() |
||
| ) |
Wraps the caller-supplied data buffer without taking ownership. The buffer must cover at least width x height pixels in Argb32 format and must remain valid for the lifetime of this image. The format parameter selects the pixel format and defaults to Argb32::get().
| Argb32Image | ( | Pt::uint8_t * | data, |
| Pt::ssize_t | width, | ||
| Pt::ssize_t | height, | ||
| Pt::ssize_t | padding, | ||
| const Argb32 & | format = Argb32::get() |
||
| ) |
Wraps the caller-supplied data buffer without taking ownership. Each row occupies width pixels plus padding extra bytes. The buffer must be sized accordingly and must remain valid for the lifetime of this image. The format parameter selects the pixel format and defaults to Argb32::get().
| Argb32Image | ( | const Argb32Image & | image | ) |
Creates a deep copy of image, including all pixel data.