SDL  2.0
SDL_rotate.c File Reference
#include "../../SDL_internal.h"
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "SDL_rotate.h"
+ Include dependency graph for SDL_rotate.c:

Go to the source code of this file.

Data Structures

struct  tColorRGBA
 
struct  tColorY
 

Macros

#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 
#define GUARD_ROWS   (2)
 
#define TRANSFORM_SURFACE_90(pixelType)
 

Functions

static Uint32 _colorkey (SDL_Surface *src)
 
void SDLgfx_rotozoomSurfaceSizeTrig (int width, int height, double angle, int *dstwidth, int *dstheight, double *cangle, double *sangle)
 
static void computeSourceIncrements90 (SDL_Surface *src, int bpp, int angle, int flipx, int flipy, int *sincx, int *sincy, int *signx, int *signy)
 
static void transformSurfaceRGBA90 (SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy)
 
static void transformSurfaceY90 (SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy)
 
static void _transformSurfaceRGBA (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)
 
static void transformSurfaceY (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
 
SDL_SurfaceSDLgfx_rotateSurface (SDL_Surface *src, double angle, int centerx, int centery, int smooth, int flipx, int flipy, int dstwidth, int dstheight, double cangle, double sangle)
 

Macro Definition Documentation

◆ GUARD_ROWS

#define GUARD_ROWS   (2)

Definition at line 77 of file SDL_rotate.c.

Referenced by SDLgfx_rotateSurface().

◆ MAX

#define MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 65 of file SDL_rotate.c.

Referenced by SDLgfx_rotozoomSurfaceSizeTrig().

◆ TRANSFORM_SURFACE_90

#define TRANSFORM_SURFACE_90 (   pixelType)
Value:
int dy, dincy = dst->pitch - dst->w*sizeof(pixelType), sincx, sincy, signx, signy; \
Uint8 *sp = (Uint8*)src->pixels, *dp = (Uint8*)dst->pixels, *de; \
computeSourceIncrements90(src, sizeof(pixelType), angle, flipx, flipy, &sincx, &sincy, &signx, &signy); \
if (signx < 0) sp += (src->w-1)*sizeof(pixelType); \
if (signy < 0) sp += (src->h-1)*src->pitch; \
\
for (dy = 0; dy < dst->h; sp += sincy, dp += dincy, dy++) { \
if (sincx == sizeof(pixelType)) { /* if advancing src and dest equally, use memcpy */ \
SDL_memcpy(dp, sp, dst->w*sizeof(pixelType)); \
sp += dst->w*sizeof(pixelType); \
dp += dst->w*sizeof(pixelType); \
} else { \
for (de = dp + dst->w*sizeof(pixelType); dp != de; sp += sincx, dp += sizeof(pixelType)) { \
*(pixelType*)dp = *(pixelType*)sp; \
} \
} \
}
GLenum GLenum dst
GLfloat GLfloat GLfloat GLfloat h
static void computeSourceIncrements90(SDL_Surface *src, int bpp, int angle, int flipx, int flipy, int *sincx, int *sincy, int *signx, int *signy)
Definition: SDL_rotate.c:152
GLenum src
uint8_t Uint8
Definition: SDL_stdinc.h:157
GLubyte GLubyte GLubyte GLubyte w
GLfloat angle

Definition at line 174 of file SDL_rotate.c.

Referenced by transformSurfaceRGBA90(), and transformSurfaceY90().

Function Documentation

◆ _colorkey()

static Uint32 _colorkey ( SDL_Surface src)
static

Definition at line 83 of file SDL_rotate.c.

References SDL_GetColorKey.

Referenced by transformSurfaceY().

84 {
85  Uint32 key = 0;
86  SDL_GetColorKey(src, &key);
87  return key;
88 }
uint32_t Uint32
Definition: SDL_stdinc.h:181
GLuint64 key
Definition: gl2ext.h:2192
#define SDL_GetColorKey

◆ _transformSurfaceRGBA()

static void _transformSurfaceRGBA ( SDL_Surface src,
SDL_Surface dst,
int  cx,
int  cy,
int  isin,
int  icos,
int  flipx,
int  flipy,
int  smooth 
)
static

Definition at line 228 of file SDL_rotate.c.

References tColorRGBA::a, tColorRGBA::b, tColorRGBA::g, SDL_Surface::h, SDL_Surface::pitch, SDL_Surface::pixels, tColorRGBA::r, and SDL_Surface::w.

Referenced by SDLgfx_rotateSurface().

229 {
230  int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh;
231  tColorRGBA c00, c01, c10, c11, cswap;
232  tColorRGBA *pc, *sp;
233  int gap;
234 
235  /*
236  * Variable setup
237  */
238  xd = ((src->w - dst->w) << 15);
239  yd = ((src->h - dst->h) << 15);
240  ax = (cx << 16) - (icos * cx);
241  ay = (cy << 16) - (isin * cx);
242  sw = src->w - 1;
243  sh = src->h - 1;
244  pc = (tColorRGBA*) dst->pixels;
245  gap = dst->pitch - dst->w * 4;
246 
247  /*
248  * Switch between interpolating and non-interpolating code
249  */
250  if (smooth) {
251  for (y = 0; y < dst->h; y++) {
252  dy = cy - y;
253  sdx = (ax + (isin * dy)) + xd;
254  sdy = (ay - (icos * dy)) + yd;
255  for (x = 0; x < dst->w; x++) {
256  dx = (sdx >> 16);
257  dy = (sdy >> 16);
258  if (flipx) dx = sw - dx;
259  if (flipy) dy = sh - dy;
260  if ((dx > -1) && (dy > -1) && (dx < (src->w-1)) && (dy < (src->h-1))) {
261  sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy) + dx;
262  c00 = *sp;
263  sp += 1;
264  c01 = *sp;
265  sp += (src->pitch/4);
266  c11 = *sp;
267  sp -= 1;
268  c10 = *sp;
269  if (flipx) {
270  cswap = c00; c00=c01; c01=cswap;
271  cswap = c10; c10=c11; c11=cswap;
272  }
273  if (flipy) {
274  cswap = c00; c00=c10; c10=cswap;
275  cswap = c01; c01=c11; c11=cswap;
276  }
277  /*
278  * Interpolate colors
279  */
280  ex = (sdx & 0xffff);
281  ey = (sdy & 0xffff);
282  t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff;
283  t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff;
284  pc->r = (((t2 - t1) * ey) >> 16) + t1;
285  t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff;
286  t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff;
287  pc->g = (((t2 - t1) * ey) >> 16) + t1;
288  t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff;
289  t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff;
290  pc->b = (((t2 - t1) * ey) >> 16) + t1;
291  t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff;
292  t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff;
293  pc->a = (((t2 - t1) * ey) >> 16) + t1;
294  }
295  sdx += icos;
296  sdy += isin;
297  pc++;
298  }
299  pc = (tColorRGBA *) ((Uint8 *) pc + gap);
300  }
301  } else {
302  for (y = 0; y < dst->h; y++) {
303  dy = cy - y;
304  sdx = (ax + (isin * dy)) + xd;
305  sdy = (ay - (icos * dy)) + yd;
306  for (x = 0; x < dst->w; x++) {
307  dx = (sdx >> 16);
308  dy = (sdy >> 16);
309  if ((unsigned)dx < (unsigned)src->w && (unsigned)dy < (unsigned)src->h) {
310  if(flipx) dx = sw - dx;
311  if(flipy) dy = sh - dy;
312  *pc = *((tColorRGBA *)((Uint8 *)src->pixels + src->pitch * dy) + dx);
313  }
314  sdx += icos;
315  sdy += isin;
316  pc++;
317  }
318  pc = (tColorRGBA *) ((Uint8 *) pc + gap);
319  }
320  }
321 }
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
Uint8 a
Definition: SDL_rotate.c:52
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
void * pixels
Definition: SDL_surface.h:75
uint8_t Uint8
Definition: SDL_stdinc.h:157
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
Uint8 r
Definition: SDL_rotate.c:49
Uint8 b
Definition: SDL_rotate.c:51
Uint8 g
Definition: SDL_rotate.c:50

