temp-buf

temp-buf

Synopsis

                    TempBuf;
TempBuf *           temp_buf_new                        (gint width,
                                                         gint height,
                                                         gint bytes,
                                                         gint x,
                                                         gint y,
                                                         const guchar *color);
TempBuf *           temp_buf_copy                       (TempBuf *src,
                                                         TempBuf *dest);
TempBuf *           temp_buf_resize                     (TempBuf *buf,
                                                         gint bytes,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);
TempBuf *           temp_buf_scale                      (TempBuf *buf,
                                                         gint width,
                                                         gint height);
TempBuf *           temp_buf_copy_area                  (TempBuf *src,
                                                         TempBuf *dest,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height,
                                                         gint dest_x,
                                                         gint dest_y);
void                temp_buf_demultiply                 (TempBuf *buf);
void                temp_buf_free                       (TempBuf *buf);
guchar *            temp_buf_get_data                   (const TempBuf *buf);
gsize               temp_buf_get_data_size              (TempBuf *buf);
guchar *            temp_buf_data_clear                 (TempBuf *buf);
gsize               temp_buf_get_memsize                (TempBuf *buf);
void                temp_buf_dump                       (TempBuf *buf,
                                                         const gchar *filename);

Description

Details

TempBuf

typedef struct {
  gint      bytes;      /*  number of bytes per pixel (1,2,3 or 4)         */
  gint      width;
  gint      height;
  gint      x, y;       /*  origin of data source                          */
  guchar   *data;       /*  The data buffer. Do never access this field
                            directly, use temp_buf_get_data() instead !!   */
} TempBuf;


temp_buf_new ()

TempBuf *           temp_buf_new                        (gint width,
                                                         gint height,
                                                         gint bytes,
                                                         gint x,
                                                         gint y,
                                                         const guchar *color);


temp_buf_copy ()

TempBuf *           temp_buf_copy                       (TempBuf *src,
                                                         TempBuf *dest);


temp_buf_resize ()

TempBuf *           temp_buf_resize                     (TempBuf *buf,
                                                         gint bytes,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);


temp_buf_scale ()

TempBuf *           temp_buf_scale                      (TempBuf *buf,
                                                         gint width,
                                                         gint height);


temp_buf_copy_area ()

TempBuf *           temp_buf_copy_area                  (TempBuf *src,
                                                         TempBuf *dest,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height,
                                                         gint dest_x,
                                                         gint dest_y);


temp_buf_demultiply ()

void                temp_buf_demultiply                 (TempBuf *buf);

Converts a TempBuf with pre-multiplied alpha to a 'normal' TempBuf.


temp_buf_free ()

void                temp_buf_free                       (TempBuf *buf);


temp_buf_get_data ()

guchar *            temp_buf_get_data                   (const TempBuf *buf);


temp_buf_get_data_size ()

gsize               temp_buf_get_data_size              (TempBuf *buf);


temp_buf_data_clear ()

guchar *            temp_buf_data_clear                 (TempBuf *buf);


temp_buf_get_memsize ()

gsize               temp_buf_get_memsize                (TempBuf *buf);


temp_buf_dump ()

void                temp_buf_dump                       (TempBuf *buf,
                                                         const gchar *filename);

Dumps a TempBuf to a raw RGB image that is easy to analyze, for example with GIMP.