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 *);
36 typedef struct _i_img i_img;
38 /* used for palette indices in some internal code (which might be
41 typedef unsigned char i_palidx;
44 The types in here so far are:
46 doubly linked bucket list - pretty efficient
47 octtree - no idea about goodness
64 struct i_bitmap* btm_new(int xsize,int ysize);
65 void btm_destroy(struct i_bitmap *btm);
66 int btm_test(struct i_bitmap *btm,int x,int y);
67 void btm_set(struct i_bitmap *btm,int x,int y);
76 /* Stack/Linked list */
81 int fill; /* Number used in this link */
86 int multip; /* # of copies in a single chain */
87 int ssize; /* size of each small element */
88 int count; /* number of elements on the list */
94 struct llink *llink_new( struct llink* p,int size );
95 int llist_llink_push( struct llist *lst, struct llink *lnk, void *data );
99 struct llist *llist_new( int multip, int ssize );
100 void llist_destroy( struct llist *l );
101 void llist_push( struct llist *l, void *data );
102 void llist_dump( struct llist *l );
103 int llist_pop( struct llist *l,void *data );
115 struct octt *octt_new();
116 int octt_add(struct octt *ct,unsigned char r,unsigned char g,unsigned char b);
117 void octt_dump(struct octt *ct);
118 void octt_count(struct octt *ct,int *tot,int max,int *overflow);
119 void octt_delete(struct octt *ct);