◆ computeSourceIncrements90()

static void computeSourceIncrements90 ( SDL_Surface src,
int  bpp,
int  angle,
int  flipx,
int  flipy,
int *  sincx,
int *  sincy,
int *  signx,
int *  signy 
)
static

Definition at line 152 of file SDL_rotate.c.

References SDL_Surface::h, SDL_Surface::pitch, and SDL_Surface::w.

154 {
155  int pitch = flipy ? -src->pitch : src->pitch;
156  if (flipx) {
157  bpp = -bpp;
158  }
159  switch (angle) { /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */
160  case 0: *sincx = bpp; *sincy = pitch - src->w * *sincx; *signx = *signy = 1; break;
161  case 1: *sincx = -pitch; *sincy = bpp - *sincx * src->h; *signx = 1; *signy = -1; break;
162  case 2: *sincx = -bpp; *sincy = -src->w * *sincx - pitch; *signx = *signy = -1; break;
163  case 3: default: *sincx = pitch; *sincy = -*sincx * src->h - bpp; *signx = -1; *signy = 1; break;
164  }
165  if (flipx) {
166  *signx = -*signx;
167  }
168  if (flipy) {
169  *signy = -*signy;
170  }
171 }
GLfloat angle

◆ SDLgfx_rotateSurface()

