SDL Wiki

SDL_RendererFlip

An enumeration of flags that can be used in the flip parameter for SDL_RenderCopyEx.

Values

SDL_FLIP_NONE

do not flip

SDL_FLIP_HORIZONTAL

flip horizontally

SDL_FLIP_VERTICAL

flip vertically

Code Examples

/* casts may be necessary for some compiler settings or languages (e.g. C++) */
SDL_RendererFlip flip = SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL;

SDL_RenderCopyEx(renderer, texture, &srcrect, &dstrect, angle, &center, flip);

Remarks

If you want to do a diagonal flip (both horizontal and vertical), use bitwise or ('|' operator).

SDL_RenderCopyEx

CategoryEnum, CategoryRender


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.