Tao.Sdl SDK Documentation

SdlImage.IMG_LoadXPM_RW Method 

Load a .XPM image.

[Visual Basic]
Public Shared Function IMG_LoadXPM_RW( _
   ByVal src As IntPtr _
) As IntPtr
[C#]
public static IntPtr IMG_LoadXPM_RW(
   IntPtr src
);

Parameters

src
The XPM image is loaded from this

Return Value

a pointer to the image as a new SDL_Surface. NULL is returned on errors, like if XPM is not supported, or a read error.

Remarks

Load src as a XPM image for use as a surface, if XPM support is compiled into the SDL_image library.

Binds to C-function in SDL_image.h

            SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src)
            

Example

            // load sample.xpm into image
                    SDL_Surface *image;
                    SDL_RWops *rwop;
                    rwop=SDL_RWFromFile("sample.xpm", "rb");
                    image=IMG_LoadXPM_RW(rwop);
                    if(!image)
                {
                    printf("IMG_LoadXPM_RW: %s\n", IMG_GetError());
                    // handle error
                }
            

See Also

SdlImage Class | Tao.Sdl Namespace | IMG_LoadTyped_RW | IMG_isXPM | IMG_ReadXPMFromArray