Represents the palette of a surface
Class SDLPalette
Properties | |
colors | MemBuf of 4 byte elements containing each color entry. |
ncolors | number of elements in the palette (equal to colors. |
Methods | |
GetColor | Gets a color in the image palette. |
SetColor | Sets a color in the image palette. |
MemBuf of 4 byte elements containing each color entry.
MemBuf of 4 byte elements containing each color entry.
number of elements in the palette (equal to colors.
number of elements in the palette (equal to colors.len() )
Gets a color in the image palette.
SDLPalette.GetColor( colorIndex, [colArray] )
colorIndex | Index of the color in the palette. | ||
colArray | Array of that will hold red, green and blue values. | ||
Return | an array containing red, green and blue elements. | ||
Raise |
|
An array can be provided as parameter to prevent re-allocation of the returned value.
Sets a color in the image palette.
SDLPalette.SetColor( colorIndex, red, [green],[blue] )
colorIndex | Index of the color in the palette. | ||
red | the Red value of the color to be set, or a three elements array with the three color values. | ||
green | Green value of the element (not needed if red was an array). | ||
blue | Blue value of the element (not needed if red was an array). | ||
Raise |
|
Changes a value in the image palette