>SDL_DisplayFormatAlpha<
/TITLE
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
REL="HOME"
TITLE="SDL Library Documentation"
REL="UP"
TITLE="Video"
REL="PREVIOUS"
TITLE="SDL_DisplayFormat"
HREF="sdldisplayformat.html"><
LINK
REL="NEXT"
TITLE="SDL_WarpMouse"
HREF="sdlwarpmouse.html"><
/HEAD
CLASS="REFENTRY"
BGCOLOR="#FFF8DC"
TEXT="#000000"
LINK="#0000ee"
VLINK="#551a8b"
ALINK="#ff0000"
CLASS="NAVHEADER"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
COLSPAN="3"
ALIGN="center"
>SDL Library Documentation<
/TH
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
HREF="sdldisplayformat.html"
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
HREF="sdlwarpmouse.html"
ALIGN="LEFT"
NAME="SDLDISPLAYFORMATALPHA"
>SDL_DisplayFormatAlpha<
/A
CLASS="REFNAMEDIV"
NAME="AEN2013"
>SDL_DisplayFormatAlpha -- Convert a surface to the display format<
/DIV
CLASS="REFSYNOPSISDIV"
NAME="AEN2016"
CLASS="FUNCSYNOPSIS"
NAME="AEN2017"
CLASS="FUNCSYNOPSISINFO"
CLASS="FUNCDEF"
CLASS="FSFUNC"
>SDL_DisplayFormatAlpha<
/B
>
(SDL_Surface *surface
);<
/CODE
CLASS="REFSECT1"
NAME="AEN2023"
>This function takes a surface and copies it to a new surface of the
pixel format and colors of the video framebuffer plus an alpha channel,
suitable for fast blitting onto the display surface. It calls
HREF="sdlconvertsurface.html"
>If you want to take advantage of hardware colorkey or alpha blit
acceleration, you should set the colorkey and alpha value before
calling this function.<
/P
>This function can be used to convert a colourkey to an alpha channel,
CLASS="LITERAL"
> flag is set on the surface.
The generated surface will then be transparent (alpha=0) where the
pixels match the colourkey, and opaque
(alpha
=255) elsewhere.<
/P
CLASS="REFSECT1"
NAME="AEN2030"
>If the conversion fails or runs out of memory, it returns
CLASS="RETURNVALUE"
CLASS="REFSECT1"
NAME="AEN2034"
HREF="sdlconvertsurface.html"
>,
HREF="sdlsetalpha.html"
>,
HREF="sdlsetcolorkey.html"
>,
HREF="sdldisplayformat.html"
>,
HREF="sdlsurface.html"
CLASS="NAVFOOTER"
ALIGN="LEFT"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
HREF="sdldisplayformat.html"
WIDTH="34%"
ALIGN="center"
VALIGN="top"
HREF="index.html"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
HREF="sdlwarpmouse.html"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
WIDTH="34%"
ALIGN="center"
VALIGN="top"
HREF="video.html"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>