diff options
Diffstat (limited to 'generic/Image.h')
-rw-r--r-- | generic/Image.h | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/generic/Image.h b/generic/Image.h index cd89278..b98619b 100644 --- a/generic/Image.h +++ b/generic/Image.h @@ -31,17 +31,45 @@ #define _Image_h +#include <libart_lgpl/libart.h> + #include "Types.h" typedef struct { + unsigned char *pixels; + int width; + int height; + int rowstride; +} BitmapBits; + + +typedef struct { XImage *pixels; XImage *mask; + BitmapBits *b_bits; int width; int height; struct _ImagePixmap *pixmaps; +#ifdef SHM + ArtPixBuf *pixbuf; +#endif } ImageBits; +typedef struct _SuckChar { + int width; + int bitmap_offset; +} SuckChar; + +typedef struct _SuckFont { + unsigned char *bitmap; + int width; + int height; + int ascent; + int descent; + SuckChar chars[256]; +} FontBitmap; + ImageBits * GetImageBits(ZnWindow /* win */, @@ -54,9 +82,48 @@ GetImagePixmap(ZnWindow /* win */, Pixmap *mask_pmap); void InvalidateImage(char */* image_name */); -XImage * +BitmapBits * GetBitmapMask(Display */* dpy */, Pixmap /* bitmap */); +#define GetBitmapPixel(bbits, x, y) (((bbits)->pixels[(y)*(bbits)->rowstride+((x)>>3)]<<((x)&7))&0x80) + +FontBitmap * +GetFontBitmap(ZnWindow win, + ZnFont font); + +void +rgb_text(art_u8 *dst, + int x0, int y0, int x1, int y1, int dst_rowstride, + char *text, int num_chars, int start_x, int start_y, + FontBitmap *fb, art_u32 rgba); +void +rgb_bitmap(art_u8 *dst, + int x0, int y0, int x1, int y1, int dst_rowstride, + art_u8 *src, int start_x, int start_y, + int src_width, int src_height, int src_rowstride, + art_u32 rgba); +void +rgb_image(art_u8 *dst, + int x0, int y0, int x1, int y1, int dst_rowstride, + ArtPixBuf *pixbuf, int start_x, int start_y, int alpha); +void +tile_svp_aa(const ArtSVP *svp, + int x0, int y0, int x1, int y1, + int tile_x, int tile_y, ArtPixBuf *tile, + art_u32 bg_color, art_u8 *buf, int rowstride); +void +tile_svp_alpha(const ArtSVP *svp, + int x0, int y0, int x1, int y1, + int tile_x, int tile_y, ArtPixBuf *tile, + art_u8 alpha, art_u8 *buf, int rowstride); + +#ifdef SHM +ArtPixBuf * +GetImagePixbuf(ZnWindow /* win */, + char */* image_name */, + ZnImage /* image */); +#endif + #endif /* _Image_h */ |