|
Size: 1385
Comment: update formatting - enums, structs, the/an
|
Size: 1361
Comment: update content - 3/10 46bd121b04a2 (2/13 d4381f3b0d1e)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 12: | Line 12: |
| ||<style="color: #808080;">Uint32||<style="color: #808080;">'''version'''||<style="color: #808080;">incrementally tracks changes to the palette (internal use)|| | |
| Line 13: | Line 14: |
| ||<style="color: #808080;">SDL_Palette``Watch*||<style="color: #808080;">'''watch'''||<style="color: #808080;">a list of callbacks called when this palette has changed (internal use)|| |
SDL_Palette
A structure that contains palette information.
Data Fields
int |
ncolors |
the number of colors in the palette |
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().
Related Structures
