1 | #ifndef RGB_STUFF_H |
---|
2 | #define RGB_STUFF_H |
---|
3 | |
---|
4 | #include <gdk/gdk.h> |
---|
5 | #include <gdk-pixbuf/gdk-pixbuf.h> |
---|
6 | #include <libart_lgpl/art_alphagamma.h> |
---|
7 | |
---|
8 | /* combine rgba onto the dest (given the dest has something in it already) */ |
---|
9 | void combine_rgb_rgba(guchar *dest, int dx, int dy, int dw, int dh, int drs, |
---|
10 | guchar *rgba, int rw, int rh, int rrs); |
---|
11 | /* tile an rgb onto dest */ |
---|
12 | void tile_rgb(guchar *dest, int dw, int dh, int offx, int offy, int drs, |
---|
13 | guchar *tile, int w, int h, int rowstride, int has_alpha); |
---|
14 | /* tile an GdkPixBuf onto an rgb buffer*/ |
---|
15 | void tile_rgb_pixbuf(guchar *dest, int dw, int dh, int offx, int offy, int drs, |
---|
16 | GdkPixbuf *pbuf, int scale_w, int scale_h, int rotate); |
---|
17 | |
---|
18 | #if 0 |
---|
19 | /* scale a w by h pixmap into a square of size 'size', optionally rerurn |
---|
20 | outw and outh */ |
---|
21 | void make_scale_affine(double affine[], int w, int h, int size, |
---|
22 | int *outw, int *outh); |
---|
23 | #endif |
---|
24 | |
---|
25 | GdkPixbuf * scale_pixbuf_to_square (GdkPixbuf *pb, int size, int *outw, int *outh, GdkInterpType interp); |
---|
26 | |
---|
27 | #if 0 |
---|
28 | void rgb_rotate270(guchar *dest, int drs, guchar *src, int w, int h, int srs); |
---|
29 | void rgba_rotate270(guchar *dest, int drs, guchar *src, int w, int h, int srs); |
---|
30 | #endif |
---|
31 | |
---|
32 | /* A little function to help me with the right _affine call */ |
---|
33 | void transform_pixbuf(guchar *dst, int x0, int y0, int x1, int y1, int drs, |
---|
34 | GdkPixbuf *pixbuf, double affine[6], |
---|
35 | int level, ArtAlphaGamma *ag); |
---|
36 | |
---|
37 | #endif /* RGB_STUFF_H */ |
---|