SDL_Surface* SDLgfx_rotateSurface ( SDL_Surface src,
double  angle,
int  centerx,
int  centery,
int  smooth,
int  flipx,
int  flipy,
int  dstwidth,
int  dstheight,
double  cangle,
double  sangle 
)

Definition at line 413 of file SDL_rotate.c.

References _transformSurfaceRGBA(), SDL_PixelFormat::Amask, SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::Bmask, SDL_Palette::colors, SDL_Surface::format, SDL_PixelFormat::Gmask, GUARD_ROWS, SDL_Surface::h, i, SDL_Palette::ncolors, NULL, SDL_PixelFormat::palette, SDL_PixelFormat::Rmask, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_NONE, SDL_CreateRGBSurface, SDL_FALSE, SDL_FillRect, SDL_GetColorKey, SDL_GetSurfaceBlendMode, SDL_LockSurface, SDL_MapRGBA, SDL_MUSTLOCK, SDL_SetColorKey, SDL_SetSurfaceBlendMode, SDL_TRUE, SDL_UnlockSurface, transformSurfaceRGBA90(), transformSurfaceY(), and transformSurfaceY90().

Referenced by SW_RenderCopyEx().

414 {
415  SDL_Surface *rz_dst;
416  int is8bit, angle90;
417  int i;
418  SDL_BlendMode blendmode;
419  Uint32 colorkey = 0;
420  int colorKeyAvailable = SDL_FALSE;
421  double sangleinv, cangleinv;
422 
423  /* Sanity check */
424  if (src == NULL)
425  return NULL;
426 
427  if (SDL_GetColorKey(src, &colorkey) == 0) {
428  colorKeyAvailable = SDL_TRUE;
429  }
430 
431  /* This function requires a 32-bit surface or 8-bit surface with a colorkey */
432  is8bit = src->format->BitsPerPixel == 8 && colorKeyAvailable;
433  if (!(is8bit || (src->format->BitsPerPixel == 32 && src->format->Amask)))
434  return NULL;
435 
436  /* Calculate target factors from sin/cos and zoom */
437  sangleinv = sangle*65536.0;
438  cangleinv = cangle*65536.0;
439 
440  /* Alloc space to completely contain the rotated surface */
441  rz_dst = NULL;
442  if (is8bit) {
443  /* Target surface is 8 bit */
444  rz_dst = SDL_CreateRGBSurface(0, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0);
445  if (rz_dst != NULL) {
446  for (i = 0; i < src->format->palette->ncolors; i++) {
447  rz_dst->format->palette->colors[i] = src->format->palette->colors[i];
448  }
449  rz_dst->format->palette->ncolors = src->format->palette->ncolors;
450  }
451  } else {
452  /* Target surface is 32 bit with source RGBA ordering */
453  rz_dst = SDL_CreateRGBSurface(0, dstwidth, dstheight + GUARD_ROWS, 32,
454  src->format->Rmask, src->format->Gmask,
455  src->format->Bmask, src->format->Amask);
456  }
457 
458  /* Check target */
459  if (rz_dst == NULL)
460  return NULL;
461 
462  /* Adjust for guard rows */
463  rz_dst->h = dstheight;
464 
465  SDL_GetSurfaceBlendMode(src, &blendmode);
466 
467  if (colorKeyAvailable == SDL_TRUE) {
468  /* If available, the colorkey will be used to discard the pixels that are outside of the rotated area. */
469  SDL_SetColorKey(rz_dst, SDL_TRUE, colorkey);
470  SDL_FillRect(rz_dst, NULL, colorkey);
471  } else if (blendmode == SDL_BLENDMODE_NONE) {
472  blendmode = SDL_BLENDMODE_BLEND;
473  } else if (blendmode == SDL_BLENDMODE_MOD) {
474  /* Without a colorkey, the target texture has to be white for the MOD blend mode so
475  * that the pixels outside the rotated area don't affect the destination surface.
476  */
477  colorkey = SDL_MapRGBA(rz_dst->format, 255, 255, 255, 0);
478  SDL_FillRect(rz_dst, NULL, colorkey);
479  /* Setting a white colorkey for the destination surface makes the final blit discard
480  * all pixels outside of the rotated area. This doesn't interfere with anything because
481  * white pixels are already a no-op and the MOD blend mode does not interact with alpha.
482  */
483  SDL_SetColorKey(rz_dst, SDL_TRUE, colorkey);
484  }
485 
486  SDL_SetSurfaceBlendMode(rz_dst, blendmode);
487 
488  /* Lock source surface */
489  if (SDL_MUSTLOCK(src)) {
490  SDL_LockSurface(src);
491  }
492 
493  /* check if the rotation is a multiple of 90 degrees so we can take a fast path and also somewhat reduce
494  * the off-by-one problem in _transformSurfaceRGBA that expresses itself when the rotation is near
495  * multiples of 90 degrees.
496  */
497  angle90 = (int)(angle/90);
498  if (angle90 == angle/90) {
499  angle90 %= 4;
500  if (angle90 < 0) angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */
501  } else {
502  angle90 = -1;
503  }
504 
505  if (is8bit) {
506  /* Call the 8-bit transformation routine to do the rotation */
507  if(angle90 >= 0) {
508  transformSurfaceY90(src, rz_dst, angle90, flipx, flipy);
509  } else {
510  transformSurfaceY(src, rz_dst, centerx, centery, (int)sangleinv, (int)cangleinv,
511  flipx, flipy);
512  }
513  } else {
514  /* Call the 32-bit transformation routine to do the rotation */
515  if (angle90 >= 0) {
516  transformSurfaceRGBA90(src, rz_dst, angle90, flipx, flipy);
517  } else {
518  _transformSurfaceRGBA(src, rz_dst, centerx, centery, (int)sangleinv, (int)cangleinv,
519  flipx, flipy, smooth);
520  }
521  }
522 
523  /* Unlock source surface */
524  if (SDL_MUSTLOCK(src)) {
525  SDL_UnlockSurface(src);
526  }
527 
528  /* Return rotated surface */
529  return rz_dst;
530 }
#define SDL_UnlockSurface
#define SDL_MapRGBA
SDL_BlendMode
The blend mode used in SDL_RenderCopy() and drawing operations.
Definition: SDL_blendmode.h:40
#define GUARD_ROWS
Definition: SDL_rotate.c:77
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
static void transformSurfaceRGBA90(SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy)
Definition: SDL_rotate.c:195
uint32_t Uint32
Definition: SDL_stdinc.h:181
#define SDL_GetSurfaceBlendMode
#define SDL_GetColorKey
Uint8 BitsPerPixel
Definition: SDL_pixels.h:319
static void transformSurfaceY(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
Definition: SDL_rotate.c:342
#define SDL_SetColorKey
static void transformSurfaceY90(SDL_Surface *src, SDL_Surface *dst, int angle, int flipx, int flipy)
Definition: SDL_rotate.c:201
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:50
#define NULL
Definition: begin_code.h:164
SDL_Color * colors
Definition: SDL_pixels.h:307
SDL_PixelFormat * format
Definition: SDL_surface.h:72
#define SDL_LockSurface
#define SDL_CreateRGBSurface
#define SDL_MUSTLOCK(S)
Definition: SDL_surface.h:61
#define SDL_SetSurfaceBlendMode
#define SDL_FillRect
GLfloat angle
SDL_Palette * palette
Definition: SDL_pixels.h:318
static void _transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)
Definition: SDL_rotate.c:228

