Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2014-08-02 19:21:20
Size: 815
Comment: Added comment in example.
Revision 8 as of 2014-11-04 22:18:05
Size: 814
Comment: Removed confusing pointer to double (Feedback 2014-11-04).
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
SDL_RenderCopyEx(renderer, texture, &srcrect, &dstrect, &angle, &center, flip); SDL_RenderCopyEx(renderer, texture, &srcrect, &dstrect, angle, &center, flip);

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).


CategoryEnum, CategoryRender

None: SDL_RendererFlip (last edited 2014-11-04 22:18:05 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit