sdl2/generated/lib_sdl_pixels library

Functions

sdlAllocFormat(int pixelFormat) Pointer<SdlPixelFormat>
Create an SDL_PixelFormat structure corresponding to a pixel format.
sdlAllocPalette(int ncolors) Pointer<SdlPalette>
Create a palette structure with the specified number of color entries.
sdlCalculateGammaRamp(double gamma, Pointer<Uint16> ramp) → void
Calculate a 256 entry gamma ramp for a gamma value.
sdlFreeFormat(Pointer<SdlPixelFormat> format) → void
Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
sdlFreePalette(Pointer<SdlPalette> palette) → void
Free a palette created with SDL_AllocPalette().
sdlGetPixelFormatName(int format) String?
Get the human readable name of a pixel format.
sdlGetRgb(int pixel, Pointer<SdlPixelFormat> format, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b) → void
Get RGB values from a pixel in the specified format.
sdlGetRgba(int pixel, Pointer<SdlPixelFormat> format, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b, Pointer<Uint8> a) → void
Get RGBA values from a pixel in the specified format.
sdlMapRgb(Pointer<SdlPixelFormat> format, int r, int g, int b) int
Map an RGB triple to an opaque pixel value for a given pixel format.
sdlMapRgba(Pointer<SdlPixelFormat> format, int r, int g, int b, int a) int
Map an RGBA quadruple to a pixel value for a given pixel format.
sdlMasksToPixelFormatEnum(int bpp, int rmask, int gmask, int bmask, int amask) int
Convert a bpp value and RGBA masks to an enumerated pixel format.
sdlPixelFormatEnumToMasks(int format, Pointer<Int32> bpp, Pointer<Uint32> rmask, Pointer<Uint32> gmask, Pointer<Uint32> bmask, Pointer<Uint32> amask) bool
Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
sdlSetPaletteColors(Pointer<SdlPalette> palette, Pointer<SdlColor> colors, int firstcolor, int ncolors) int
Set a range of colors in a palette.
sdlSetPixelFormatPalette(Pointer<SdlPixelFormat> format, Pointer<SdlPalette> palette) int
Set the palette for a pixel format structure.