◆ SDLgfx_rotozoomSurfaceSizeTrig()

void SDLgfx_rotozoomSurfaceSizeTrig ( int  width,
int  height,
double  angle,
int *  dstwidth,
int *  dstheight,
double *  cangle,
double *  sangle 
)

Definition at line 104 of file SDL_rotate.c.

References MAX, SDL_ceil, SDL_cos, SDL_fabs, and SDL_sin.

Referenced by SW_RenderCopyEx().

107 {
108  /* The trig code below gets the wrong size (due to FP inaccuracy?) when angle is a multiple of 90 degrees */
109  int angle90 = (int)(angle/90);
110  if(angle90 == angle/90) { /* if the angle is a multiple of 90 degrees */
111  angle90 %= 4;
112  if(angle90 < 0) angle90 += 4; /* 0:0 deg, 1:90 deg, 2:180 deg, 3:270 deg */
113  if(angle90 & 1) {
114  *dstwidth = height;
115  *dstheight = width;
116  *cangle = 0;
117  *sangle = angle90 == 1 ? -1 : 1; /* reversed because our rotations are clockwise */
118  } else {
119  *dstwidth = width;
120  *dstheight = height;
121  *cangle = angle90 == 0 ? 1 : -1;
122  *sangle = 0;
123  }
124  } else {
125  double x, y, cx, cy, sx, sy;
126  double radangle;
127  int dstwidthhalf, dstheighthalf;
128  /*
129  * Determine destination width and height by rotating a centered source box
130  */
131  radangle = angle * (M_PI / -180.0); /* reverse the angle because our rotations are clockwise */
132  *sangle = SDL_sin(radangle);
133  *cangle = SDL_cos(radangle);
134  x = (double)(width / 2);
135  y = (double)(height / 2);
136  cx = *cangle * x;
137  cy = *cangle * y;
138  sx = *sangle * x;
139  sy = *sangle * y;
140 
141  dstwidthhalf = MAX((int)
142  SDL_ceil(MAX(MAX(MAX(SDL_fabs(cx + sy), SDL_fabs(cx - sy)), SDL_fabs(-cx + sy)), SDL_fabs(-cx - sy))), 1);
143  dstheighthalf = MAX((int)
144  SDL_ceil(MAX(MAX(MAX(SDL_fabs(sx + cy), SDL_fabs(sx - cy)), SDL_fabs(-sx + cy)), SDL_fabs(-sx - cy))), 1);
145  *dstwidth = 2 * dstwidthhalf;
146  *dstheight = 2 * dstheighthalf;
147  }
148 }
#define SDL_ceil
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
#define SDL_fabs
GLint GLint GLsizei width
Definition: SDL_opengl.h:1572
#define SDL_cos
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
GLint GLint GLsizei GLsizei height
Definition: SDL_opengl.h:1572
GLfloat angle
#define MAX(a, b)
Definition: SDL_rotate.c:65
#define SDL_sin

