|
Size: 1131
Comment: update formatting - enums, structs, the/an
|
Size: 973
Comment: update content - w/ Sam; remove draft
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 6: | Line 5: |
| Use this function to get the color key (transparent pixel) in a blittable surface. | Use this function to get the color key (transparent pixel) for a surface. |
| Line 17: | Line 16: |
| ||'''surface'''||the [[SDL_Surface]] structure to ,,update,, ^query^|| ||'''key'''||a pointer filled in with the transparent pixel in the native surface format|| |
||'''surface'''||the [[SDL_Surface]] structure to query|| ||'''key'''||a pointer filled in with the transparent pixel|| |
| Line 23: | Line 22: |
| If the surface is not valid or colorkey is not enabled it returns -1. <<Color2(green,Where is "colorkey" from? Is that in a struct or is it related to the '''key''' param? Should it be in monospace?)>> | If the surface doesn't have color key enabled this function returns -1. |
| Line 31: | Line 31: |
| ''You can add useful comments here'' | The color key is a pixel of the format used by the surface as generated by [[SDL_MapRGB]](). |
| Line 34: | Line 34: |
| .[[SDL_BlitSurface]] |
SDL_GetColorKey
Use this function to get the color key (transparent pixel) for a surface.
Contents
Syntax
int SDL_GetColorKey(SDL_Surface* surface,
Uint32* key)
Function Parameters
surface |
the SDL_Surface structure to query |
key |
a pointer filled in with the transparent pixel |
Return Value
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
If the surface doesn't have color key enabled this function returns -1.
Code Examples
You can add your code example here
Remarks
The color key is a pixel of the format used by the surface as generated by SDL_MapRGB().
