Wiki Page Content

Differences between revisions 14 and 15
Revision 14 as of 2011-03-11 17:00:25
Size: 1361
Editor: SheenaSmith
Comment: update content - 3/10 46bd121b04a2 (2/13 d4381f3b0d1e)
Revision 15 as of 2014-09-22 17:28:04
Size: 1307
Comment: Removed links to SDL_AddPaletteWatch and SDL_DelPaletteWatch which are not in SDL 2.
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
 .[[SDL_AddPaletteWatch]]
Line 30: Line 29:
 .[[SDL_DelPaletteWatch]]

SDL_Palette

A structure that contains palette information.

Data Fields

int

ncolors

the number of colors in the palette

SDL_Color*

colors

an array of SDL_Color structures representing the palette

Uint32

version

incrementally tracks changes to the palette (internal use)

int

refcount

reference count (internal use)

Code Examples

You can add your code example here

Remarks

Each pixel in an 8-bit surface is an index into the colors field of the SDL_Palette structure stored in SDL_PixelFormat. An SDL_Palette should never need to be created manually. It is automatically created when SDL allocates an SDL_PixelFormat for a surface. The colors values of an SDL_Surface's palette can be set with SDL_SetPaletteColors().


CategoryStruct, CategoryPixels

None: SDL_Palette (last edited 2014-09-22 17:28:04 by PhilippWiesemann)

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