sdlSetPaletteColors function
Set a range of colors in a palette.
\param palette the SDL_Palette structure to modify \param colors an array of SDL_Color structures to copy into the palette \param firstcolor the index of the first palette entry to modify \param ncolors the number of entries to modify \returns 0 on success or a negative error code if not all of the colors could be set; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_AllocPalette \sa SDL_CreateRGBSurface
extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette, const SDL_Color * colors, int firstcolor, int ncolors)
Implementation
int sdlSetPaletteColors(Pointer<SdlPalette> palette, Pointer<SdlColor> colors,
int firstcolor, int ncolors) {
final sdlSetPaletteColorsLookupFunction = libSdl2.lookupFunction<
Int32 Function(Pointer<SdlPalette> palette, Pointer<SdlColor> colors,
Int32 firstcolor, Int32 ncolors),
int Function(Pointer<SdlPalette> palette, Pointer<SdlColor> colors,
int firstcolor, int ncolors)>('SDL_SetPaletteColors');
return sdlSetPaletteColorsLookupFunction(
palette, colors, firstcolor, ncolors);
}