1SDL_DisplayFormat(3) SDL API Reference SDL_DisplayFormat(3)
2
3
4
6 SDL_DisplayFormat- Convert a surface to the display format
7
9 #include "SDL.h"
10
11 SDL_Surface *SDL_DisplayFormat(SDL_Surface *surface);
12
14 This function takes a surface and copies it to a new surface of the
15 pixel format and colors of the video framebuffer, suitable for fast
16 blitting onto the display surface. It calls SDL_ConvertSurface
17
18 If you want to take advantage of hardware colorkey or alpha blit accel‐
19 eration, you should set the colorkey and alpha value before calling
20 this function.
21
22 If you want an alpha channel, see SDL_DisplayFormatAlpha.
23
25 If the conversion fails or runs out of memory, it returns NULL
26
28 SDL_ConvertSurface, SDL_DisplayFormatAlpha SDL_SetAlpha, SDL_SetCol‐
29 orKey, SDL_Surface
30
31
32
33SDL Tue 11 Sep 2001, 23:01 SDL_DisplayFormat(3)