1 module bindbc.sdlgfx.defs; 2 3 import bindbc.sdl; 4 5 struct SDL_gfxBlitInfo { 6 Uint8 *s_pixels; 7 int s_width; 8 int s_height; 9 int s_skip; 10 Uint8 *d_pixels; 11 int d_width; 12 int d_height; 13 int d_skip; 14 void *aux_data; 15 SDL_PixelFormat *src; 16 Uint8 *table; 17 SDL_PixelFormat *dst; 18 } 19 20 version(BindSDLgfx_Static) { 21 extern (C) @nogc nothrow { 22 // SDL_gfxPrimitives.h: graphics primitives for SDL 23 int pixelColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Uint32 color); 24 int pixelRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 25 int hlineColor(SDL_Renderer * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); 26 int hlineRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 27 int vlineColor(SDL_Renderer * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); 28 int vlineRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 29 int rectangleColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 30 int rectangleRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 31 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 32 int roundedRectangleColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); 33 int roundedRectangleRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 34 Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 35 int boxColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 36 int boxRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, 37 Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 38 int roundedBoxColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); 39 int roundedBoxRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, 40 Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 41 int lineColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 42 int lineRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 43 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 44 int aalineColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 45 int aalineRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 46 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 47 int thickLineColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, 48 Uint8 width, Uint32 color); 49 int thickLineRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, 50 Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 51 int circleColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); 52 int circleRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 53 int arcColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); 54 int arcRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, 55 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 56 int aacircleColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); 57 int aacircleRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, 58 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 59 int filledCircleColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); 60 int filledCircleRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, 61 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 62 int ellipseColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 63 int ellipseRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, 64 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 65 int aaellipseColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 66 int aaellipseRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, 67 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 68 int filledEllipseColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 69 int filledEllipseRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, 70 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 71 int pieColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 72 Sint16 start, Sint16 end, Uint32 color); 73 int pieRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 74 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 75 int filledPieColor(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 76 Sint16 start, Sint16 end, Uint32 color); 77 int filledPieRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 78 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 79 int trigonColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 80 int trigonRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 81 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 82 int aatrigonColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 83 int aatrigonRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 84 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 85 int filledTrigonColor(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 86 int filledTrigonRGBA(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 87 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 88 int polygonColor(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 89 int polygonRGBA(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 90 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 91 int aapolygonColor(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 92 int aapolygonRGBA(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 93 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 94 int filledPolygonColor(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 95 int filledPolygonRGBA(SDL_Renderer * dst, const Sint16 * vx, 96 const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 97 int texturedPolygon(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Renderer * texture,int texture_dx,int texture_dy); 98 //int filledPolygonColorMT(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color, int **polyInts, int *polyAllocated); 99 int filledPolygonRGBAMT(SDL_Renderer * dst, const Sint16 * vx, 100 const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, 101 int **polyInts, int *polyAllocated); 102 int texturedPolygonMT(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Renderer * texture,int texture_dx,int texture_dy, int **polyInts, int *polyAllocated); 103 int bezierColor(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color); 104 int bezierRGBA(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 105 int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 106 void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch); 107 void gfxPrimitivesSetFontRotation(Uint32 rotation); 108 int characterColor(SDL_Renderer * dst, Sint16 x, Sint16 y, char c, Uint32 color); 109 int characterRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 110 int stringColor(SDL_Renderer * dst, Sint16 x, Sint16 y, const char *s, Uint32 color); 111 int stringRGBA(SDL_Renderer * dst, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 112 //int SDL_gfxBlitRGBA(SDL_Renderer * src, SDL_Rect * srcrect, SDL_Renderer * dst, SDL_Rect * dstrect); 113 //int SDL_gfxSetAlpha(SDL_Renderer * src, Uint8 a); 114 //int SDL_gfxMultiplyAlpha(SDL_Renderer * src, Uint8 a); 115 116 // SDL_imageFilter.h: byte-image "filter" routines 117 int SDL_imageFilterMMXdetect(); 118 void SDL_imageFilterMMXoff(); 119 void SDL_imageFilterMMXon(); 120 int SDL_imageFilterAdd(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 121 int SDL_imageFilterMean(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 122 int SDL_imageFilterSub(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 123 int SDL_imageFilterAbsDiff(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 124 int SDL_imageFilterMult(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 125 int SDL_imageFilterMultNor(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 126 int SDL_imageFilterMultDivby2(ubyte *Src1, ubyte *Src2, ubyte *Dest, 127 uint length); 128 int SDL_imageFilterMultDivby4(ubyte *Src1, ubyte *Src2, ubyte *Dest, 129 uint length); 130 int SDL_imageFilterBitAnd(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 131 int SDL_imageFilterBitOr(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 132 int SDL_imageFilterDiv(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 133 int SDL_imageFilterBitNegation(ubyte *Src1, ubyte *Dest, uint length); 134 int SDL_imageFilterAddByte(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 135 int SDL_imageFilterAddUint(ubyte *Src1, ubyte *Dest, uint length, uint C); 136 int SDL_imageFilterAddByteToHalf(ubyte *Src1, ubyte *Dest, uint length, 137 ubyte C); 138 int SDL_imageFilterSubByte(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 139 int SDL_imageFilterSubUint(ubyte *Src1, ubyte *Dest, uint length, uint C); 140 int SDL_imageFilterShiftRight(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 141 int SDL_imageFilterShiftRightUint(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 142 int SDL_imageFilterMultByByte(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 143 int SDL_imageFilterShiftRightAndMultByByte(ubyte *Src1, ubyte *Dest, uint length, 144 ubyte N, ubyte C); 145 int SDL_imageFilterShiftLeftByte(ubyte *Src1, ubyte *Dest, uint length, 146 ubyte N); 147 int SDL_imageFilterShiftLeftUint(ubyte *Src1, ubyte *Dest, uint length, 148 ubyte N); 149 int SDL_imageFilterShiftLeft(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 150 int SDL_imageFilterBinarizeUsingThreshold(ubyte *Src1, ubyte *Dest, uint length, 151 ubyte T); 152 int SDL_imageFilterClipToRange(ubyte *Src1, ubyte *Dest, uint length, 153 ubyte Tmin, ubyte Tmax); 154 int SDL_imageFilterNormalizeLinear(ubyte *Src, ubyte *Dest, uint length, int Cmin, 155 int Cmax, int Nmin, int Nmax); 156 int SDL_imageFilterConvolveKernel3x3Divide(ubyte *Src, ubyte *Dest, int rows, 157 int columns, short *Kernel, ubyte Divisor); 158 int SDL_imageFilterConvolveKernel5x5Divide(ubyte *Src, ubyte *Dest, int rows, 159 int columns, short *Kernel, ubyte Divisor); 160 int SDL_imageFilterConvolveKernel7x7Divide(ubyte *Src, ubyte *Dest, int rows, 161 int columns, short *Kernel, ubyte Divisor); 162 int SDL_imageFilterConvolveKernel9x9Divide(ubyte *Src, ubyte *Dest, int rows, 163 int columns, short *Kernel, ubyte Divisor); 164 int SDL_imageFilterConvolveKernel3x3ShiftRight(ubyte *Src, ubyte *Dest, int rows, 165 int columns, short *Kernel, 166 ubyte NRightShift); 167 int SDL_imageFilterConvolveKernel5x5ShiftRight(ubyte *Src, ubyte *Dest, int rows, 168 int columns, short *Kernel, 169 ubyte NRightShift); 170 int SDL_imageFilterConvolveKernel7x7ShiftRight(ubyte *Src, ubyte *Dest, int rows, 171 int columns, short *Kernel, 172 ubyte NRightShift); 173 int SDL_imageFilterConvolveKernel9x9ShiftRight(ubyte *Src, ubyte *Dest, int rows, 174 int columns, short *Kernel, 175 ubyte NRightShift); 176 int SDL_imageFilterSobelX(ubyte *Src, ubyte *Dest, int rows, int columns); 177 int SDL_imageFilterSobelXShiftRight(ubyte *Src, ubyte *Dest, int rows, int columns, 178 ubyte NRightShift); 179 void SDL_imageFilterAlignStack(); 180 void SDL_imageFilterRestoreStack(); 181 182 // SDL_rotozoom.h: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces 183 SDL_Renderer *rotozoomSurface(SDL_Renderer * src, double angle, double zoom, int smooth); 184 SDL_Renderer *rotozoomSurfaceXY 185 (SDL_Renderer * src, double angle, double zoomx, double zoomy, int smooth); 186 void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, 187 int *dstheight); 188 void rotozoomSurfaceSizeXY 189 (int width, int height, double angle, double zoomx, double zoomy, 190 int *dstwidth, int *dstheight); 191 SDL_Renderer *zoomSurface(SDL_Renderer * src, double zoomx, double zoomy, int smooth); 192 void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); 193 SDL_Renderer *shrinkSurface(SDL_Renderer * src, int factorx, int factory); 194 //SDL_Renderer* rotateSurface90Degrees(SDL_Renderer* src, int numClockwiseTurns); 195 } 196 } else { 197 extern(C) @nogc nothrow { 198 // SDL_gfxPrimitives.h: graphics primitives for SDL 199 alias p_pixelColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Uint32 color); 200 alias p_pixelRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 201 alias p_hlineColor = int function (SDL_Renderer * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); 202 alias p_hlineRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 203 alias p_vlineColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); 204 alias p_vlineRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 205 alias p_rectangleColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 206 alias p_rectangleRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 207 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 208 alias p_roundedRectangleColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); 209 alias p_roundedRectangleRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 210 Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 211 alias p_boxColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 212 alias p_boxRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, 213 Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 214 alias p_roundedBoxColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); 215 alias p_roundedBoxRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, 216 Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 217 alias p_lineColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 218 alias p_lineRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 219 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 220 alias p_aalineColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); 221 alias p_aalineRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, 222 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 223 alias p_thickLineColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, 224 Uint8 width, Uint32 color); 225 alias p_thickLineRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, 226 Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 227 alias p_circleColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); 228 alias p_circleRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 229 alias p_arcColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); 230 alias p_arcRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, 231 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 232 alias p_aacircleColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); 233 alias p_aacircleRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, 234 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 235 alias p_filledCircleColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); 236 alias p_filledCircleRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, 237 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 238 alias p_ellipseColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 239 alias p_ellipseRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, 240 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 241 alias p_aaellipseColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 242 alias p_aaellipseRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, 243 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 244 alias p_filledEllipseColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); 245 alias p_filledEllipseRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, 246 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 247 alias p_pieColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 248 Sint16 start, Sint16 end, Uint32 color); 249 alias p_pieRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 250 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 251 alias p_filledPieColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 252 Sint16 start, Sint16 end, Uint32 color); 253 alias p_filledPieRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, Sint16 rad, 254 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 255 alias p_trigonColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 256 alias p_trigonRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 257 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 258 alias p_aatrigonColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 259 alias p_aatrigonRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 260 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 261 alias p_filledTrigonColor = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); 262 alias p_filledTrigonRGBA = int function(SDL_Renderer * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, 263 Uint8 r, Uint8 g, Uint8 b, Uint8 a); 264 alias p_polygonColor = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 265 alias p_polygonRGBA = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 266 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 267 alias p_aapolygonColor = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 268 alias p_aapolygonRGBA = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 269 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 270 alias p_filledPolygonColor = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); 271 alias p_filledPolygonRGBA = int function(SDL_Renderer * dst, const Sint16 * vx, 272 const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 273 alias p_texturedPolygon = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Renderer * texture,int texture_dx,int texture_dy); 274 //alias p_filledPolygonColorMT = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color, int **polyInts, int *polyAllocated); 275 alias p_filledPolygonRGBAMT = int function(SDL_Renderer * dst, const Sint16 * vx, 276 const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, 277 int **polyInts, int *polyAllocated); 278 alias p_texturedPolygonMT = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, SDL_Renderer * texture,int texture_dx,int texture_dy, int **polyInts, int *polyAllocated); 279 alias p_bezierColor = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color); 280 alias p_bezierRGBA = int function(SDL_Renderer * dst, const Sint16 * vx, const Sint16 * vy, 281 int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 282 alias p_gfxPrimitivesSetFont = void function(const void *fontdata, Uint32 cw, Uint32 ch); 283 alias p_gfxPrimitivesSetFontRotation = void function(Uint32 rotation); 284 alias p_characterColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, char c, Uint32 color); 285 alias p_characterRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 286 alias p_stringColor = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, const char *s, Uint32 color); 287 alias p_stringRGBA = int function(SDL_Renderer * dst, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); 288 //alias p_SDL_gfxBlitRGBA = int function(SDL_Renderer * src, SDL_Rect * srcrect, SDL_Renderer * dst, SDL_Rect * dstrect); 289 //alias p_SDL_gfxSetAlpha = int function(SDL_Renderer * src, Uint8 a); 290 //alias p_SDL_gfxMultiplyAlpha = int function(SDL_Renderer * src, Uint8 a); 291 292 // SDL_imageFilter.h: byte-image "filter" routines 293 alias p_SDL_imageFilterMMXdetect = int function(); 294 alias p_SDL_imageFilterMMXoff = void function(); 295 alias p_SDL_imageFilterMMXon = void function(); 296 alias p_SDL_imageFilterAdd = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 297 alias p_SDL_imageFilterMean = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 298 alias p_SDL_imageFilterSub = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 299 alias p_SDL_imageFilterAbsDiff = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 300 alias p_SDL_imageFilterMult = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 301 alias p_SDL_imageFilterMultNor = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 302 alias p_SDL_imageFilterMultDivby2 = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, 303 uint length); 304 alias p_SDL_imageFilterMultDivby4 = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, 305 uint length); 306 alias p_SDL_imageFilterBitAnd = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 307 alias p_SDL_imageFilterBitOr = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 308 alias p_SDL_imageFilterDiv = int function(ubyte *Src1, ubyte *Src2, ubyte *Dest, uint length); 309 alias p_SDL_imageFilterBitNegation = int function(ubyte *Src1, ubyte *Dest, uint length); 310 alias p_SDL_imageFilterAddByte = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 311 alias p_SDL_imageFilterAddUint = int function(ubyte *Src1, ubyte *Dest, uint length, uint C); 312 alias p_SDL_imageFilterAddByteToHalf = int function(ubyte *Src1, ubyte *Dest, uint length, 313 ubyte C); 314 alias p_SDL_imageFilterSubByte = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 315 alias p_SDL_imageFilterSubUint = int function(ubyte *Src1, ubyte *Dest, uint length, uint C); 316 alias p_SDL_imageFilterShiftRight = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 317 alias p_SDL_imageFilterShiftRightUint = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 318 alias p_SDL_imageFilterMultByByte = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte C); 319 alias p_SDL_imageFilterShiftRightAndMultByByte = int function(ubyte *Src1, ubyte *Dest, uint length, 320 ubyte N, ubyte C); 321 alias p_SDL_imageFilterShiftLeftByte = int function(ubyte *Src1, ubyte *Dest, uint length, 322 ubyte N); 323 alias p_SDL_imageFilterShiftLeftUint = int function(ubyte *Src1, ubyte *Dest, uint length, 324 ubyte N); 325 alias p_SDL_imageFilterShiftLeft = int function(ubyte *Src1, ubyte *Dest, uint length, ubyte N); 326 alias p_SDL_imageFilterBinarizeUsingThreshold = int function(ubyte *Src1, ubyte *Dest, uint length, 327 ubyte T); 328 alias p_SDL_imageFilterClipToRange = int function(ubyte *Src1, ubyte *Dest, uint length, 329 ubyte Tmin, ubyte Tmax); 330 alias p_SDL_imageFilterNormalizeLinear = int function(ubyte *Src, ubyte *Dest, uint length, int Cmin, 331 int Cmax, int Nmin, int Nmax); 332 alias p_SDL_imageFilterConvolveKernel3x3Divide = int function(ubyte *Src, ubyte *Dest, int rows, 333 int columns, short *Kernel, ubyte Divisor); 334 alias p_SDL_imageFilterConvolveKernel5x5Divide = int function(ubyte *Src, ubyte *Dest, int rows, 335 int columns, short *Kernel, ubyte Divisor); 336 alias p_SDL_imageFilterConvolveKernel7x7Divide = int function(ubyte *Src, ubyte *Dest, int rows, 337 int columns, short *Kernel, ubyte Divisor); 338 alias p_SDL_imageFilterConvolveKernel9x9Divide = int function(ubyte *Src, ubyte *Dest, int rows, 339 int columns, short *Kernel, ubyte Divisor); 340 alias p_SDL_imageFilterConvolveKernel3x3ShiftRight = int function(ubyte *Src, ubyte *Dest, int rows, 341 int columns, short *Kernel, 342 ubyte NRightShift); 343 alias p_SDL_imageFilterConvolveKernel5x5ShiftRight = int function(ubyte *Src, ubyte *Dest, int rows, 344 int columns, short *Kernel, 345 ubyte NRightShift); 346 alias p_SDL_imageFilterConvolveKernel7x7ShiftRight = int function(ubyte *Src, ubyte *Dest, int rows, 347 int columns, short *Kernel, 348 ubyte NRightShift); 349 alias p_SDL_imageFilterConvolveKernel9x9ShiftRight = int function(ubyte *Src, ubyte *Dest, int rows, 350 int columns, short *Kernel, 351 ubyte NRightShift); 352 alias p_SDL_imageFilterSobelX = int function(ubyte *Src, ubyte *Dest, int rows, int columns); 353 alias p_SDL_imageFilterSobelXShiftRight = int function(ubyte *Src, ubyte *Dest, int rows, int columns, 354 ubyte NRightShift); 355 alias p_SDL_imageFilterAlignStack = void function(); 356 alias p_SDL_imageFilterRestoreStack = void function(); 357 358 // SDL_rotozoom.h: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces 359 alias p_rotozoomSurface = SDL_Renderer* function(SDL_Renderer * src, double angle, double zoom, int smooth); 360 alias p_rotozoomSurfaceXY = SDL_Renderer* function 361 (SDL_Renderer * src, double angle, double zoomx, double zoomy, int smooth); 362 alias p_rotozoomSurfaceSize = void function(int width, int height, double angle, double zoom, int *dstwidth, 363 int *dstheight); 364 alias p_rotozoomSurfaceSizeXY = void function 365 (int width, int height, double angle, double zoomx, double zoomy, 366 int *dstwidth, int *dstheight); 367 alias p_zoomSurface = SDL_Renderer* function(SDL_Renderer * src, double zoomx, double zoomy, int smooth); 368 alias p_zoomSurfaceSize = void function(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); 369 alias p_shrinkSurface = SDL_Renderer* function(SDL_Renderer * src, int factorx, int factory); 370 //alias p_rotateSurface90Degrees = SDL_Renderer* function(SDL_Renderer* src, int numClockwiseTurns); 371 } 372 373 __gshared { 374 p_pixelColor pixelColor; 375 p_pixelRGBA pixelRGBA; 376 p_hlineColor hlineColor; 377 p_hlineRGBA hlineRGBA; 378 p_vlineColor vlineColor; 379 p_vlineRGBA vlineRGBA; 380 p_rectangleColor rectangleColor; 381 p_rectangleRGBA rectangleRGBA; 382 p_roundedRectangleColor roundedRectangleColor; 383 p_roundedRectangleRGBA roundedRectangleRGBA; 384 p_boxColor boxColor; 385 p_boxRGBA boxRGBA; 386 p_roundedBoxColor roundedBoxColor; 387 p_roundedBoxRGBA roundedBoxRGBA; 388 p_lineColor lineColor; 389 p_lineRGBA lineRGBA; 390 p_aalineColor aalineColor; 391 p_aalineRGBA aalineRGBA; 392 p_thickLineColor thickLineColor; 393 p_thickLineRGBA thickLineRGBA; 394 p_circleColor circleColor; 395 p_circleRGBA circleRGBA; 396 p_arcColor arcColor; 397 p_arcRGBA arcRGBA; 398 p_aacircleColor aacircleColor; 399 p_aacircleRGBA aacircleRGBA; 400 p_filledCircleColor filledCircleColor; 401 p_filledCircleRGBA filledCircleRGBA; 402 p_ellipseColor ellipseColor; 403 p_ellipseRGBA ellipseRGBA; 404 p_aaellipseColor aaellipseColor; 405 p_aaellipseRGBA aaellipseRGBA; 406 p_filledEllipseColor filledEllipseColor; 407 p_filledEllipseRGBA filledEllipseRGBA; 408 p_pieColor pieColor; 409 p_pieRGBA pieRGBA; 410 p_filledPieColor filledPieColor; 411 p_filledPieRGBA filledPieRGBA; 412 p_trigonColor trigonColor; 413 p_trigonRGBA trigonRGBA; 414 p_aatrigonColor aatrigonColor; 415 p_aatrigonRGBA aatrigonRGBA; 416 p_filledTrigonColor filledTrigonColor; 417 p_filledTrigonRGBA filledTrigonRGBA; 418 p_polygonColor polygonColor; 419 p_polygonRGBA polygonRGBA; 420 p_aapolygonColor aapolygonColor; 421 p_aapolygonRGBA aapolygonRGBA; 422 p_filledPolygonColor filledPolygonColor; 423 p_filledPolygonRGBA filledPolygonRGBA; 424 p_texturedPolygon texturedPolygon; 425 //p_filledPolygonColorMT filledPolygonColorMT; 426 p_filledPolygonRGBAMT filledPolygonRGBAMT; 427 p_texturedPolygonMT texturedPolygonMT; 428 p_bezierColor bezierColor; 429 p_bezierRGBA bezierRGBA; 430 p_gfxPrimitivesSetFont gfxPrimitivesSetFont; 431 p_gfxPrimitivesSetFontRotation gfxPrimitivesSetFontRotation; 432 p_characterColor characterColor; 433 p_characterRGBA characterRGBA; 434 p_stringColor stringColor; 435 p_stringRGBA stringRGBA; 436 //p_SDL_gfxBlitRGBA SDL_gfxBlitRGBA; 437 //p_SDL_gfxSetAlpha SDL_gfxSetAlpha; 438 //p_SDL_gfxMultiplyAlpha SDL_gfxMultiplyAlpha; 439 p_SDL_imageFilterMMXdetect SDL_imageFilterMMXdetect; 440 p_SDL_imageFilterMMXoff SDL_imageFilterMMXoff; 441 p_SDL_imageFilterMMXon SDL_imageFilterMMXon; 442 p_SDL_imageFilterAdd SDL_imageFilterAdd; 443 p_SDL_imageFilterMean SDL_imageFilterMean; 444 p_SDL_imageFilterSub SDL_imageFilterSub; 445 p_SDL_imageFilterAbsDiff SDL_imageFilterAbsDiff; 446 p_SDL_imageFilterMult SDL_imageFilterMult; 447 p_SDL_imageFilterMultNor SDL_imageFilterMultNor; 448 p_SDL_imageFilterMultDivby2 SDL_imageFilterMultDivby2; 449 p_SDL_imageFilterMultDivby4 SDL_imageFilterMultDivby4; 450 p_SDL_imageFilterBitAnd SDL_imageFilterBitAnd; 451 p_SDL_imageFilterBitOr SDL_imageFilterBitOr; 452 p_SDL_imageFilterDiv SDL_imageFilterDiv; 453 p_SDL_imageFilterBitNegation SDL_imageFilterBitNegation; 454 p_SDL_imageFilterAddByte SDL_imageFilterAddByte; 455 p_SDL_imageFilterAddUint SDL_imageFilterAddUint; 456 p_SDL_imageFilterAddByteToHalf SDL_imageFilterAddByteToHalf; 457 p_SDL_imageFilterSubByte SDL_imageFilterSubByte; 458 p_SDL_imageFilterSubUint SDL_imageFilterSubUint; 459 p_SDL_imageFilterShiftRight SDL_imageFilterShiftRight; 460 p_SDL_imageFilterShiftRightUint SDL_imageFilterShiftRightUint; 461 p_SDL_imageFilterMultByByte SDL_imageFilterMultByByte; 462 p_SDL_imageFilterShiftRightAndMultByByte SDL_imageFilterShiftRightAndMultByByte; 463 p_SDL_imageFilterShiftLeftByte SDL_imageFilterShiftLeftByte; 464 p_SDL_imageFilterShiftLeftUint SDL_imageFilterShiftLeftUint; 465 p_SDL_imageFilterShiftLeft SDL_imageFilterShiftLeft; 466 p_SDL_imageFilterBinarizeUsingThreshold SDL_imageFilterBinarizeUsingThreshold; 467 p_SDL_imageFilterClipToRange SDL_imageFilterClipToRange; 468 p_SDL_imageFilterNormalizeLinear SDL_imageFilterNormalizeLinear; 469 p_SDL_imageFilterConvolveKernel3x3Divide SDL_imageFilterConvolveKernel3x3Divide; 470 p_SDL_imageFilterConvolveKernel5x5Divide SDL_imageFilterConvolveKernel5x5Divide; 471 p_SDL_imageFilterConvolveKernel7x7Divide SDL_imageFilterConvolveKernel7x7Divide; 472 p_SDL_imageFilterConvolveKernel9x9Divide SDL_imageFilterConvolveKernel9x9Divide; 473 p_SDL_imageFilterConvolveKernel3x3ShiftRight SDL_imageFilterConvolveKernel3x3ShiftRight; 474 p_SDL_imageFilterConvolveKernel5x5ShiftRight SDL_imageFilterConvolveKernel5x5ShiftRight; 475 p_SDL_imageFilterConvolveKernel7x7ShiftRight SDL_imageFilterConvolveKernel7x7ShiftRight; 476 p_SDL_imageFilterConvolveKernel9x9ShiftRight SDL_imageFilterConvolveKernel9x9ShiftRight; 477 p_SDL_imageFilterSobelX SDL_imageFilterSobelX; 478 p_SDL_imageFilterSobelXShiftRight SDL_imageFilterSobelXShiftRight; 479 p_SDL_imageFilterAlignStack SDL_imageFilterAlignStack; 480 p_SDL_imageFilterRestoreStack SDL_imageFilterRestoreStack; 481 p_rotozoomSurface rotozoomSurface; 482 p_rotozoomSurfaceXY rotozoomSurfaceXY; 483 p_rotozoomSurfaceSize rotozoomSurfaceSize; 484 p_rotozoomSurfaceSizeXY rotozoomSurfaceSizeXY; 485 p_zoomSurface zoomSurface; 486 p_zoomSurfaceSize zoomSurfaceSize; 487 p_shrinkSurface shrinkSurface; 488 //p_rotateSurface90Degrees rotateSurface90Degree; 489 } 490 }