Pike v8.1 release 6

Method SDL.Surface()->display_format()


Method display_format

SDL.Surface display_format()

Description

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

If you want to take advantage of hardware colorkey or alpha blit acceleration, you should set the colorkey and / or alpha value before calling this function.

If you want an alpha channel, see display_format_alpha().

Returns

The new surface. An error is thrown if the conversion fails.