8 typedef struct { unsigned char gray_color; } gray_color;
9 typedef struct { unsigned char r,g,b; } rgb_color;
10 typedef struct { unsigned char r,g,b,a; } rgba_color;
11 typedef struct { unsigned char c,m,y,k; } cmyk_color;
13 typedef int undef_int; /* special value to put in typemaps to retun undef on 0 and 1 on 1 */
20 unsigned char channel[MAXCHANNELS];
27 int xsize,ysize,bytes;
31 int (*i_f_ppix) (struct _i_img *,int,int,i_color *);
32 int (*i_f_gpix) (struct _i_img *,int,int,i_color *);
33 int (*i_f_plin) (struct _i_img *,int l, int r, int y, i_color *);
34 int (*i_f_glin) (struct _i_img *,int l, int r, int y, i_color *);
38 typedef struct _i_img i_img;
40 /* used for palette indices in some internal code (which might be
43 typedef unsigned char i_palidx;
46 The types in here so far are:
48 doubly linked bucket list - pretty efficient
49 octtree - no idea about goodness
66 struct i_bitmap* btm_new(int xsize,int ysize);
67 void btm_destroy(struct i_bitmap *btm);
68 int btm_test(struct i_bitmap *btm,int x,int y);
69 void btm_set(struct i_bitmap *btm,int x,int y);
78 /* Stack/Linked list */
83 int fill; /* Number used in this link */
88 int multip; /* # of copies in a single chain */
89 int ssize; /* size of each small element */
90 int count; /* number of elements on the list */
96 struct llink *llink_new( struct llink* p,int size );
97 int llist_llink_push( struct llist *lst, struct llink *lnk, void *data );
101 struct llist *llist_new( int multip, int ssize );
102 void llist_destroy( struct llist *l );
103 void llist_push( struct llist *l, void *data );
104 void llist_dump( struct llist *l );
105 int llist_pop( struct llist *l,void *data );
117 struct octt *octt_new();
118 int octt_add(struct octt *ct,unsigned char r,unsigned char g,unsigned char b);
119 void octt_dump(struct octt *ct);
120 void octt_count(struct octt *ct,int *tot,int max,int *overflow);
121 void octt_delete(struct octt *ct);