Tao.Sdl SDK Documentation

Sdl.SDL_ConvertSurface Method 

Converts a surface to the same format as another surface.

[Visual Basic]
Public Shared Function SDL_ConvertSurface( _
   ByVal src As IntPtr, _
   ByVal fmt As IntPtr, _
   ByVal flags As Integer _
) As IntPtr
[C#]
public static IntPtr SDL_ConvertSurface(
   IntPtr src,
   IntPtr fmt,
   int flags
);

Parameters

src
IntPtr to SDL_Surface
fmt
IntPTr to SDL_PixelFormat
flags

Return Value

Returns either a pointer to the new surface, or NULL on error.

Remarks

Creates a new surface of the specified format, and then copies and maps the given surface to it. If this function fails, it returns NULL.

The flags parameter is passed to SDL_CreateRGBSurface and has those semantics.

This function is used internally by SDL_DisplayFormat.

This function can only be called after SDL_Init.

Binds to C-function call in SDL_video.h:

            SDL_Surface *SDL_ConvertSurface(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags)
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_CreateRGBSurface | SDL_DisplayFormat | SDL_PixelFormat | SDL_Surface