blob: ca16e2a451e950289a94668d43291cc7c4c47ba0 [file] [log] [blame]
.TH "SDL_DisplayFormat" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference"
SDL_DisplayFormat \- Convert a surface to the display format
\fB#include "SDL\&.h"
\fBSDL_Surface *\fBSDL_DisplayFormat\fP\fR(\fBSDL_Surface *surface\fR);
This function takes a surface and copies it to a new surface of the pixel format and colors of the video framebuffer, suitable for fast blitting onto the display surface\&. It calls \fISDL_ConvertSurface\fR
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\&.
If you want an alpha channel, see \fISDL_DisplayFormatAlpha\fR\&.
If the conversion fails or runs out of memory, it returns \fBNULL\fR
\fI\fBSDL_ConvertSurface\fP\fR, \fI\fBSDL_DisplayFormatAlpha\fP\fR \fI\fBSDL_SetAlpha\fP\fR, \fI\fBSDL_SetColorKey\fP\fR, \fI\fBSDL_Surface\fR\fR
.\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:01