Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2016-10-08 22:41:10
Size: 2023
Comment: Created page with content from header file.
Revision 2 as of 2016-10-15 01:52:47
Size: 2055
Editor: DanielG
Comment: link SDL_CreateRGBSurfaceFrom()
Deletions are marked like this. Additions are marked like this.
Line 56: Line 56:
 .[[SDL_CreateRGBSurfaceFrom]]

DRAFT

SDL_CreateRGBSurfaceWithFormatFrom

Use this function to allocate an RGB surface from provided pixel data.

Syntax

SDL_Surface* SDL_CreateRGBSurfaceWithFormatFrom(void*  pixels,
                                                int    width,
                                                int    height,
                                                int    depth,
                                                int    pitch,
                                                Uint32 format)

Function Parameters

pixels

the pixel data to create the surface from

width

the width in pixels of the surface to create

height

the height in pixels of the surface to create

depth

the depth in bits of the surface to create

pitch

the number of bytes in a row in pixels

format

the format of the surface to create

Return Value

Returns a new SDL_Surface on success or NULL on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

If the function runs out of memory, it will return NULL.

Version

This function is available since SDL 2.0.5.


CategoryAPI, CategorySurface

None: SDL_CreateRGBSurfaceWithFormatFrom (last edited 2016-10-20 20:45:29 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit