aboutsummaryrefslogtreecommitdiff
path: root/generic/Image.h
diff options
context:
space:
mode:
authorlecoanet2000-11-13 10:18:37 +0000
committerlecoanet2000-11-13 10:18:37 +0000
commitf6d11427d9397eb78993099c1faf9c12cbbbb50b (patch)
tree347a02466f13690b58185f60169088d8ab870e7b /generic/Image.h
parentc914a00fb8b2257cc827d1d0b41ce5ee496b9289 (diff)
downloadtkzinc-f6d11427d9397eb78993099c1faf9c12cbbbb50b.zip
tkzinc-f6d11427d9397eb78993099c1faf9c12cbbbb50b.tar.gz
tkzinc-f6d11427d9397eb78993099c1faf9c12cbbbb50b.tar.bz2
tkzinc-f6d11427d9397eb78993099c1faf9c12cbbbb50b.tar.xz
Ajout de routines pour le rendu local
Diffstat (limited to 'generic/Image.h')
-rw-r--r--generic/Image.h69
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 */