◆ transformSurfaceRGBA90()

static void transformSurfaceRGBA90 ( SDL_Surface src,
SDL_Surface dst,
int  angle,
int  flipx,
int  flipy 
)
static

Definition at line 195 of file SDL_rotate.c.

References TRANSFORM_SURFACE_90.

Referenced by SDLgfx_rotateSurface().

196 {
198 }
#define TRANSFORM_SURFACE_90(pixelType)
Definition: SDL_rotate.c:174

◆ transformSurfaceY()

static void transformSurfaceY ( SDL_Surface src,
SDL_Surface dst,
int  cx,
int  cy,
int  isin,
int  icos,
int  flipx,
int  flipy 
)
static

Definition at line 342 of file SDL_rotate.c.

References _colorkey(), SDL_Surface::h, SDL_Surface::pitch, SDL_Surface::pixels, SDL_memset, and SDL_Surface::w.

Referenced by SDLgfx_rotateSurface().

343 {
344  int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay;
345  tColorY *pc;
346  int gap;
347 
348  /*
349  * Variable setup
350  */
351  xd = ((src->w - dst->w) << 15);
352  yd = ((src->h - dst->h) << 15);
353  ax = (cx << 16) - (icos * cx);
354  ay = (cy << 16) - (isin * cx);
355  pc = (tColorY*) dst->pixels;
356  gap = dst->pitch - dst->w;
357  /*
358  * Clear surface to colorkey
359  */
360  SDL_memset(pc, (int)(_colorkey(src) & 0xff), dst->pitch * dst->h);
361  /*
362  * Iterate through destination surface
363  */
364  for (y = 0; y < dst->h; y++) {
365  dy = cy - y;
366  sdx = (ax + (isin * dy)) + xd;
367  sdy = (ay - (icos * dy)) + yd;
368  for (x = 0; x < dst->w; x++) {
369  dx = (sdx >> 16);
370  dy = (sdy >> 16);
371  if ((unsigned)dx < (unsigned)src->w && (unsigned)dy < (unsigned)src->h) {
372  if (flipx) dx = (src->w-1)-dx;
373  if (flipy) dy = (src->h-1)-dy;
374  *pc = *((tColorY *)src->pixels + src->pitch * dy + dx);
375  }
376  sdx += icos;
377  sdy += isin;
378  pc++;
379  }
380  pc += gap;
381  }
382 }
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
void * pixels
Definition: SDL_surface.h:75
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
static Uint32 _colorkey(SDL_Surface *src)
Definition: SDL_rotate.c:83
#define SDL_memset

◆ transformSurfaceY90()

static void transformSurfaceY90 ( SDL_Surface src,
SDL_Surface dst,
int  angle,
int  flipx,
int  flipy 
)
static

Definition at line 201 of file SDL_rotate.c.

References TRANSFORM_SURFACE_90.

Referenced by SDLgfx_rotateSurface().

202 {
204 }
#define TRANSFORM_SURFACE_90(pixelType)
Definition: SDL_rotate.c:174