Details
ArtDestroyNotify ()
void (*ArtDestroyNotify) (void *func_data,
void *data); |
struct ArtPixBuf
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;
}; |
enum ArtPixFormat
typedef enum {
ART_PIX_RGB
/* gray, cmyk, lab, ... ? */
} ArtPixFormat; |
art_pixbuf_new_rgb ()
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().
art_pixbuf_new_rgba ()
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().
art_pixbuf_new_const_rgb ()
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.
art_pixbuf_new_const_rgba ()
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.
art_pixbuf_new_rgb_dnotify ()
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.
art_pixbuf_new_rgba_dnotify ()
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.
art_pixbuf_free ()
Destroys the ArtPixBuf, calling the destroy notification function
(if non-NULL) so that the memory for the pixel buffer can be
properly reclaimed.
art_pixbuf_free_shallow ()
void art_pixbuf_free_shallow (ArtPixBuf *pixbuf); |
Destroys the ArtPixBuf without calling the destroy notification function.
This function is deprecated. Use the _dnotify variants for
allocation instead.
art_pixbuf_duplicate ()
Duplicates a pixbuf, including duplicating the buffer.