Home ··· Articles ··· Documentation ··· Dev ··· Irc ··· Download ··· About

Index


NAME

Top

SDL::Palette -- Color palette for 8-bit pixel formats

CATEGORY

Top

Core, Video, Structure

DESCRIPTION

Top

Each pixel in an 8-bit surface is an index into the colors field of the SDL::Palette structure store in SDL::PixelFormat. A SDL::Palette should never need to be created manually. It is automatically created when SDL allocates a SDL::PixelFormat for a surface. The colors values of a SDL::Surface's palette can be set with the SDL::Video::set_colors.

METHODS

Top

ncolors ( )

Fetches the number of colors in palette

colors ( index )

Fetches an array of colors in palette

color_index ( index )

Fetches the SDL_Color at the provide index in palette

SEE ALSO

Top

AUTHORS

Top

©2009. designed by FROGGS, hosted by mst, maintained by kthakore