1 //
2 // aegis - project change supervisor
3 // Copyright (C) 1997, 2002-2006, 2008, 2012 Peter Miller
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or (at
8 // your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBAEGIS_GIF_H
20 #define LIBAEGIS_GIF_H
21 
22 enum gif_mode_ty
23 {
24     gif_mode_rdonly,
25     gif_mode_rdwr
26 };
27 
28 struct gif_ty
29 {
30     char            *fn;
31     int             width;
32     int             height;
33     unsigned char   colormap[256][3];
34     unsigned char   *image_flat;
35     unsigned char   **image;
36     gif_mode_ty     mode;
37     int             mime;
38 };
39 
40 gif_ty *gif_open(const char *path, int mode);
41 void gif_close(gif_ty *);
42 gif_ty *gif_create(const char *path, int size_x, int size_y);
43 void gif_rename(gif_ty *, const char *);
44 int gif_pixel_get(gif_ty *gp, int x, int y);
45 void gif_pixel_set(gif_ty *gp, int x, int y, int color);
46 void gif_colormap_get(gif_ty *, int, int *, int *, int *);
47 void gif_colormap_set(gif_ty *, int, int, int, int);
48 void gif_mime(gif_ty *);
49 
50 void gif_line(gif_ty *gp, int x1, int y1, int x2, int y2, int color);
51 void gif_rect(gif_ty *gp, int x1, int y1, int x2, int y2, int color);
52 void gif_text(gif_ty *gp, int x, int y, const char *text, int color);
53 
54 #endif // LIBAEGIS_GIF_H
55 // vim: set ts=8 sw=4 et :
56