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")]
262 public struct FramerateManager {
263 [CCode (cname="SDL_initFramerate")]
266 [CCode (cname="SDL_setFramerate")]
267 public int set_rate(int rate);
269 [CCode (cname="SDL_getFramerate")]
270 public int get_rate();
272 [CCode (cname="SDL_framerateDelay")]
276 [CCode (cheader_filename="SDL_imageFilter.h")]
278 public class Filter {
279 [CCode (cname="SDL_imageFilterMMXdetect")]
280 public static int have_mmx();
282 [CCode (cname="SDL_imageFilterMMXon")]
283 public static void enable_mmx();
285 [CCode (cname="SDL_imageFilterMMXoff")]
286 public static void disable_mmx();
288 [CCode (cname="SDL_imageFilterAdd")]
289 public static int add([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
291 [CCode (cname="SDL_imageFilterMean")]
292 public static int mean([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
294 [CCode (cname="SDL_imageFilterSub")]
295 public static int subtract([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
297 [CCode (cname="SDL_imageFilterAbsDiff")]
298 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);
300 [CCode (cname="SDL_imageFilterMult")]
301 public static int multiply([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
303 [CCode (cname="SDL_imageFilterMultNor")]
304 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);
306 [CCode (cname="SDL_imageFilterMultDivby2")]
307 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);
309 [CCode (cname="SDL_imageFilterMultDivby4")]
310 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);
312 [CCode (cname="SDL_imageFilterBitAnd")]
313 public static int and([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
315 [CCode (cname="SDL_imageFilterBitOr")]
316 public static int or([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
318 [CCode (cname="SDL_imageFilterDiv")]
319 public static int divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
321 [CCode (cname="SDL_imageFilterBitNegation")]
322 public static int negate([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length);
324 [CCode (cname="SDL_imageFilterAddByte")]
325 public static int add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
327 [CCode (cname="SDL_imageFilterAddUint")]
328 public static int add_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint addend);
330 [CCode (cname="SDL_imageFilterAddByteToHalf")]
331 public static int halve_add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
333 [CCode (cname="SDL_imageFilterSubByte")]
334 public static int subtract_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar subtrahend);
336 [CCode (cname="SDL_imageFilterSubUint")]
337 public static int subtract_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint subtrahend);
339 [CCode (cname="SDL_imageFilterShiftRight")]
340 public static int shift_right_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
342 [CCode (cname="SDL_imageFilterShiftRightUint")]
343 public static int shift_right_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
345 [CCode (cname="SDL_imageFilterMultByByte")]
346 public static int multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar multiplicand);
348 [CCode (cname="SDL_imageFilterShiftRightAndMultByByte")]
349 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);
351 [CCode (cname="SDL_imageFilterShiftLeftByte")]
352 public static int shift_left_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
354 [CCode (cname="SDL_imageFilterShiftLeftUint")]
355 public static int shift_left_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
357 [CCode (cname="SDL_imageFilterBinarizeUsingThreshold")]
358 public static int binarize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar threshold);
360 [CCode (cname="SDL_imageFilterClipToRange")]
361 public static int clip([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar min, uchar max);
363 [CCode (cname="SDL_imageFilterNormalize")]
364 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);
366 [CCode (cname="SDL_imageFilterConvolveKernel3x3Divide")]
367 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);
369 [CCode (cname="SDL_imageFilterConvolveKernel5x5Divide")]
370 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);
372 [CCode (cname="SDL_imageFilterConvolveKernel7x7Divide")]
373 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);
375 [CCode (cname="SDL_imageFilterConvolveKernel9x9Divide")]
376 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);
378 [CCode (cname="SDL_imageFilterConvolveKernel3x3ShiftRight")]
379 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);
381 [CCode (cname="SDL_imageFilterConvolveKernel5x5ShiftRight")]
382 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);
384 [CCode (cname="SDL_imageFilterConvolveKernel7x7ShiftRight")]
385 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);
387 [CCode (cname="SDL_imageFilterConvolveKernel9x9ShiftRight")]
388 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);
390 [CCode (cname="SDL_imageFilterSobelX")]
391 public static int sobel([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns);
393 [CCode (cname="SDL_imageFilterSobelXShiftRight")]
394 public static int sobel_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, uchar shiftcount);