struct ArtPixBuf {
/*< public >*/
ArtPixFormat format;
int n_channels;
int has_alpha;
int bits_per_sample;
art_u8 *pixels;
int width;
int height;
int rowstride;
void *destroy_data;
ArtDestroyNotify destroy;
};
ArtPixBuf* art_pixbuf_new_rgb (art_u8 *pixels,
int width,
int height,
int rowstride);
Creates a generic data structure for holding a buffer of RGB
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
The pixels buffer is freed with art_free() when the ArtPixBuf is
destroyed. Thus, this function is suitable when the pixel data is
allocated with art_alloc().
ArtPixBuf* art_pixbuf_new_rgba (art_u8 *pixels,
int width,
int height,
int rowstride);
Creates a generic data structure for holding a buffer of RGBA
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
The pixels buffer is freed with art_free() when the ArtPixBuf is
destroyed. Thus, this function is suitable when the pixel data is
allocated with art_alloc().
ArtPixBuf* art_pixbuf_new_const_rgb (const art_u8 *pixels,
int width,
int height,
int rowstride);
Creates a generic data structure for holding a buffer of RGB
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
No action is taken when the ArtPixBuf is destroyed. Thus, this
function is useful when the pixel data is constant or statically
allocated.
ArtPixBuf* art_pixbuf_new_const_rgba (const art_u8 *pixels,
int width,
int height,
int rowstride);
Creates a generic data structure for holding a buffer of RGBA
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
No action is taken when the ArtPixBuf is destroyed. Thus, this
function is suitable when the pixel data is constant or statically
allocated.
ArtPixBuf* art_pixbuf_new_rgb_dnotify (art_u8 *pixels,
int width,
int height,
int rowstride,
void *dfunc_data,
ArtDestroyNotify dfunc);
Creates a generic data structure for holding a buffer of RGB
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
dfunc is called with dfunc_data and pixels as arguments when the
ArtPixBuf is destroyed. Using a destroy notification function
allows a wide range of memory management disciplines for the pixel
memory. A NULL value for dfunc is also allowed and means that no
special action will be taken on destruction.
ArtPixBuf* art_pixbuf_new_rgba_dnotify (art_u8 *pixels,
int width,
int height,
int rowstride,
void *dfunc_data,
ArtDestroyNotify dfunc);
Creates a generic data structure for holding a buffer of RGBA
pixels. It is possible to think of an ArtPixBuf as a
virtualization over specific pixel buffer formats.
dfunc is called with dfunc_data and pixels as arguments when the
ArtPixBuf is destroyed. Using a destroy notification function
allows a wide range of memory management disciplines for the pixel
memory. A NULL value for dfunc is also allowed and means that no
special action will be taken on destruction.