4 namespace SDLGraphics {
5 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
8 [CCode (cname="pixelColor")]
9 public static int color(Surface dst, int16 x, int16 y, uint32 color);
11 [CCode (cname="pixelRGBA")]
12 public static int rgba(Surface dst, int16 x, int16 y,
13 uchar r, uchar g, uchar b, uchar a);
16 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
19 [CCode (cname="hlineColor")]
20 public static int color_h(Surface dst, int16 x1, int16 x2,
21 int16 y, uint32 color);
23 [CCode (cname="hlineRGBA")]
24 public static int rgba_h(Surface dst, int16 x1, int16 x2,
25 int16 y, uchar r, uchar g, uchar b, uchar a);
27 [CCode (cname="vlineColor")]
28 public static int color_v(Surface dst, int16 x, int16 y1,
29 int16 y2, uint32 color);
31 [CCode (cname="vlineRGBA")]
32 public static int rgba_v(Surface dst, int16 x, int16 y1,
33 int16 y2, uchar r, uchar g, uchar b, uchar a);
35 [CCode (cname="lineColor")]
36 public static int color(Surface dst, int16 x1, int16 y1,
37 int16 x2, int16 y2, uint32 color);
39 [CCode (cname="lineRGBA")]
40 public static int rgba(Surface dst, int16 x1, int16 y1,
41 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
43 [CCode (cname="aalineColor")]
44 public static int color_aa(Surface dst, int16 x1, int16 y1,
45 int16 x2, int16 y2, uint32 color);
47 [CCode (cname="aalineRGBA")]
48 public static int rgba_aa(Surface dst, int16 x1, int16 y1,
49 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
52 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
54 public class Rectangle {
55 [CCode (cname="rectangleColor")]
56 public static int outline_color(Surface dst, int16 x1, int16 y1,
57 int16 x2, int16 y2, uint32 color);
59 [CCode (cname="rectangleRGBA")]
60 public static int outline_rgba(Surface dst, int16 x1, int16 y1,
61 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
63 [CCode (cname="boxColor")]
64 public static int fill_color(Surface dst, int16 x1, int16 y1,
65 int16 x2, int16 y2, uint32 color);
67 [CCode (cname="boxRGBA")]
68 public static int fill_rgba(Surface dst, int16 x1, int16 y1,
69 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
72 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
75 [CCode (cname="circleColor")]
76 public static int outline_color(Surface dst, int16 x, int16 y,
77 int16 radius, uint32 color);
79 [CCode (cname="circleRGBA")]
80 public static int outline_rgba(Surface dst, int16 x, int16 y, int16 radius,
81 uchar r, uchar g, uchar b, uchar a);
83 [CCode (cname="aacircleColor")]
84 public static int outline_color_aa(Surface dst, int16 x, int16 y,
85 int16 radius, uint32 color);
87 [CCode (cname="aacircleRGBA")]
88 public static int outline_rgba_aa(Surface dst, int16 x, int16 y, int16 radius,
89 uchar r, uchar g, uchar b, uchar a);
91 [CCode (cname="filledCircleColor")]
92 public static int fill_color(Surface dst, int16 x, int16 y,
93 int16 radius, uint32 color);
95 [CCode (cname="filledCircleRGBA")]
96 public static int fill_rgba(Surface dst, int16 x, int16 y, int16 radius,
97 uchar r, uchar g, uchar b, uchar a);
100 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
102 public class Ellipse {
103 [CCode (cname="ellipseColor")]
104 public static int outline_color(Surface dst, int16 xc, int16 yc,
105 int16 rx, int16 ry, uint32 color);
107 [CCode (cname="ellipseRGBA")]
108 public static int outline_rgba(Surface dst, int16 xc, int16 yc,
109 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
111 [CCode (cname="aaellipseColor")]
112 public static int outline_color_aa(Surface dst, int16 xc, int16 yc,
113 int16 rx, int16 ry, uint32 color);
115 [CCode (cname="aaellipseRGBA")]
116 public static int outline_rgba_aa(Surface dst, int16 xc, int16 yc,
117 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
119 [CCode (cname="filledEllipseColor")]
120 public static int fill_color(Surface dst, int16 xc, int16 yc,
121 int16 rx, int16 ry, uint32 color);
123 [CCode (cname="filledEllipseRGBA")]
124 public static int fill_rgba(Surface dst, int16 xc, int16 yc,
125 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
128 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
131 [CCode (cname="pieColor")]
132 public static int outline_color(Surface dst, int16 x, int16 y, int16 radius,
133 int16 start, int16 end, uint32 color);
135 [CCode (cname="pieRGBA")]
136 public static int outline_rgba(Surface dst, int16 x, int16 y, int16 radius,
137 int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
139 [CCode (cname="filledPieColor")]
140 public static int fill_color(Surface dst, int16 x, int16 y, int16 radius,
141 int16 start, int16 end, uint32 color);
143 [CCode (cname="filledPieRGBA")]
144 public static int fill_rgba(Surface dst, int16 x, int16 y, int16 radius,
145 int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
148 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
150 public class Trigon {
151 [CCode (cname="trigonColor")]
152 public static int outline_color(Surface dst, int16 x1, int16 y1,
153 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
155 [CCode (cname="trigonRGBA")]
156 public static int outline_rgba(Surface dst, int16 x1, int16 y1,
157 int16 x2, int16 y2, int16 x3, int16 y3,
158 uchar r, uchar g, uchar b, uchar a);
160 [CCode (cname="aatrigonColor")]
161 public static int outline_color_aa(Surface dst, int16 x1, int16 y1,
162 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
164 [CCode (cname="aatrigonRGBA")]
165 public static int outline_rgba_aa(Surface dst, int16 x1, int16 y1,
166 int16 x2, int16 y2, int16 x3, int16 y3,
167 uchar r, uchar g, uchar b, uchar a);
169 [CCode (cname="filledTrigonColor")]
170 public static int fill_color(Surface dst, int16 x1, int16 y1,
171 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
173 [CCode (cname="filledTrigonRGBA")]
174 public static int fill_rgba(Surface dst, int16 x1, int16 y1,
175 int16 x2, int16 y2, int16 x3, int16 y3,
176 uchar r, uchar g, uchar b, uchar a);
179 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
181 public class Polygon {
182 [CCode (cname="polygonColor")]
183 public static int outline_color(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
184 int n, uint32 color);
186 [CCode (cname="polygonRGBA")]
187 public static int outline_rgba(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
188 int n, uchar r, uchar g, uchar b, uchar a);
190 [CCode (cname="aapolygonColor")]
191 public static int outline_color_aa(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
192 int n, uint32 color);
194 [CCode (cname="aapolygonRGBA")]
195 public static int outline_rgba_aa(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
196 int n, uchar r, uchar g, uchar b, uchar a);
198 [CCode (cname="filledPolygonColor")]
199 public static int fill_color(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
200 int n, uint32 color);
202 [CCode (cname="filledPolygonRGBA")]
203 public static int fill_rgba(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
204 int n, uchar r, uchar g, uchar b, uchar a);
207 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
209 public class BezierCurve {
210 [CCode (cname="bezierColor")]
211 public static int color(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
212 int vertices, int steps, uint32 color);
214 [CCode (cname="bezierRGBA")]
215 public static int rgba(Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
216 int vertices, int steps, uchar r, uchar g, uchar b, uchar a);
219 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
222 [CCode (cname="stringColor")]
223 public static int color(Surface dst, int16 x, int16 y, string s, uint32 color);
225 [CCode (cname="stringRGBA")]
226 public static int rgba(Surface dst, int16 x, int16 y, string s,
227 uchar r, uchar g, uchar b, uchar a);
229 [CCode (cname="gfxPrimitivesSetFont")]
230 public static int set_font(void* fontdata, int cw, int ch);
233 [CCode (cheader_filename="SDL_rotozoom.h")]
235 public class RotoZoom {
236 [CCode (cname="rotozoomSurface")]
237 public static Surface rotozoom(Surface src, double degrees,
238 double zoom, int smooth);
240 [CCode (cname="rotozoomSurfaceXY")]
241 public static Surface rotozoom_xy(Surface src, double degrees,
242 double zoomx, double zoomy, int smooth);
244 [CCode (cname="rotozoomSurfaceSize")]
245 public static void rotozoom_size(int width, int height, double degrees,
246 double zoom, ref int dstwidth, ref int dstheight);
248 [CCode (cname="rotozoomSurfaceSizeXY")]
249 public static void rotozoom_size_xy(int width, int height, double degrees,
250 double zoomx, double zoomy, ref int dstwidth, ref int dstheight);
252 [CCode (cname="zoomSurface")]
253 public static Surface zoom(Surface src, double zoomx,
254 double zoomy, int smooth);
256 [CCode (cname="zoomSurfaceSize")]
257 public static void zoom_size(int width, int height, double zoomx,
258 double zoomy, ref int dstwidth, ref int dstheight);
261 [CCode (cheader_filename="SDL_framerate.h", cname="FPSmanager", free_function="g_free")]
263 public class FramerateManager {
264 [CCode (cname="SDL_initFramerate")]
267 [CCode (cname="SDL_setFramerate")]
268 public int set_rate(int rate);
270 [CCode (cname="SDL_getFramerate")]
271 public int get_rate();
273 [CCode (cname="SDL_framerateDelay")]
277 [CCode (cheader_filename="SDL_imageFilter.h")]
279 public class Filter {
280 [CCode (cname="SDL_imageFilterMMXdetect")]
281 public static int have_mmx();
283 [CCode (cname="SDL_imageFilterMMXon")]
284 public static void enable_mmx();
286 [CCode (cname="SDL_imageFilterMMXoff")]
287 public static void disable_mmx();
289 [CCode (cname="SDL_imageFilterAdd")]
290 public static int add([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
292 [CCode (cname="SDL_imageFilterMean")]
293 public static int mean([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
295 [CCode (cname="SDL_imageFilterSub")]
296 public static int subtract([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
298 [CCode (cname="SDL_imageFilterAbsDiff")]
299 public static int absolute_difference([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
301 [CCode (cname="SDL_imageFilterMult")]
302 public static int multiply([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
304 [CCode (cname="SDL_imageFilterMultNor")]
305 public static int multiply_normalized([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
307 [CCode (cname="SDL_imageFilterMultDivby2")]
308 public static int multiply_half([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
310 [CCode (cname="SDL_imageFilterMultDivby4")]
311 public static int multiply_quarter([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
313 [CCode (cname="SDL_imageFilterBitAnd")]
314 public static int and([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
316 [CCode (cname="SDL_imageFilterBitOr")]
317 public static int or([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
319 [CCode (cname="SDL_imageFilterDiv")]
320 public static int divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
322 [CCode (cname="SDL_imageFilterBitNegation")]
323 public static int negate([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length);
325 [CCode (cname="SDL_imageFilterAddByte")]
326 public static int add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
328 [CCode (cname="SDL_imageFilterAddUint")]
329 public static int add_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint addend);
331 [CCode (cname="SDL_imageFilterAddByteToHalf")]
332 public static int halve_add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
334 [CCode (cname="SDL_imageFilterSubByte")]
335 public static int subtract_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar subtrahend);
337 [CCode (cname="SDL_imageFilterSubUint")]
338 public static int subtract_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint subtrahend);
340 [CCode (cname="SDL_imageFilterShiftRight")]
341 public static int shift_right_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
343 [CCode (cname="SDL_imageFilterShiftRightUint")]
344 public static int shift_right_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
346 [CCode (cname="SDL_imageFilterMultByByte")]
347 public static int multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar multiplicand);
349 [CCode (cname="SDL_imageFilterShiftRightAndMultByByte")]
350 public static int shift_right_multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount, uchar multiplicand);
352 [CCode (cname="SDL_imageFilterShiftLeftByte")]
353 public static int shift_left_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
355 [CCode (cname="SDL_imageFilterShiftLeftUint")]
356 public static int shift_left_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
358 [CCode (cname="SDL_imageFilterBinarizeUsingThreshold")]
359 public static int binarize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar threshold);
361 [CCode (cname="SDL_imageFilterClipToRange")]
362 public static int clip([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar min, uchar max);
364 [CCode (cname="SDL_imageFilterNormalize")]
365 public static int normalize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, int cmin, int cmax, int nmin, int nmax);
367 [CCode (cname="SDL_imageFilterConvolveKernel3x3Divide")]
368 public static int convolve_3x3_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
370 [CCode (cname="SDL_imageFilterConvolveKernel5x5Divide")]
371 public static int convolve_5x5_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
373 [CCode (cname="SDL_imageFilterConvolveKernel7x7Divide")]
374 public static int convolve_7x7_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
376 [CCode (cname="SDL_imageFilterConvolveKernel9x9Divide")]
377 public static int convolve_9x9_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
379 [CCode (cname="SDL_imageFilterConvolveKernel3x3ShiftRight")]
380 public static int convolve_3x3_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
382 [CCode (cname="SDL_imageFilterConvolveKernel5x5ShiftRight")]
383 public static int convolve_5x5_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
385 [CCode (cname="SDL_imageFilterConvolveKernel7x7ShiftRight")]
386 public static int convolve_7x7_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
388 [CCode (cname="SDL_imageFilterConvolveKernel9x9ShiftRight")]
389 public static int convolve_9x9_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
391 [CCode (cname="SDL_imageFilterSobelX")]
392 public static int sobel([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns);
394 [CCode (cname="SDL_imageFilterSobelXShiftRight")]
395 public static int sobel_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, uchar shiftcount);