From 7f9f3a57253c691fb78e5e7b2ad722bb8b0b21e1 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 12 Oct 2001 07:45:30 +0000 Subject: Suppression de LIBART et modification des structures pour accomoder GL. --- generic/Image.h | 96 +++++++++++++++------------------------------------------ 1 file changed, 25 insertions(+), 71 deletions(-) (limited to 'generic/Image.h') diff --git a/generic/Image.h b/generic/Image.h index 415d4d5..caa5443 100644 --- a/generic/Image.h +++ b/generic/Image.h @@ -30,55 +30,41 @@ #ifndef _Image_h #define _Image_h -#ifdef LIBART -#include -#endif #ifdef GLX #include +#include "Draw.h" #endif #include "Types.h" typedef struct { - unsigned char *pixels; +#ifdef GLX + unsigned char *t_bits; /* Should be kept in sync with same part of */ + GLuint texture; /* ImageBits */ + ZnReal t; + ZnReal s; +#endif int width; int height; + unsigned char *pixels; int rowstride; } BitmapBits; -typedef struct { - XImage *pixels; - XImage *mask; - BitmapBits *b_bits; - int width; - int height; - struct _ImagePixmap *pixmaps; -#ifdef LIBART - ArtPixBuf *pixbuf; -#endif +typedef struct _ImageBits { #ifdef GLX - unsigned char *i_bits; - GLuint texture; - ZnReal t; - ZnReal s; + unsigned char *t_bits; /* Should be kept in sync with same part of */ + GLuint texture; /* BitmapBits */ + ZnReal t; + ZnReal s; #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; - + XImage *pixels; + XImage *mask; + BitmapBits *b_bits; + struct _ImagePixmap *pixmaps; +} ImageBits; ImageBits * GetImageBits(ZnWindow /* win */, @@ -97,50 +83,18 @@ GetBitmapMask(Display */* dpy */, #define GetBitmapPixel(bbits, x, y) (((bbits)->pixels[(y)*(bbits)->rowstride+((x)>>3)]<<((x)&7))&0x80) -FontBitmap * -GetFontBitmap(ZnWindow win, - ZnFont font); - -#ifdef LIBART -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); -#endif - -#ifdef LIBART -ArtPixBuf * -GetImagePixbuf(ZnWindow /* win */, - char */* image_name */, - ZnImage /* image */); -#endif - #ifdef GLX +TexFont * +GetTexFont(ZnWindow /* win */, + ZnFont /* font */); + ImageBits * GetImageTexture(ZnWindow /* win */, char */* image_name */, ZnImage /* image */); +BitmapBits * +GetBitmapTexture(Display */* dpy */, + Pixmap /* bitmap */); #endif #endif /* _Image_h */ -- cgit v1.1