Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-02-25 20:22:40
Size: 976
Editor: SheenaSmith
Comment: create page, add content (Rev 5540)
Revision 2 as of 2010-03-02 20:17:19
Size: 994
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
||'''surface'''||the surface to update|| ||'''surface'''||the surface / [[SDL_Surface]] to update||

DRAFT

SDL_SetColorKey

Use this function to set the color key (transparent pixel) in a blittable surface.

Syntax

int SDL_SetColorKey(SDL_Surface* surface,
                    int          flag,
                    Uint32       key)

Function Parameters

surface

the surface / SDL_Surface to update

flag

non-zero to enable colorkey, 0 to disable colorkey

key

the transparent pixel in the native surface format

Return Value

Returns 0 on success, or -1 if the surface is not valid; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

You can add useful comments here


CategoryAPI, CategorySurface

None: SDL_SetColorKey (last edited 2012-01-28 20:16:16 by Sam Lantinga)

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