sdl.pixels

SDL Pixel Managment

Members

Enums

SDL_ArrayOrder
enum SDL_ArrayOrder

Array component order, low byte -> high byte.

SDL_BitmapOrder
enum SDL_BitmapOrder

Bitmap pixel order, high bit -> low bit.

SDL_ChromaLocation
enum SDL_ChromaLocation

Colorspace chroma sample location.

SDL_ColorPrimaries
enum SDL_ColorPrimaries

Colorspace color primaries, as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en

SDL_ColorRange
enum SDL_ColorRange

Colorspace color range, as described by https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en

SDL_ColorType
enum SDL_ColorType

Colorspace color type.

SDL_Colorspace
enum SDL_Colorspace

Colorspace definitions.

SDL_MatrixCoefficients
enum SDL_MatrixCoefficients

Colorspace matrix coefficients.

SDL_PackedLayout
enum SDL_PackedLayout

Packed component layout.

SDL_PackedOrder
enum SDL_PackedOrder

Packed component order, high bit -> low bit.

SDL_PixelFormat
enum SDL_PixelFormat

Pixel format.

SDL_PixelType
enum SDL_PixelType

Pixel type.

SDL_TransferCharacteristics
enum SDL_TransferCharacteristics

Colorspace transfer characteristics.

Functions

SDL_CreatePalette
SDL_Palette* SDL_CreatePalette(int ncolors)

Create a palette structure with the specified number of color entries.

SDL_DestroyPalette
void SDL_DestroyPalette(SDL_Palette* palette)

Free a palette created with SDL_CreatePalette().

SDL_GetMasksForPixelFormat
bool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, Uint32* Rmask, Uint32* Gmask, Uint32* Bmask, Uint32* Amask)

Convert one of the enumerated pixel formats to a bpp value and RGBA masks.

SDL_GetPixelFormatDetails
const(SDL_PixelFormatDetails)* SDL_GetPixelFormatDetails(SDL_PixelFormat format)

Create an SDL_PixelFormatDetails structure corresponding to a pixel format.

SDL_GetPixelFormatForMasks
SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)

Convert a bpp value and RGBA masks to an enumerated pixel format.

SDL_GetPixelFormatName
const(char)* SDL_GetPixelFormatName(SDL_PixelFormat format)

Get the human readable name of a pixel format.

SDL_GetRGB
void SDL_GetRGB(Uint32 pixel, const(SDL_PixelFormatDetails)* format, const(SDL_Palette)* palette, Uint8* r, Uint8* g, Uint8* b)

Get RGB values from a pixel in the specified format.

SDL_GetRGBA
void SDL_GetRGBA(Uint32 pixel, const(SDL_PixelFormatDetails)* format, const(SDL_Palette)* palette, Uint8* r, Uint8* g, Uint8* b, Uint8* a)

Get RGBA values from a pixel in the specified format.

SDL_MapRGB
Uint32 SDL_MapRGB(const(SDL_PixelFormatDetails)* format, const(SDL_Palette)* palette, Uint8 r, Uint8 g, Uint8 b)

Map an RGB triple to an opaque pixel value for a given pixel format.

SDL_MapRGBA
Uint32 SDL_MapRGBA(const(SDL_PixelFormatDetails)* format, const(SDL_Palette)* palette, Uint8 r, Uint8 g, Uint8 b, Uint8 a)

Map an RGBA quadruple to a pixel value for a given pixel format.

SDL_SetPaletteColors
bool SDL_SetPaletteColors(SDL_Palette* palette, const(SDL_Color)* colors, int firstcolor, int ncolors)

Set a range of colors in a palette.

Manifest constants

SDL_ALPHA_OPAQUE
enum SDL_ALPHA_OPAQUE;

A fully opaque 8-bit alpha value.

SDL_ALPHA_OPAQUE_FLOAT
enum SDL_ALPHA_OPAQUE_FLOAT;

A fully opaque floating point alpha value.

SDL_ALPHA_TRANSPARENT
enum SDL_ALPHA_TRANSPARENT;

A fully transparent 8-bit alpha value.

SDL_ALPHA_TRANSPARENT_FLOAT
enum SDL_ALPHA_TRANSPARENT_FLOAT;

A fully transparent floating point alpha value.

Structs

SDL_Color
struct SDL_Color

A structure that represents a color as RGBA components.

SDL_FColor
struct SDL_FColor

The bits of this structure can be directly reinterpreted as a float-packed color which uses the SDL_PIXELFORMAT_RGBA128_FLOAT format

SDL_Palette
struct SDL_Palette

A set of indexed colors representing a palette.

SDL_PixelFormatDetails
struct SDL_PixelFormatDetails

Details about the format of a pixel.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen