1SDL_DisplayFormatAlpha(3)      SDL API Reference     SDL_DisplayFormatAlpha(3)
2
3
4

NAME

6       SDL_DisplayFormatAlpha- Convert a surface to the display format
7

SYNOPSIS

9       #include "SDL.h"
10
11       SDL_Surface *SDL_DisplayFormatAlpha(SDL_Surface *surface);
12

DESCRIPTION

14       This  function  takes  a  surface and copies it to a new surface of the
15       pixel format and colors of the video framebuffer plus an alpha channel,
16       suitable  for fast blitting onto the display surface. It calls SDL_Con‐
17       vertSurface
18
19       If you want to take advantage of hardware colorkey or alpha blit accel‐
20       eration,  you  should  set  the colorkey and alpha value before calling
21       this function.
22
23       This function can be used to convert a colourkey to an  alpha  channel,
24       if  the  SDL_SRCCOLORKEY flag is set on the surface. The generated sur‐
25       face will then be transparent (alpha=0)  where  the  pixels  match  the
26       colourkey, and opaque (alpha=255) elsewhere.
27

RETURN VALUE

29       If the conversion fails or runs out of memory, it returns NULL
30

SEE ALSO

32       SDL_ConvertSurface,  SDL_SetAlpha,  SDL_SetColorKey, SDL_DisplayFormat,
33       SDL_Surface
34
35
36
37SDL                         Tue 11 Sep 2001, 23:01   SDL_DisplayFormatAlpha(3)
Impressum