Wiki Page Content

Differences between revisions 11 and 12
Revision 11 as of 2010-09-03 00:03:32
Size: 1484
Editor: SheenaSmith
Comment: update formatting - categories
Revision 12 as of 2010-09-16 04:32:47
Size: 1357
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 22: Line 21:
*<<BR>>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_SetColors]](). 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]]().
Line 24: Line 23:
<<Color2(green,Is SDL_!SetColors now SDL_SetPaletteColors?)>><<BR>>*

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 colors in the palette

int

refcount

reference count (internal use)

SDL_PaletteWatch*

watch

a list of callbacks called when this palette has changed (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