1namespace SDLGraphics { 2 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 3 [Compact] 4 public class Pixel { 5 [CCode (cname="pixelColor")] 6 public static int color(SDL.Surface dst, int16 x, int16 y, uint32 color); 7 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); 11 }// Pixel 12 13 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 14 [Compact] 15 public class Line { 16 [CCode (cname="hlineColor")] 17 public static int color_h(SDL.Surface dst, int16 x1, int16 x2, 18 int16 y, uint32 color); 19 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); 23 24 [CCode (cname="vlineColor")] 25 public static int color_v(SDL.Surface dst, int16 x, int16 y1, 26 int16 y2, uint32 color); 27 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); 31 32 [CCode (cname="lineColor")] 33 public static int color(SDL.Surface dst, int16 x1, int16 y1, 34 int16 x2, int16 y2, uint32 color); 35 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); 39 40 [CCode (cname="aalineColor")] 41 public static int color_aa(SDL.Surface dst, int16 x1, int16 y1, 42 int16 x2, int16 y2, uint32 color); 43 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); 47 }// Line 48 49 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 50 [Compact] 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); 55 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); 59 60 [CCode (cname="boxColor")] 61 public static int fill_color(SDL.Surface dst, int16 x1, int16 y1, 62 int16 x2, int16 y2, uint32 color); 63 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); 67 }// Rectangle 68 69 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 70 [Compact] 71 public class Circle { 72 [CCode (cname="circleColor")] 73 public static int outline_color(SDL.Surface dst, int16 x, int16 y, 74 int16 radius, uint32 color); 75 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); 79 80 [CCode (cname="aacircleColor")] 81 public static int outline_color_aa(SDL.Surface dst, int16 x, int16 y, 82 int16 radius, uint32 color); 83 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); 87 88 [CCode (cname="filledCircleColor")] 89 public static int fill_color(SDL.Surface dst, int16 x, int16 y, 90 int16 radius, uint32 color); 91 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); 95 }// Circle 96 97 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 98 [Compact] 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); 103 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); 107 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); 111 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); 115 116 [CCode (cname="filledEllipseColor")] 117 public static int fill_color(SDL.Surface dst, int16 xc, int16 yc, 118 int16 rx, int16 ry, uint32 color); 119 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); 123 }// Ellipse 124 125 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 126 [Compact] 127 public class Arc { 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); 131 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); 135 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); 139 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); 143 }// Arc 144 145 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 146 [Compact] 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); 151 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); 156 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); 160 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); 165 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); 169 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); 174 }// Trigon 175 176 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 177 [Compact] 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); 182 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); 186 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); 190 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); 194 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); 198 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); 202 }// Polygon 203 204 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 205 [Compact] 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); 210 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); 214 }// BezierCurve 215 216 [CCode (cheader_filename="SDL_gfxPrimitives.h")] 217 [Compact] 218 public class Text { 219 [CCode (cname="stringColor")] 220 public static int color(SDL.Surface dst, int16 x, int16 y, string s, uint32 color); 221 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); 225 226 [CCode (cname="gfxPrimitivesSetFont")] 227 public static int set_font(void* fontdata, int cw, int ch); 228 }// Text 229 230 [CCode (cheader_filename="SDL_rotozoom.h")] 231 [Compact] 232 public class RotoZoom { 233 [CCode (cname="rotozoomSurface")] 234 public static SDL.Surface rotozoom(SDL.Surface src, double degrees, 235 double zoom, int smooth); 236 237 [CCode (cname="rotozoomSurfaceXY")] 238 public static SDL.Surface rotozoom_xy(SDL.Surface src, double degrees, 239 double zoomx, double zoomy, int smooth); 240 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); 244 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); 248 249 [CCode (cname="zoomSurface")] 250 public static SDL.Surface zoom(SDL.Surface src, double zoomx, 251 double zoomy, int smooth); 252 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); 256 }// RotoZoom 257 258 [CCode (cheader_filename="SDL_framerate.h", cname="FPSmanager", free_function="g_free", has_type_id = false)] 259 public struct FramerateManager { 260 [CCode (cname="SDL_initFramerate")] 261 public void init(); 262 263 [CCode (cname="SDL_setFramerate")] 264 public int set_rate(int rate); 265 266 [CCode (cname="SDL_getFramerate")] 267 public int get_rate(); 268 269 [CCode (cname="SDL_framerateDelay")] 270 public void run(); 271 }// FramerateManager 272 273 [CCode (cheader_filename="SDL_imageFilter.h")] 274 [Compact] 275 public class Filter { 276 [CCode (cname="SDL_imageFilterMMXdetect")] 277 public static int have_mmx(); 278 279 [CCode (cname="SDL_imageFilterMMXon")] 280 public static void enable_mmx(); 281 282 [CCode (cname="SDL_imageFilterMMXoff")] 283 public static void disable_mmx(); 284 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); 287 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); 290 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); 293 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); 296 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); 299 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); 302 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); 305 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); 308 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); 311 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); 314 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); 317 318 [CCode (cname="SDL_imageFilterBitNegation")] 319 public static int negate([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length); 320 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); 323 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); 326 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); 329 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); 332 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); 335 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); 338 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); 341 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); 344 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); 347 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); 350 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); 353 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); 356 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); 359 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); 362 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); 365 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); 368 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); 371 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); 374 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); 377 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); 380 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); 383 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); 386 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); 389 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); 392 }// Filter 393}// SDLGraphics 394