1 namespace SDLGraphics {
2 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
5 [CCode (cname="pixelColor")]
6 public static int color(SDL.Surface dst, int16 x, int16 y, uint32 color);
8 [CCode (cname="pixelRGBA")]
9 public static int rgba(SDL.Surface dst, int16 x, int16 y,
10 uchar r, uchar g, uchar b, uchar a);
13 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
16 [CCode (cname="hlineColor")]
17 public static int color_h(SDL.Surface dst, int16 x1, int16 x2,
18 int16 y, uint32 color);
20 [CCode (cname="hlineRGBA")]
21 public static int rgba_h(SDL.Surface dst, int16 x1, int16 x2,
22 int16 y, uchar r, uchar g, uchar b, uchar a);
24 [CCode (cname="vlineColor")]
25 public static int color_v(SDL.Surface dst, int16 x, int16 y1,
26 int16 y2, uint32 color);
28 [CCode (cname="vlineRGBA")]
29 public static int rgba_v(SDL.Surface dst, int16 x, int16 y1,
30 int16 y2, uchar r, uchar g, uchar b, uchar a);
32 [CCode (cname="lineColor")]
33 public static int color(SDL.Surface dst, int16 x1, int16 y1,
34 int16 x2, int16 y2, uint32 color);
36 [CCode (cname="lineRGBA")]
37 public static int rgba(SDL.Surface dst, int16 x1, int16 y1,
38 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
40 [CCode (cname="aalineColor")]
41 public static int color_aa(SDL.Surface dst, int16 x1, int16 y1,
42 int16 x2, int16 y2, uint32 color);
44 [CCode (cname="aalineRGBA")]
45 public static int rgba_aa(SDL.Surface dst, int16 x1, int16 y1,
46 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
49 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
51 public class Rectangle {
52 [CCode (cname="rectangleColor")]
53 public static int outline_color(SDL.Surface dst, int16 x1, int16 y1,
54 int16 x2, int16 y2, uint32 color);
56 [CCode (cname="rectangleRGBA")]
57 public static int outline_rgba(SDL.Surface dst, int16 x1, int16 y1,
58 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
60 [CCode (cname="boxColor")]
61 public static int fill_color(SDL.Surface dst, int16 x1, int16 y1,
62 int16 x2, int16 y2, uint32 color);
64 [CCode (cname="boxRGBA")]
65 public static int fill_rgba(SDL.Surface dst, int16 x1, int16 y1,
66 int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
69 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
72 [CCode (cname="circleColor")]
73 public static int outline_color(SDL.Surface dst, int16 x, int16 y,
74 int16 radius, uint32 color);
76 [CCode (cname="circleRGBA")]
77 public static int outline_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
78 uchar r, uchar g, uchar b, uchar a);
80 [CCode (cname="aacircleColor")]
81 public static int outline_color_aa(SDL.Surface dst, int16 x, int16 y,
82 int16 radius, uint32 color);
84 [CCode (cname="aacircleRGBA")]
85 public static int outline_rgba_aa(SDL.Surface dst, int16 x, int16 y, int16 radius,
86 uchar r, uchar g, uchar b, uchar a);
88 [CCode (cname="filledCircleColor")]
89 public static int fill_color(SDL.Surface dst, int16 x, int16 y,
90 int16 radius, uint32 color);
92 [CCode (cname="filledCircleRGBA")]
93 public static int fill_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
94 uchar r, uchar g, uchar b, uchar a);
97 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
99 public class Ellipse {
100 [CCode (cname="ellipseColor")]
101 public static int outline_color(SDL.Surface dst, int16 xc, int16 yc,
102 int16 rx, int16 ry, uint32 color);
104 [CCode (cname="ellipseRGBA")]
105 public static int outline_rgba(SDL.Surface dst, int16 xc, int16 yc,
106 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
108 [CCode (cname="aaellipseColor")]
109 public static int outline_color_aa(SDL.Surface dst, int16 xc, int16 yc,
110 int16 rx, int16 ry, uint32 color);
112 [CCode (cname="aaellipseRGBA")]
113 public static int outline_rgba_aa(SDL.Surface dst, int16 xc, int16 yc,
114 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
116 [CCode (cname="filledEllipseColor")]
117 public static int fill_color(SDL.Surface dst, int16 xc, int16 yc,
118 int16 rx, int16 ry, uint32 color);
120 [CCode (cname="filledEllipseRGBA")]
121 public static int fill_rgba(SDL.Surface dst, int16 xc, int16 yc,
122 int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
125 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
128 [CCode (cname="pieColor")]
129 public static int outline_color(SDL.Surface dst, int16 x, int16 y, int16 radius,
130 int16 start, int16 end, uint32 color);
132 [CCode (cname="pieRGBA")]
133 public static int outline_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
134 int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
136 [CCode (cname="filledPieColor")]
137 public static int fill_color(SDL.Surface dst, int16 x, int16 y, int16 radius,
138 int16 start, int16 end, uint32 color);
140 [CCode (cname="filledPieRGBA")]
141 public static int fill_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
142 int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
145 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
147 public class Trigon {
148 [CCode (cname="trigonColor")]
149 public static int outline_color(SDL.Surface dst, int16 x1, int16 y1,
150 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
152 [CCode (cname="trigonRGBA")]
153 public static int outline_rgba(SDL.Surface dst, int16 x1, int16 y1,
154 int16 x2, int16 y2, int16 x3, int16 y3,
155 uchar r, uchar g, uchar b, uchar a);
157 [CCode (cname="aatrigonColor")]
158 public static int outline_color_aa(SDL.Surface dst, int16 x1, int16 y1,
159 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
161 [CCode (cname="aatrigonRGBA")]
162 public static int outline_rgba_aa(SDL.Surface dst, int16 x1, int16 y1,
163 int16 x2, int16 y2, int16 x3, int16 y3,
164 uchar r, uchar g, uchar b, uchar a);
166 [CCode (cname="filledTrigonColor")]
167 public static int fill_color(SDL.Surface dst, int16 x1, int16 y1,
168 int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
170 [CCode (cname="filledTrigonRGBA")]
171 public static int fill_rgba(SDL.Surface dst, int16 x1, int16 y1,
172 int16 x2, int16 y2, int16 x3, int16 y3,
173 uchar r, uchar g, uchar b, uchar a);
176 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
178 public class Polygon {
179 [CCode (cname="polygonColor")]
180 public static int outline_color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
181 int n, uint32 color);
183 [CCode (cname="polygonRGBA")]
184 public static int outline_rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
185 int n, uchar r, uchar g, uchar b, uchar a);
187 [CCode (cname="aapolygonColor")]
188 public static int outline_color_aa(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
189 int n, uint32 color);
191 [CCode (cname="aapolygonRGBA")]
192 public static int outline_rgba_aa(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
193 int n, uchar r, uchar g, uchar b, uchar a);
195 [CCode (cname="filledPolygonColor")]
196 public static int fill_color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
197 int n, uint32 color);
199 [CCode (cname="filledPolygonRGBA")]
200 public static int fill_rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
201 int n, uchar r, uchar g, uchar b, uchar a);
204 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
206 public class BezierCurve {
207 [CCode (cname="bezierColor")]
208 public static int color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
209 int vertices, int steps, uint32 color);
211 [CCode (cname="bezierRGBA")]
212 public static int rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
213 int vertices, int steps, uchar r, uchar g, uchar b, uchar a);
216 [CCode (cheader_filename="SDL_gfxPrimitives.h")]
219 [CCode (cname="stringColor")]
220 public static int color(SDL.Surface dst, int16 x, int16 y, string s, uint32 color);
222 [CCode (cname="stringRGBA")]
223 public static int rgba(SDL.Surface dst, int16 x, int16 y, string s,
224 uchar r, uchar g, uchar b, uchar a);
226 [CCode (cname="gfxPrimitivesSetFont")]
227 public static int set_font(void* fontdata, int cw, int ch);
230 [CCode (cheader_filename="SDL_rotozoom.h")]
232 public class RotoZoom {
233 [CCode (cname="rotozoomSurface")]
234 public static SDL.Surface rotozoom(SDL.Surface src, double degrees,
235 double zoom, int smooth);
237 [CCode (cname="rotozoomSurfaceXY")]
238 public static SDL.Surface rotozoom_xy(SDL.Surface src, double degrees,
239 double zoomx, double zoomy, int smooth);
241 [CCode (cname="rotozoomSurfaceSize")]
242 public static void rotozoom_size(int width, int height, double degrees,
243 double zoom, ref int dstwidth, ref int dstheight);
245 [CCode (cname="rotozoomSurfaceSizeXY")]
246 public static void rotozoom_size_xy(int width, int height, double degrees,
247 double zoomx, double zoomy, ref int dstwidth, ref int dstheight);
249 [CCode (cname="zoomSurface")]
250 public static SDL.Surface zoom(SDL.Surface src, double zoomx,
251 double zoomy, int smooth);
253 [CCode (cname="zoomSurfaceSize")]
254 public static void zoom_size(int width, int height, double zoomx,
255 double zoomy, ref int dstwidth, ref int dstheight);
258 [CCode (cheader_filename="SDL_framerate.h", cname="FPSmanager", free_function="g_free")]
259 public struct FramerateManager {
260 [CCode (cname="SDL_initFramerate")]
263 [CCode (cname="SDL_setFramerate")]
264 public int set_rate(int rate);
266 [CCode (cname="SDL_getFramerate")]
267 public int get_rate();
269 [CCode (cname="SDL_framerateDelay")]
273 [CCode (cheader_filename="SDL_imageFilter.h")]
275 public class Filter {
276 [CCode (cname="SDL_imageFilterMMXdetect")]
277 public static int have_mmx();
279 [CCode (cname="SDL_imageFilterMMXon")]
280 public static void enable_mmx();
282 [CCode (cname="SDL_imageFilterMMXoff")]
283 public static void disable_mmx();
285 [CCode (cname="SDL_imageFilterAdd")]
286 public static int add([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
288 [CCode (cname="SDL_imageFilterMean")]
289 public static int mean([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
291 [CCode (cname="SDL_imageFilterSub")]
292 public static int subtract([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
294 [CCode (cname="SDL_imageFilterAbsDiff")]
295 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);
297 [CCode (cname="SDL_imageFilterMult")]
298 public static int multiply([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
300 [CCode (cname="SDL_imageFilterMultNor")]
301 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);
303 [CCode (cname="SDL_imageFilterMultDivby2")]
304 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);
306 [CCode (cname="SDL_imageFilterMultDivby4")]
307 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);
309 [CCode (cname="SDL_imageFilterBitAnd")]
310 public static int and([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
312 [CCode (cname="SDL_imageFilterBitOr")]
313 public static int or([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
315 [CCode (cname="SDL_imageFilterDiv")]
316 public static int divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
318 [CCode (cname="SDL_imageFilterBitNegation")]
319 public static int negate([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length);
321 [CCode (cname="SDL_imageFilterAddByte")]
322 public static int add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
324 [CCode (cname="SDL_imageFilterAddUint")]
325 public static int add_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint addend);
327 [CCode (cname="SDL_imageFilterAddByteToHalf")]
328 public static int halve_add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
330 [CCode (cname="SDL_imageFilterSubByte")]
331 public static int subtract_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar subtrahend);
333 [CCode (cname="SDL_imageFilterSubUint")]
334 public static int subtract_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint subtrahend);
336 [CCode (cname="SDL_imageFilterShiftRight")]
337 public static int shift_right_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
339 [CCode (cname="SDL_imageFilterShiftRightUint")]
340 public static int shift_right_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
342 [CCode (cname="SDL_imageFilterMultByByte")]
343 public static int multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar multiplicand);
345 [CCode (cname="SDL_imageFilterShiftRightAndMultByByte")]
346 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);
348 [CCode (cname="SDL_imageFilterShiftLeftByte")]
349 public static int shift_left_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
351 [CCode (cname="SDL_imageFilterShiftLeftUint")]
352 public static int shift_left_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
354 [CCode (cname="SDL_imageFilterBinarizeUsingThreshold")]
355 public static int binarize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar threshold);
357 [CCode (cname="SDL_imageFilterClipToRange")]
358 public static int clip([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar min, uchar max);
360 [CCode (cname="SDL_imageFilterNormalize")]
361 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);
363 [CCode (cname="SDL_imageFilterConvolveKernel3x3Divide")]
364 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);
366 [CCode (cname="SDL_imageFilterConvolveKernel5x5Divide")]
367 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);
369 [CCode (cname="SDL_imageFilterConvolveKernel7x7Divide")]
370 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);
372 [CCode (cname="SDL_imageFilterConvolveKernel9x9Divide")]
373 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);
375 [CCode (cname="SDL_imageFilterConvolveKernel3x3ShiftRight")]
376 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);
378 [CCode (cname="SDL_imageFilterConvolveKernel5x5ShiftRight")]
379 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);
381 [CCode (cname="SDL_imageFilterConvolveKernel7x7ShiftRight")]
382 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);
384 [CCode (cname="SDL_imageFilterConvolveKernel9x9ShiftRight")]
385 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);
387 [CCode (cname="SDL_imageFilterSobelX")]
388 public static int sobel([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns);
390 [CCode (cname="SDL_imageFilterSobelXShiftRight")]
391 public static int sobel_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, uchar shiftcount);