Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 119 lines (104 sloc) 6.461 kb
92bda632 » Tony Cook
2006-01-10 - start of external Imager API access:
1 #ifndef IMAGER_IMEXTTYPES_H_
2 #define IMAGER_IMEXTTYPES_H_
3
4 /* keep this file simple - apidocs.perl parses it. */
5
6 #include "imdatatypes.h"
7
8 typedef struct {
9 void * (*f_mymalloc)(int size);
10 void (*f_myfree)(void *block);
11 void * (*f_myrealloc)(void *block, size_t newsize);
12
13 i_img *(*f_i_img_8_new)(int xsize, int ysize, int channels);
14 i_img *(*f_i_img_16_new)(int xsize, int ysize, int channels);
15 i_img *(*f_i_img_double_new)(int xsize, int ysize, int channels);
16 i_img *(*f_i_img_pal_new)(int xsize, int ysize, int channels, int maxpal);
17 void (*f_i_img_destroy)(i_img *im);
18 i_img *(*f_i_sametype)(i_img *im, int xsize, int ysize);
19 i_img *(*f_i_sametype_chans)(i_img *im, int xsize, int ysize, int channels);
20 void (*f_i_img_info)(i_img *im, int *info);
21
22 int (*f_i_ppix)(i_img *im, int x, int y, i_color *val);
23 int (*f_i_gpix)(i_img *im, int x, int y, i_color *val);
24 int (*f_i_ppixf)(i_img *im, int x, int y, i_fcolor *val);
25 int (*f_i_gpixf)(i_img *im, int x, int y, i_fcolor *val);
26 int (*f_i_plin)(i_img *im, int l, int r, int y, i_color *vals);
27 int (*f_i_glin)(i_img *im, int l, int r, int y, i_color *vals);
28 int (*f_i_plinf)(i_img *im, int l, int r, int y, i_fcolor *vals);
29 int (*f_i_glinf)(i_img *im, int l, int r, int y, i_fcolor *vals);
30 int (*f_i_gsamp)(i_img *im, int l, int r, int y, i_sample_t *samp,
31 const int *chans, int chan_count);
32 int (*f_i_gsampf)(i_img *im, int l, int r, int y, i_fsample_t *samp,
33 const int *chans, int chan_count);
34 int (*f_i_gpal)(i_img *im, int x, int r, int y, i_palidx *vals);
35 int (*f_i_ppal)(i_img *im, int x, int r, int y, i_palidx *vals);
36 int (*f_i_addcolors)(i_img *im, i_color *colors, int count);
37 int (*f_i_getcolors)(i_img *im, int i, i_color *, int count);
38 int (*f_i_colorcount)(i_img *im);
39 int (*f_i_maxcolors)(i_img *im);
40 int (*f_i_findcolor)(i_img *im, i_color *color, i_palidx *entry);
41 int (*f_i_setcolors)(i_img *im, int index, i_color *colors,
42 int count);
43
44 i_fill_t *(*f_i_new_fill_solid)(i_color *c, int combine);
45 i_fill_t *(*f_i_new_fill_solidf)(i_fcolor *c, int combine);
46
47 i_fill_t *(*f_i_new_fill_hatch)(i_color *fg, i_color *bg, int combine,
48 int hatch, unsigned char *cust_hatch,
49 int dx, int dy);
50 i_fill_t *(*f_i_new_fill_hatchf)(i_fcolor *fg, i_fcolor *bg, int combine,
51 int hatch, unsigned char *cust_hatch,
52 int dx, int dy);
53 i_fill_t *(*f_i_new_fill_image)(i_img *im, double *matrix, int xoff,
54 int yoff, int combine);
55 i_fill_t *(*f_i_new_fill_fount)(double xa, double ya, double xb, double yb,
56 i_fountain_type type, i_fountain_repeat repeat,
57 int combine, int super_sample, double ssample_param,
58 int count, i_fountain_seg *segs);
59
60 void (*f_i_fill_destroy)(i_fill_t *fill);
61
62 void (*f_i_quant_makemap)(i_quantize *quant, i_img **imgs, int count);
63 i_palidx * (*f_i_quant_translate)(i_quantize *quant, i_img *img);
64 void (*f_i_quant_transparent)(i_quantize *quant, i_palidx *indices,
65 i_img *img, i_palidx trans_index);
66
67 void (*f_i_clear_error)(void);
68 void (*f_i_push_error)(int code, char const *msg);
69 void (*f_i_push_errorf)(int code, char const *fmt, ...);
70 void (*f_i_push_errorvf)(int code, char const *fmt, va_list);
71
72 void (*f_i_tags_new)(i_img_tags *tags);
73 int (*f_i_tags_set)(i_img_tags *tags, char const *name, char const *data,
74 int size);
75 int (*f_i_tags_setn)(i_img_tags *tags, char const *name, int idata);
76 void (*f_i_tags_destroy)(i_img_tags *tags);
77 int (*f_i_tags_find)(i_img_tags *tags, char const *name, int start,
78 int *entry);
79 int (*f_i_tags_findn)(i_img_tags *tags, int code, int start, int *entry);
80 int (*f_i_tags_delete)(i_img_tags *tags, int entry);
81 int (*f_i_tags_delbyname)(i_img_tags *tags, char const *name);
82 int (*f_i_tags_delbycode)(i_img_tags *tags, int code);
83 int (*f_i_tags_get_float)(i_img_tags *tags, char const *name, int code,
84 double *value);
85 int (*f_i_tags_set_float)(i_img_tags *tags, char const *name, int code,
86 double value);
87 int (*f_i_tags_set_float2)(i_img_tags *tags, char const *name, int code,
88 double value, int places);
89 int (*f_i_tags_get_int)(i_img_tags *tags, char const *name, int code,
90 int *value);
91 int (*f_i_tags_get_string)(i_img_tags *tags, char const *name, int code,
92 char *value, size_t value_size);
93 int (*f_i_tags_get_color)(i_img_tags *tags, char const *name, int code,
94 i_color *value);
95 int (*f_i_tags_set_color)(i_img_tags *tags, char const *name, int code,
96 i_color const *value);
97
98 void (*f_i_box)(i_img *im, int x1, int y1, int x2, int y2, i_color *val);
99 void (*f_i_box_filled)(i_img *im, int x1, int y1, int x2, int y2, i_color *val);
100 void (*f_i_box_cfill)(i_img *im, int x1, int y1, int x2, int y2, i_fill_t *fill);
101 void (*f_i_line)(i_img *im, int x1, int y1, int x2, int y2, i_color *val, int endp);
102 void (*f_i_line_aa)(i_img *im, int x1, int y1, int x2, int y2, i_color *val, int endp);
103 void (*f_i_arc)(i_img *im, int x, int y, float rad, float d1, float d2, i_color *val);
104 void (*f_i_arc_aa)(i_img *im, double x, double y, double rad, double d1, double d2, i_color *val);
105 void (*f_i_arc_cfill)(i_img *im, int x, int y, float rad, float d1, float d2, i_fill_t *val);
106 void (*f_i_arc_aa_cfill)(i_img *im, double x, double y, double rad, double d1, double d2, i_fill_t *fill);
107 void (*f_i_circle_aa)(i_img *im, float x, float y, float rad, i_color *val);
108 int (*f_i_flood_fill)(i_img *im, int seedx, int seedy, i_color *dcol);
109 int (*f_i_flood_cfill)(i_img *im, int seedx, int seedy, i_fill_t *fill);
110
111 void (*f_i_copyto)(i_img *im, i_img *src, int x1, int y1, int x2, int y2, int tx, int ty);
112 void (*f_i_copyto_trans)(i_img *im, i_img *src, int x1, int y1, int x2, int y2, int tx, int ty, i_color *trans);
113 i_img *(*f_i_copy)(i_img *im);
114 int (*f_i_rubthru)(i_img *im, i_img *src, int tx, int ty, int src_minx, int src_miny, int src_maxx, int src_maxy);
115 } im_ext_funcs;
116
117 #define PERL_FUNCTION_TABLE_NAME "Imager::__ext_func_table"
118
119 #endif
Something went wrong with that request. Please try again.