SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
Pixel Formats and Conversion Routines

SDL offers facilities for pixel management. More...

Collaboration diagram for Pixel Formats and Conversion Routines:

Classes

struct  SDL::PaletteParam
 Safely wrap Palette for non owning parameters. More...
 
struct  SDL::PaletteConstParam
 Safely wrap Palette for non owning const parameters. More...
 
class  SDL::PixelFormat
 Pixel format. More...
 
class  SDL::Colorspace
 Colorspace definitions. More...
 
struct  SDL::Color
 A structure that represents a color as RGBA components. More...
 
struct  SDL::FColor
 The bits of this structure can be directly reinterpreted as a float-packed color which uses the PIXELFORMAT_RGBA128_FLOAT format. More...
 
class  SDL::Palette
 A set of indexed colors representing a palette. More...
 

Typedefs

using SDL::PixelFormatRaw = SDL_PixelFormat
 Alias to raw representation for PixelFormat.
 
using SDL::ColorspaceRaw = SDL_Colorspace
 Alias to raw representation for Colorspace.
 
using SDL::ColorRaw = SDL_Color
 Alias to raw representation for Color.
 
using SDL::FColorRaw = SDL_FColor
 Alias to raw representation for FColor.
 
using SDL::PaletteRaw = SDL_Palette *
 Alias to raw representation for Palette.
 
using SDL::PixelFormatDetails = SDL_PixelFormatDetails
 Details about the format of a pixel. More...
 

Functions

constexpr Uint32 SDL::DefinePixelFourCC (Uint8 A, Uint8 B, Uint8 C, Uint8 D)
 A function for defining custom FourCC pixel formats. More...
 
constexpr PixelFormat SDL::DefinePixelFormat (PixelType type, int order, PackedLayout layout, int bits, int bytes)
 A macro for defining custom non-FourCC pixel formats. More...
 
constexpr Uint8 SDL::PixelFormatFlags (PixelFormatRaw format)
 Retrieve the flags of an PixelFormat. More...
 
constexpr PixelType SDL::PixelFormatType (PixelFormatRaw format)
 A macro to retrieve the type of an PixelFormat. More...
 
constexpr int SDL::PixelFormatOrder (PixelFormatRaw format)
 A macro to retrieve the order of an PixelFormat. More...
 
constexpr PackedLayout SDL::PixelFormatLayout (PixelFormatRaw format)
 A macro to retrieve the layout of an PixelFormat. More...
 
constexpr int SDL::PixelFormatBitsPerPixel (PixelFormatRaw format)
 A macro to determine an PixelFormat's bits per pixel. More...
 
constexpr int SDL::PixelFormatBytesPerPixel (PixelFormatRaw format)
 A macro to determine an PixelFormat's bytes per pixel. More...
 
constexpr bool SDL::IsPixelFormatIndexed (PixelFormatRaw format)
 A macro to determine if an PixelFormat is an indexed format. More...
 
constexpr bool SDL::IsPixelFormatPacked (PixelFormatRaw format)
 A macro to determine if an PixelFormat is a packed format. More...
 
constexpr bool SDL::IsPixelFormatArray (PixelFormatRaw format)
 A macro to determine if an PixelFormat is an array format. More...
 
constexpr bool SDL::IsPixelFormat10Bit (PixelFormatRaw format)
 A macro to determine if an PixelFormat is a 10-bit format. More...
 
constexpr bool SDL::IsPixelFormatFloat (PixelFormatRaw format)
 A macro to determine if an PixelFormat is a floating point format. More...
 
constexpr Colorspace SDL::DefineColorspace (ColorType type, ColorRange range, ColorPrimaries primaries, TransferCharacteristics transfer, MatrixCoefficients matrix, ChromaLocation chroma)
 A macro for defining custom Colorspace formats. More...
 
constexpr ColorType SDL::ColorspaceType (ColorspaceRaw cspace)
 A macro to retrieve the type of an Colorspace. More...
 
constexpr ColorRange SDL::ColorspaceRange (ColorspaceRaw cspace)
 A macro to retrieve the range of an Colorspace. More...
 
constexpr ChromaLocation SDL::ColorspaceChroma (ColorspaceRaw cspace)
 A macro to retrieve the chroma sample location of an Colorspace. More...
 
constexpr ColorPrimaries SDL::ColorspacePrimaries (ColorspaceRaw cspace)
 A macro to retrieve the primaries of an Colorspace. More...
 
constexpr TransferCharacteristics SDL::ColorspaceTransfer (ColorspaceRaw cspace)
 A macro to retrieve the transfer characteristics of an Colorspace. More...
 
constexpr MatrixCoefficients SDL::ColorspaceMatrix (ColorspaceRaw cspace)
 A macro to retrieve the matrix coefficients of an Colorspace. More...
 
constexpr bool SDL::IsColorspaceMatrixBT601 (ColorspaceRaw cspace)
 A macro to determine if an Colorspace uses BT601 (or BT470BG) matrix coefficients. More...
 
constexpr bool SDL::IsColorspaceMatrixBT709 (ColorspaceRaw cspace)
 A macro to determine if an Colorspace uses BT709 matrix coefficients. More...
 
constexpr bool SDL::IsColorspaceMatrixBT2020_NCL (ColorspaceRaw cspace)
 A macro to determine if an Colorspace uses BT2020_NCL matrix coefficients. More...
 
constexpr bool SDL::IsColorspaceLimitedRange (ColorspaceRaw cspace)
 A macro to determine if an Colorspace has a limited range. More...
 
constexpr bool SDL::IsColorspaceFullRange (ColorspaceRaw cspace)
 A macro to determine if an Colorspace has a full range. More...
 
constexpr bool SDL::operator== (ColorRaw lhs, ColorRaw rhs)
 Comparison operator for Color.
 
constexpr bool SDL::operator== (const FColorRaw &lhs, const FColorRaw &rhs)
 Comparison operator for FColor.
 
constexpr auto SDL::operator<=> (ColorRaw lhs, ColorRaw rhs)
 Spaceship operator for Color.
 
constexpr auto SDL::operator<=> (const FColorRaw &lhs, const FColorRaw &rhs)
 Spaceship operator for FColor.
 
const char * SDL::GetPixelFormatName (PixelFormatRaw format)
 Get the human readable name of a pixel format. More...
 
void SDL::GetMasksForPixelFormat (PixelFormatRaw 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. More...
 
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. More...
 
const PixelFormatDetailsSDL::GetPixelFormatDetails (PixelFormatRaw format)
 Create an PixelFormatDetails structure corresponding to a pixel format. More...
 
Palette SDL::CreatePalette (int ncolors)
 Create a palette structure with the specified number of color entries. More...
 
void SDL::SetPaletteColors (PaletteParam palette, SpanRef< const ColorRaw > colors, int firstcolor=0)
 Set a range of colors in a palette. More...
 
void SDL::DestroyPalette (PaletteRaw palette)
 Free a palette created with Palette.Palette(). More...
 
Uint32 SDL::MapRGB (const PixelFormatDetails &format, PaletteConstParam palette, Uint8 r, Uint8 g, Uint8 b)
 Map an RGB triple to an opaque pixel value for a given pixel format. More...
 
Uint32 SDL::MapRGBA (const PixelFormatDetails &format, Uint8 r, Uint8 g, Uint8 b, Uint8 a, PaletteConstParam palette={})
 Map an RGBA quadruple to a pixel value for a given pixel format. More...
 
Uint32 SDL::MapColor (const PixelFormatDetails &format, ColorRaw c, PaletteConstParam palette={})
 Map an RGBA quadruple to a pixel value for a given pixel format. More...
 
void SDL::GetRGB (Uint32 pixel, const PixelFormatDetails &format, PaletteConstParam palette, Uint8 *r, Uint8 *g, Uint8 *b)
 Get RGB values from a pixel in the specified format. More...
 
void SDL::GetRGBA (Uint32 pixel, const PixelFormatDetails &format, PaletteConstParam palette, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 Get RGBA values from a pixel in the specified format. More...
 
Color SDL::GetColor (Uint32 pixel, const PixelFormatDetails &format, PaletteConstParam palette={})
 Get RGBA values from a pixel in the specified format. More...
 
constexpr Uint8 SDL::PixelFormat::GetFlags () const
 Retrieve the flags of an PixelFormat. More...
 
constexpr PixelType SDL::PixelFormat::GetType () const
 Retrieve the type. More...
 
constexpr int SDL::PixelFormat::GetOrder () const
 Retrieve the order. More...
 
constexpr PackedLayout SDL::PixelFormat::GetLayout () const
 Retrieve the layout. More...
 
constexpr int SDL::PixelFormat::GetBitsPerPixel () const
 Determine this's bits per pixel. More...
 
constexpr int SDL::PixelFormat::GetBytesPerPixel () const
 Determine this's bytes per pixel. More...
 
constexpr bool SDL::PixelFormat::IsIndexed () const
 Determine if this is an indexed format. More...
 
constexpr bool SDL::PixelFormat::IsPacked () const
 Determine if this is a packed format. More...
 
constexpr bool SDL::PixelFormat::IsArray () const
 Determine if this is an array format. More...
 
constexpr bool SDL::PixelFormat::Is10Bit () const
 Determine if this is a 10-bit format. More...
 
constexpr bool SDL::PixelFormat::IsFloat () const
 Determine if this is a floating point format. More...
 
constexpr ColorType SDL::Colorspace::GetType () const
 Retrieve the type of a Colorspace. More...
 
constexpr ColorRange SDL::Colorspace::GetRange () const
 Retrieve the range of a Colorspace. More...
 
constexpr ChromaLocation SDL::Colorspace::GetChroma () const
 Retrieve the chroma sample location of an Colorspace. More...
 
constexpr ColorPrimaries SDL::Colorspace::GetPrimaries () const
 Retrieve the primaries of an Colorspace. More...
 
constexpr TransferCharacteristics SDL::Colorspace::GetTransfer () const
 Retrieve the transfer characteristics of an Colorspace. More...
 
constexpr MatrixCoefficients SDL::Colorspace::GetMatrix () const
 Retrieve the matrix coefficients of an Colorspace. More...
 
constexpr bool SDL::Colorspace::IsMatrixBT601 () const
 Determine if a Colorspace uses BT601 (or BT470BG) matrix coefficients. More...
 
constexpr bool SDL::Colorspace::IsMatrixBT709 () const
 Determine if an Colorspace uses BT709 matrix coefficients. More...
 
constexpr bool SDL::Colorspace::IsMatrixBT2020_NCL () const
 Determine if an Colorspace uses BT2020_NCL matrix coefficients. More...
 
constexpr bool SDL::Colorspace::IsLimitedRange () const
 A function to determine if an Colorspace has a limited range. More...
 
constexpr bool SDL::Colorspace::IsFullRange () const
 A function to determine if an Colorspace has a full range. More...
 
const char * SDL::PixelFormat::GetName () const
 Get the human readable name of a pixel format. More...
 
void SDL::PixelFormat::GetMasks (int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask) const
 Convert one of the enumerated pixel formats to a bpp value and RGBA masks. More...
 
static PixelFormat SDL::PixelFormat::ForMasks (int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 Convert a bpp value and RGBA masks to an enumerated pixel format. More...
 
const PixelFormatDetailsSDL::PixelFormat::GetDetails () const
 Create an PixelFormatDetails structure corresponding to a pixel format. More...
 
 SDL::PixelFormat::operator const PixelFormatDetails & () const
 Same as GetDetails()
 
void SDL::Palette::SetColors (SpanRef< const ColorRaw > colors, int firstcolor=0)
 Set a range of colors in a palette. More...
 
void SDL::Palette::Destroy ()
 Free a palette created with Palette.Palette(). More...
 
Uint32 SDL::Color::Map (const PixelFormatDetails &format, PaletteConstParam palette) const
 Map an RGBA quadruple to a pixel value for a given pixel format. More...
 
Uint32 SDL::PixelFormat::Map (ColorRaw c, PaletteConstParam palette={}) const
 Map an RGBA quadruple to a pixel value for a given pixel format. More...
 
static Color SDL::Color::Get (Uint32 pixel, const PixelFormatDetails &format, PaletteConstParam palette)
 Get RGBA values from a pixel in the specified format. More...
 
Color SDL::PixelFormat::Get (Uint32 pixel, PaletteConstParam palette={}) const
 Get RGBA values from a pixel in the specified format. More...
 

Variables

constexpr Uint8 SDL::ALPHA_OPAQUE = SDL_ALPHA_OPAQUE
 A fully opaque 8-bit alpha value. More...
 
constexpr float SDL::ALPHA_OPAQUE_FLOAT = SDL_ALPHA_OPAQUE_FLOAT
 A fully opaque floating point alpha value. More...
 
constexpr Uint8 SDL::ALPHA_TRANSPARENT = SDL_ALPHA_TRANSPARENT
 A fully transparent 8-bit alpha value. More...
 
constexpr float SDL::ALPHA_TRANSPARENT_FLOAT = SDL_ALPHA_TRANSPARENT_FLOAT
 A fully transparent floating point alpha value. More...
 

PixelTypes

Pixel type.

using SDL::PixelType = SDL_PixelType
 Pixel type. More...
 
constexpr PixelType SDL::PIXELTYPE_UNKNOWN = SDL_PIXELTYPE_UNKNOWN
 UNKNOWN.
 
constexpr PixelType SDL::PIXELTYPE_INDEX1 = SDL_PIXELTYPE_INDEX1
 INDEX1.
 
constexpr PixelType SDL::PIXELTYPE_INDEX4 = SDL_PIXELTYPE_INDEX4
 INDEX4.
 
constexpr PixelType SDL::PIXELTYPE_INDEX8 = SDL_PIXELTYPE_INDEX8
 INDEX8.
 
constexpr PixelType SDL::PIXELTYPE_PACKED8 = SDL_PIXELTYPE_PACKED8
 PACKED8.
 
constexpr PixelType SDL::PIXELTYPE_PACKED16 = SDL_PIXELTYPE_PACKED16
 PACKED16.
 
constexpr PixelType SDL::PIXELTYPE_PACKED32 = SDL_PIXELTYPE_PACKED32
 PACKED32.
 
constexpr PixelType SDL::PIXELTYPE_ARRAYU8 = SDL_PIXELTYPE_ARRAYU8
 ARRAYU8.
 
constexpr PixelType SDL::PIXELTYPE_ARRAYU16 = SDL_PIXELTYPE_ARRAYU16
 ARRAYU16.
 
constexpr PixelType SDL::PIXELTYPE_ARRAYU32 = SDL_PIXELTYPE_ARRAYU32
 ARRAYU32.
 
constexpr PixelType SDL::PIXELTYPE_ARRAYF16 = SDL_PIXELTYPE_ARRAYF16
 ARRAYF16.
 
constexpr PixelType SDL::PIXELTYPE_ARRAYF32 = SDL_PIXELTYPE_ARRAYF32
 ARRAYF32.
 
constexpr PixelType SDL::PIXELTYPE_INDEX2 = SDL_PIXELTYPE_INDEX2
 INDEX2.
 

BitmapOrders

using SDL::BitmapOrder = SDL_BitmapOrder
 Bitmap pixel order, high bit -> low bit. More...
 
constexpr BitmapOrder SDL::BITMAPORDER_NONE = SDL_BITMAPORDER_NONE
 NONE.
 
constexpr BitmapOrder SDL::BITMAPORDER_4321 = SDL_BITMAPORDER_4321
 4321
 
constexpr BitmapOrder SDL::BITMAPORDER_1234 = SDL_BITMAPORDER_1234
 1234
 

PackedOrders

using SDL::PackedOrder = SDL_PackedOrder
 Packed component order, high bit -> low bit. More...
 
constexpr PackedOrder SDL::PACKEDORDER_NONE = SDL_PACKEDORDER_NONE
 NONE.
 
constexpr PackedOrder SDL::PACKEDORDER_XRGB = SDL_PACKEDORDER_XRGB
 XRGB.
 
constexpr PackedOrder SDL::PACKEDORDER_RGBX = SDL_PACKEDORDER_RGBX
 RGBX.
 
constexpr PackedOrder SDL::PACKEDORDER_ARGB = SDL_PACKEDORDER_ARGB
 ARGB.
 
constexpr PackedOrder SDL::PACKEDORDER_RGBA = SDL_PACKEDORDER_RGBA
 RGBA.
 
constexpr PackedOrder SDL::PACKEDORDER_XBGR = SDL_PACKEDORDER_XBGR
 XBGR.
 
constexpr PackedOrder SDL::PACKEDORDER_BGRX = SDL_PACKEDORDER_BGRX
 BGRX.
 
constexpr PackedOrder SDL::PACKEDORDER_ABGR = SDL_PACKEDORDER_ABGR
 ABGR.
 
constexpr PackedOrder SDL::PACKEDORDER_BGRA = SDL_PACKEDORDER_BGRA
 BGRA.
 

ArrayOrders

using SDL::ArrayOrder = SDL_ArrayOrder
 Array component order, low byte -> high byte. More...
 
constexpr ArrayOrder SDL::ARRAYORDER_NONE = SDL_ARRAYORDER_NONE
 NONE.
 
constexpr ArrayOrder SDL::ARRAYORDER_RGB = SDL_ARRAYORDER_RGB
 RGB.
 
constexpr ArrayOrder SDL::ARRAYORDER_RGBA = SDL_ARRAYORDER_RGBA
 RGBA.
 
constexpr ArrayOrder SDL::ARRAYORDER_ARGB = SDL_ARRAYORDER_ARGB
 ARGB.
 
constexpr ArrayOrder SDL::ARRAYORDER_BGR = SDL_ARRAYORDER_BGR
 BGR.
 
constexpr ArrayOrder SDL::ARRAYORDER_BGRA = SDL_ARRAYORDER_BGRA
 BGRA.
 
constexpr ArrayOrder SDL::ARRAYORDER_ABGR = SDL_ARRAYORDER_ABGR
 ABGR.
 

PackedLayouts

using SDL::PackedLayout = SDL_PackedLayout
 Packed component layout. More...
 
constexpr PackedLayout SDL::PACKEDLAYOUT_NONE = SDL_PACKEDLAYOUT_NONE
 NONE.
 
constexpr PackedLayout SDL::PACKEDLAYOUT_332 = SDL_PACKEDLAYOUT_332
 332
 
constexpr PackedLayout SDL::PACKEDLAYOUT_4444 = SDL_PACKEDLAYOUT_4444
 4444
 
constexpr PackedLayout SDL::PACKEDLAYOUT_1555 = SDL_PACKEDLAYOUT_1555
 1555
 
constexpr PackedLayout SDL::PACKEDLAYOUT_5551 = SDL_PACKEDLAYOUT_5551
 5551
 
constexpr PackedLayout SDL::PACKEDLAYOUT_565 = SDL_PACKEDLAYOUT_565
 565
 
constexpr PackedLayout SDL::PACKEDLAYOUT_8888 = SDL_PACKEDLAYOUT_8888
 8888
 
constexpr PackedLayout SDL::PACKEDLAYOUT_2101010
 2101010 More...
 
constexpr PackedLayout SDL::PACKEDLAYOUT_1010102
 1010102 More...
 

ColorTypes

using SDL::ColorType = SDL_ColorType
 Colorspace color type. More...
 
constexpr ColorType SDL::COLOR_TYPE_UNKNOWN
 COLOR_TYPE_UNKNOWN. More...
 
constexpr ColorType SDL::COLOR_TYPE_RGB = SDL_COLOR_TYPE_RGB
 COLOR_TYPE_RGB.
 
constexpr ColorType SDL::COLOR_TYPE_YCBCR
 COLOR_TYPE_YCBCR. More...
 
constexpr bool SDL::IsPixelFormatAlpha (PixelFormatRaw format)
 A macro to determine if an PixelFormat has an alpha channel. More...
 
constexpr bool SDL::IsPixelFormatFourCC (PixelFormatRaw format)
 A macro to determine if an PixelFormat is a "FourCC" format. More...
 
constexpr bool SDL::PixelFormat::IsAlpha () const
 Determine if this has an alpha channel. More...
 
constexpr bool SDL::PixelFormat::IsFourCC () const
 Determine if this is a "FourCC" format. More...
 

ColorRanges

using SDL::ColorRange = SDL_ColorRange
 Colorspace color range, as described by https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en. More...
 
constexpr ColorRange SDL::COLOR_RANGE_UNKNOWN
 COLOR_RANGE_UNKNOWN. More...
 
constexpr ColorRange SDL::COLOR_RANGE_LIMITED = SDL_COLOR_RANGE_LIMITED
 Narrow range, e.g. More...
 
constexpr ColorRange SDL::COLOR_RANGE_FULL = SDL_COLOR_RANGE_FULL
 Full range, e.g. 0-255 for 8-bit RGB and luma, and 1-255 for 8-bit chroma.
 

ColorPrimaries

using SDL::ColorPrimaries = SDL_ColorPrimaries
 Colorspace color primaries, as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_UNKNOWN
 COLOR_PRIMARIES_UNKNOWN. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT709
 ITU-R BT.709-6. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_UNSPECIFIED
 COLOR_PRIMARIES_UNSPECIFIED. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT470M
 ITU-R BT.470-6 System M. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT470BG
 ITU-R BT.470-6 System B, G / ITU-R BT.601-7. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT601
 ITU-R BT.601-7 525, SMPTE 170M. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE240
 SMPTE 240M, functionally the same as COLOR_PRIMARIES_BT601. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_GENERIC_FILM
 Generic film (color filters using Illuminant C) More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT2020
 ITU-R BT.2020-2 / ITU-R BT.2100-0. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_XYZ
 SMPTE ST 428-1. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE431
 SMPTE RP 431-2. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE432
 SMPTE EG 432-1 / DCI P3. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_EBU3213
 EBU Tech. 3213-E. More...
 
constexpr ColorPrimaries SDL::COLOR_PRIMARIES_CUSTOM
 COLOR_PRIMARIES_CUSTOM. More...
 

TransferCharacteristics

using SDL::TransferCharacteristics = SDL_TransferCharacteristics
 Colorspace transfer characteristics. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_UNKNOWN
 TRANSFER_CHARACTERISTICS_UNKNOWN. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT709
 Rec. ITU-R BT.709-6 / ITU-R BT1361. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_UNSPECIFIED
 TRANSFER_CHARACTERISTICS_UNSPECIFIED. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_GAMMA22
 ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_GAMMA28
 ITU-R BT.470-6 System B, G. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT601
 SMPTE ST 170M / ITU-R BT.601-7 525 or. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SMPTE240
 SMPTE ST 240M. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LINEAR
 TRANSFER_CHARACTERISTICS_LINEAR. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LOG100
 TRANSFER_CHARACTERISTICS_LOG100. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LOG100_SQRT10
 TRANSFER_CHARACTERISTICS_LOG100_SQRT10. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_IEC61966
 IEC 61966-2-4. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT1361
 ITU-R BT1361 Extended Colour Gamut. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SRGB
 IEC 61966-2-1 (sRGB or sYCC) More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT2020_10BIT
 ITU-R BT2020 for 10-bit system. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT2020_12BIT
 ITU-R BT2020 for 12-bit system. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_PQ
 SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SMPTE428
 SMPTE ST 428-1. More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_HLG
 ARIB STD-B67, known as "hybrid log-gamma" (HLG) More...
 
constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_CUSTOM
 TRANSFER_CHARACTERISTICS_CUSTOM. More...
 

MatrixCoefficients

using SDL::MatrixCoefficients = SDL_MatrixCoefficients
 Colorspace matrix coefficients. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_IDENTITY
 MATRIX_COEFFICIENTS_IDENTITY. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT709
 ITU-R BT.709-6. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_UNSPECIFIED
 MATRIX_COEFFICIENTS_UNSPECIFIED. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_FCC
 US FCC Title 47. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT470BG
 ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as MATRIX_COEFFICIENTS_BT601. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT601
 ITU-R BT.601-7 525. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_SMPTE240
 SMPTE 240M. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_YCGCO
 MATRIX_COEFFICIENTS_YCGCO. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT2020_NCL
 ITU-R BT.2020-2 non-constant luminance. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT2020_CL
 ITU-R BT.2020-2 constant luminance. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_SMPTE2085
 SMPTE ST 2085. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL
 MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL
 MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_ICTCP
 ITU-R BT.2100-0 ICTCP. More...
 
constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CUSTOM
 MATRIX_COEFFICIENTS_CUSTOM. More...
 

ChromaLocations

using SDL::ChromaLocation = SDL_ChromaLocation
 Colorspace chroma sample location. More...
 
constexpr ChromaLocation SDL::CHROMA_LOCATION_NONE
 RGB, no chroma sampling. More...
 
constexpr ChromaLocation SDL::CHROMA_LOCATION_LEFT = SDL_CHROMA_LOCATION_LEFT
 In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. More...
 
constexpr ChromaLocation SDL::CHROMA_LOCATION_CENTER = SDL_CHROMA_LOCATION_CENTER
 In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. More...
 
constexpr ChromaLocation SDL::CHROMA_LOCATION_TOPLEFT = SDL_CHROMA_LOCATION_TOPLEFT
 In HEVC for BT.2020 and BT.2100 content (in particular on Blu-rays), Cb and Cr are sampled at the same location as the group's top-left Y pixel ("co-sited", "co-located").
 

PixelFormats

constexpr PixelFormat SDL::PIXELFORMAT_UNKNOWN
 UNKNOWN. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX1LSB
 INDEX1LSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX1MSB
 INDEX1MSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX2LSB
 INDEX2LSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX2MSB
 INDEX2MSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX4LSB
 INDEX4LSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX4MSB
 INDEX4MSB. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_INDEX8 = SDL_PIXELFORMAT_INDEX8
 INDEX8.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB332 = SDL_PIXELFORMAT_RGB332
 RGB332.
 
constexpr PixelFormat SDL::PIXELFORMAT_XRGB4444
 XRGB4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XBGR4444
 XBGR4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XRGB1555
 XRGB1555. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XBGR1555
 XBGR1555. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB4444
 ARGB4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA4444
 RGBA4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR4444
 ABGR4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA4444
 BGRA4444. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB1555
 ARGB1555. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA5551
 RGBA5551. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR1555
 ABGR1555. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA5551
 BGRA5551. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB565 = SDL_PIXELFORMAT_RGB565
 RGB565.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGR565 = SDL_PIXELFORMAT_BGR565
 BGR565.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB24 = SDL_PIXELFORMAT_RGB24
 RGB24.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGR24 = SDL_PIXELFORMAT_BGR24
 BGR24.
 
constexpr PixelFormat SDL::PIXELFORMAT_XRGB8888
 XRGB8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBX8888
 RGBX8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XBGR8888
 XBGR8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRX8888
 BGRX8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB8888
 ARGB8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA8888
 RGBA8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR8888
 ABGR8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA8888
 BGRA8888. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XRGB2101010
 XRGB2101010. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_XBGR2101010
 XBGR2101010. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB2101010
 ARGB2101010. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR2101010
 ABGR2101010. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB48 = SDL_PIXELFORMAT_RGB48
 RGB48.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGR48 = SDL_PIXELFORMAT_BGR48
 BGR48.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA64 = SDL_PIXELFORMAT_RGBA64
 RGBA64.
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB64 = SDL_PIXELFORMAT_ARGB64
 ARGB64.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA64 = SDL_PIXELFORMAT_BGRA64
 BGRA64.
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR64 = SDL_PIXELFORMAT_ABGR64
 ABGR64.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB48_FLOAT
 RGB48_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGR48_FLOAT
 BGR48_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA64_FLOAT
 RGBA64_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB64_FLOAT
 ARGB64_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA64_FLOAT
 BGRA64_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR64_FLOAT
 ABGR64_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGB96_FLOAT
 RGB96_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGR96_FLOAT
 BGR96_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA128_FLOAT
 RGBA128_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB128_FLOAT
 ARGB128_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA128_FLOAT
 BGRA128_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR128_FLOAT
 ABGR128_FLOAT. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_YV12
 Planar mode: Y + V + U (3 planes) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_IYUV
 Planar mode: Y + U + V (3 planes) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_YUY2
 Packed mode: Y0+U0+Y1+V0 (1 plane) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_UYVY
 Packed mode: U0+Y0+V0+Y1 (1 plane) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_YVYU
 Packed mode: Y0+V0+Y1+U0 (1 plane) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_NV12
 Planar mode: Y + U/V interleaved (2 planes) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_NV21
 Planar mode: Y + V/U interleaved (2 planes) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_P010
 Planar mode: Y + U/V interleaved (2 planes) More...
 
constexpr PixelFormat SDL::PIXELFORMAT_EXTERNAL_OES
 Android video texture format. More...
 
constexpr PixelFormat SDL::PIXELFORMAT_MJPG = SDL_PIXELFORMAT_MJPG
 Motion JPEG.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA32
 RGBA32.
 
constexpr PixelFormat SDL::PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB32
 ARGB32.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA32
 BGRA32.
 
constexpr PixelFormat SDL::PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR32
 ABGR32.
 
constexpr PixelFormat SDL::PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_RGBX32
 RGBX32.
 
constexpr PixelFormat SDL::PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_XRGB32
 XRGB32.
 
constexpr PixelFormat SDL::PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_BGRX32
 BGRX32.
 
constexpr PixelFormat SDL::PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_XBGR32
 XBGR32.
 

Colorspaces

constexpr Colorspace SDL::COLORSPACE_UNKNOWN = SDL_COLORSPACE_UNKNOWN
 UNKNOWN.
 
constexpr Colorspace SDL::COLORSPACE_SRGB = SDL_COLORSPACE_SRGB
 Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709.
 
constexpr Colorspace SDL::COLORSPACE_SRGB_LINEAR = SDL_COLORSPACE_SRGB_LINEAR
 Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709.
 
constexpr Colorspace SDL::COLORSPACE_HDR10 = SDL_COLORSPACE_HDR10
 Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020.
 
constexpr Colorspace SDL::COLORSPACE_JPEG = SDL_COLORSPACE_JPEG
 Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601.
 
constexpr Colorspace SDL::COLORSPACE_BT601_LIMITED = SDL_COLORSPACE_BT601_LIMITED
 Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601.
 
constexpr Colorspace SDL::COLORSPACE_BT601_FULL = SDL_COLORSPACE_BT601_FULL
 Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601.
 
constexpr Colorspace SDL::COLORSPACE_BT709_LIMITED = SDL_COLORSPACE_BT709_LIMITED
 Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709.
 
constexpr Colorspace SDL::COLORSPACE_BT709_FULL = SDL_COLORSPACE_BT709_FULL
 Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709.
 
constexpr Colorspace SDL::COLORSPACE_BT2020_LIMITED = SDL_COLORSPACE_BT2020_LIMITED
 Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020.
 
constexpr Colorspace SDL::COLORSPACE_BT2020_FULL = SDL_COLORSPACE_BT2020_FULL
 Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020.
 
constexpr Colorspace SDL::COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_RGB_DEFAULT
 The default colorspace for RGB surfaces if no colorspace is specified.
 
constexpr Colorspace SDL::COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_YUV_DEFAULT
 The default colorspace for YUV surfaces if no colorspace is specified.
 

Detailed Description

Largely these facilities deal with pixel format: what does this set of bits represent?

If you mostly want to think of a pixel as some combination of red, green, blue, and maybe alpha intensities, this is all pretty straightforward, and in many cases, is enough information to build a perfectly fine game.

However, the actual definition of a pixel is more complex than that:

Pixels are a representation of a color in a particular color space.

The first characteristic of a color space is the color type. SDL understands two different color types, RGB and YCbCr, or in SDL also referred to as YUV.

RGB colors consist of red, green, and blue channels of color that are added together to represent the colors we see on the screen.

https://en.wikipedia.org/wiki/RGB_color_model

YCbCr colors represent colors as a Y luma brightness component and red and blue chroma color offsets. This color representation takes advantage of the fact that the human eye is more sensitive to brightness than the color in an image. The Cb and Cr components are often compressed and have lower resolution than the luma component.

https://en.wikipedia.org/wiki/YCbCr

When the color information in YCbCr is compressed, the Y pixels are left at full resolution and each Cr and Cb pixel represents an average of the color information in a block of Y pixels. The chroma location determines where in that block of pixels the color information is coming from.

The color range defines how much of the pixel to use when converting a pixel into a color on the display. When the full color range is used, the entire numeric range of the pixel bits is significant. When narrow color range is used, for historical reasons, the pixel uses only a portion of the numeric range to represent colors.

The color primaries and white point are a definition of the colors in the color space relative to the standard XYZ color space.

https://en.wikipedia.org/wiki/CIE_1931_color_space

The transfer characteristic, or opto-electrical transfer function (OETF), is the way a color is converted from mathematically linear space into a non-linear output signals.

https://en.wikipedia.org/wiki/Rec._709#Transfer_characteristics

The matrix coefficients are used to convert between YCbCr and RGB colors.

Typedef Documentation

◆ ArrayOrder

using SDL::ArrayOrder = typedef SDL_ArrayOrder
Since
This enum is available since SDL 3.2.0.

◆ BitmapOrder

using SDL::BitmapOrder = typedef SDL_BitmapOrder
Since
This enum is available since SDL 3.2.0.

◆ ChromaLocation

using SDL::ChromaLocation = typedef SDL_ChromaLocation
Since
This enum is available since SDL 3.2.0.

◆ ColorPrimaries

using SDL::ColorPrimaries = typedef SDL_ColorPrimaries
Since
This enum is available since SDL 3.2.0.

◆ ColorRange

using SDL::ColorRange = typedef SDL_ColorRange
Since
This enum is available since SDL 3.2.0.

◆ ColorType

using SDL::ColorType = typedef SDL_ColorType
Since
This enum is available since SDL 3.2.0.

◆ MatrixCoefficients

using SDL::MatrixCoefficients = typedef SDL_MatrixCoefficients

These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en

Since
This enum is available since SDL 3.2.0.

◆ PackedLayout

using SDL::PackedLayout = typedef SDL_PackedLayout
Since
This enum is available since SDL 3.2.0.

◆ PackedOrder

using SDL::PackedOrder = typedef SDL_PackedOrder
Since
This enum is available since SDL 3.2.0.

◆ PixelFormatDetails

using SDL::PixelFormatDetails = typedef SDL_PixelFormatDetails
Since
This struct is available since SDL 3.2.0.

◆ PixelType

using SDL::PixelType = typedef SDL_PixelType
Since
This enum is available since SDL 3.2.0.

◆ TransferCharacteristics

using SDL::TransferCharacteristics = typedef SDL_TransferCharacteristics

These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en

Since
This enum is available since SDL 3.2.0.

Function Documentation

◆ ColorspaceChroma()

constexpr ChromaLocation SDL::ColorspaceChroma ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the ChromaLocation of cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ ColorspaceMatrix()

constexpr MatrixCoefficients SDL::ColorspaceMatrix ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the MatrixCoefficients of cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ ColorspacePrimaries()

constexpr ColorPrimaries SDL::ColorspacePrimaries ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the ColorPrimaries of cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ ColorspaceRange()

constexpr ColorRange SDL::ColorspaceRange ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the ColorRange of cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ ColorspaceTransfer()

constexpr TransferCharacteristics SDL::ColorspaceTransfer ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the TransferCharacteristics of cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ ColorspaceType()

constexpr ColorType SDL::ColorspaceType ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
the ColorType for cspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ CreatePalette()

Palette SDL::CreatePalette ( int  ncolors)
inline

The palette entries are initialized to white.

Parameters
ncolorsrepresents the number of color entries in the color palette.
Returns
a new Palette structure on success.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
Palette.Destroy
Palette.SetColors
Surface.SetPalette

◆ DefineColorspace()

constexpr Colorspace SDL::DefineColorspace ( ColorType  type,
ColorRange  range,
ColorPrimaries  primaries,
TransferCharacteristics  transfer,
MatrixCoefficients  matrix,
ChromaLocation  chroma 
)
constexpr

For example, defining COLORSPACE_SRGB looks like this:

Colorspace definitions.
Definition: SDL3pp_pixels.h:1660
constexpr Colorspace(ColorspaceRaw cspace={})
Wraps Colorspace.
Definition: SDL3pp_pixels.h:1669
constexpr ColorPrimaries COLOR_PRIMARIES_BT709
ITU-R BT.709-6.
Definition: SDL3pp_pixels.h:1409
constexpr TransferCharacteristics TRANSFER_CHARACTERISTICS_SRGB
IEC 61966-2-1 (sRGB or sYCC)
Definition: SDL3pp_pixels.h:1505
constexpr ColorType COLOR_TYPE_RGB
COLOR_TYPE_RGB.
Definition: SDL3pp_pixels.h:1360
constexpr ColorRange COLOR_RANGE_FULL
Full range, e.g. 0-255 for 8-bit RGB and luma, and 1-255 for 8-bit chroma.
Definition: SDL3pp_pixels.h:1389
constexpr ChromaLocation CHROMA_LOCATION_NONE
RGB, no chroma sampling.
Definition: SDL3pp_pixels.h:1610
constexpr MatrixCoefficients MATRIX_COEFFICIENTS_IDENTITY
MATRIX_COEFFICIENTS_IDENTITY.
Definition: SDL3pp_pixels.h:1546
Parameters
typethe type of the new format, probably an ColorType value.
rangethe range of the new format, probably a ColorRange value.
primariesthe primaries of the new format, probably an ColorPrimaries value.
transferthe transfer characteristics of the new format, probably an TransferCharacteristics value.
matrixthe matrix coefficients of the new format, probably an MatrixCoefficients value.
chromathe chroma sample location of the new format, probably an ChromaLocation value.
Returns
a format value in the style of Colorspace.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ DefinePixelFormat()

constexpr PixelFormat SDL::DefinePixelFormat ( PixelType  type,
int  order,
PackedLayout  layout,
int  bits,
int  bytes 
)
constexpr

For example, defining PIXELFORMAT_RGBA8888 looks like this:

Pixel format.
Definition: SDL3pp_pixels.h:414
constexpr PixelFormat(PixelFormatRaw format={})
Wraps PixelFormat.
Definition: SDL3pp_pixels.h:423
constexpr PixelType PIXELTYPE_PACKED32
PACKED32.
Definition: SDL3pp_pixels.h:236
constexpr PackedOrder PACKEDORDER_RGBA
RGBA.
Definition: SDL3pp_pixels.h:292
constexpr PackedLayout PACKEDLAYOUT_8888
8888
Definition: SDL3pp_pixels.h:356
Parameters
typethe type of the new format, probably a PixelType value.
orderthe order of the new format, probably a BitmapOrder, PackedOrder, or ArrayOrder value.
layoutthe layout of the new format, probably an PackedLayout value or zero.
bitsthe number of bits per pixel of the new format.
bytesthe number of bytes per pixel of the new format.
Returns
a format value in the style of PixelFormat.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ DefinePixelFourCC()

constexpr Uint32 SDL::DefinePixelFourCC ( Uint8  A,
Uint8  B,
Uint8  C,
Uint8  D 
)
constexpr

For example, defining PIXELFORMAT_YV12 looks like this:

DefinePixelFourCC('Y', 'V', '1', '2')
constexpr Uint32 DefinePixelFourCC(Uint8 A, Uint8 B, Uint8 C, Uint8 D)
A function for defining custom FourCC pixel formats.
Definition: SDL3pp_pixels.h:998
Parameters
Athe first character of the FourCC code.
Bthe second character of the FourCC code.
Cthe third character of the FourCC code.
Dthe fourth character of the FourCC code.
Returns
a format value in the style of PixelFormat.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ Destroy()

void SDL::Palette::Destroy ( )
inline
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
Since
This function is available since SDL 3.2.0.
See also
Palette.Palette

◆ DestroyPalette()

void SDL::DestroyPalette ( PaletteRaw  palette)
inline
Parameters
palettethe Palette structure to be freed.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
Since
This function is available since SDL 3.2.0.
See also
Palette.Palette

◆ ForMasks()

PixelFormat SDL::PixelFormat::ForMasks ( int  bpp,
Uint32  Rmask,
Uint32  Gmask,
Uint32  Bmask,
Uint32  Amask 
)
inlinestatic

This will return PIXELFORMAT_UNKNOWN if the conversion wasn't possible.

Parameters
bppa bits per pixel value; usually 15, 16, or 32.
Rmaskthe red mask for the format.
Gmaskthe green mask for the format.
Bmaskthe blue mask for the format.
Amaskthe alpha mask for the format.
Returns
the PixelFormat value corresponding to the format masks, or PIXELFORMAT_UNKNOWN if there isn't a match.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetMasks

◆ Get() [1/2]

Color SDL::Color::Get ( Uint32  pixel,
const PixelFormatDetails format,
PaletteConstParam  palette 
)
inlinestatic

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).

Parameters
pixela pixel value.
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be NULL.
Returns
a color value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails()
GetRGBA()
Map()

◆ Get() [2/2]

Color SDL::PixelFormat::Get ( Uint32  pixel,
PaletteConstParam  palette = {} 
) const
inline

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).

Parameters
pixela pixel value.
palettean optional palette for indexed formats, may be NULL.
Returns
a color value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
GetPixelFormatDetails()
GetRGBA()
Map()

◆ GetBitsPerPixel()

constexpr int SDL::PixelFormat::GetBitsPerPixel ( ) const
constexpr

FourCC formats will report zero here, as it rarely makes sense to measure them per-pixel.

Returns
the bits-per-pixel.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
GetBytesPerPixel

◆ GetBytesPerPixel()

constexpr int SDL::PixelFormat::GetBytesPerPixel ( ) const
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

FourCC formats do their best here, but many of them don't have a meaningful measurement of bytes per pixel.

Returns
the bytes-per-pixel.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
GetBitsPerPixel

◆ GetChroma()

constexpr ChromaLocation SDL::Colorspace::GetChroma ( ) const
constexpr
Returns
the ChromaLocation of cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetColor()

Color SDL::GetColor ( Uint32  pixel,
const PixelFormatDetails format,
PaletteConstParam  palette = {} 
)
inline

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).

Parameters
pixela pixel value.
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be nullptr.
Returns
a color value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGB
MapRGB
MapRGBA

◆ GetDetails()

const PixelFormatDetails & SDL::PixelFormat::GetDetails ( ) const
inline

Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.

Returns
a PixelFormatDetails structure on success
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetFlags()

constexpr Uint8 SDL::PixelFormat::GetFlags ( ) const
constexpr

This function is generally not needed directly by an app, which should use specific tests, like PixelFormat.IsFourCC, instead.

Returns
the flags of format.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetLayout()

constexpr PackedLayout SDL::PixelFormat::GetLayout ( ) const
constexpr

This is usually a value from the PackedLayout enumeration, or zero if a layout doesn't make sense for the format type.

Returns
the layout
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetMasks()

void SDL::PixelFormat::GetMasks ( int *  bpp,
Uint32 Rmask,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask 
) const
inline
Parameters
bppa bits per pixel value; usually 15, 16, or 32.
Rmaska pointer filled in with the red mask for the format.
Gmaska pointer filled in with the green mask for the format.
Bmaska pointer filled in with the blue mask for the format.
Amaska pointer filled in with the alpha mask for the format.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.ForMasks

◆ GetMasksForPixelFormat()

void SDL::GetMasksForPixelFormat ( PixelFormatRaw  format,
int *  bpp,
Uint32 Rmask,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask 
)
inline
Parameters
formatone of the PixelFormat values.
bppa bits per pixel value; usually 15, 16, or 32.
Rmaska pointer filled in with the red mask for the format.
Gmaska pointer filled in with the green mask for the format.
Bmaska pointer filled in with the blue mask for the format.
Amaska pointer filled in with the alpha mask for the format.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.ForMasks

◆ GetMatrix()

constexpr MatrixCoefficients SDL::Colorspace::GetMatrix ( ) const
constexpr
Returns
the MatrixCoefficients of cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetName()

const char * SDL::PixelFormat::GetName ( ) const
inline
Returns
the human readable name of the specified pixel format or "PIXELFORMAT_UNKNOWN" if the format isn't recognized.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetOrder()

constexpr int SDL::PixelFormat::GetOrder ( ) const
constexpr

This is usually a value from the BitmapOrder, PackedOrder, or ArrayOrder enumerations, depending on the format type.

Returns
the order.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetPixelFormatDetails()

const PixelFormatDetails & SDL::GetPixelFormatDetails ( PixelFormatRaw  format)
inline

Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.

Parameters
formatone of the PixelFormat values.
Returns
a PixelFormatDetails structure on success
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetPixelFormatForMasks()

PixelFormat SDL::GetPixelFormatForMasks ( int  bpp,
Uint32  Rmask,
Uint32  Gmask,
Uint32  Bmask,
Uint32  Amask 
)
inline

This will return PIXELFORMAT_UNKNOWN if the conversion wasn't possible.

Parameters
bppa bits per pixel value; usually 15, 16, or 32.
Rmaskthe red mask for the format.
Gmaskthe green mask for the format.
Bmaskthe blue mask for the format.
Amaskthe alpha mask for the format.
Returns
the PixelFormat value corresponding to the format masks, or PIXELFORMAT_UNKNOWN if there isn't a match.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetMasks

◆ GetPixelFormatName()

const char * SDL::GetPixelFormatName ( PixelFormatRaw  format)
inline
Parameters
formatthe pixel format to query.
Returns
the human readable name of the specified pixel format or "PIXELFORMAT_UNKNOWN" if the format isn't recognized.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetPrimaries()

constexpr ColorPrimaries SDL::Colorspace::GetPrimaries ( ) const
constexpr
Returns
the ColorPrimaries of cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetRange()

constexpr ColorRange SDL::Colorspace::GetRange ( ) const
constexpr
Returns
the ColorRange of cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetRGB()

void SDL::GetRGB ( Uint32  pixel,
const PixelFormatDetails format,
PaletteConstParam  palette,
Uint8 r,
Uint8 g,
Uint8 b 
)
inline

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

Parameters
pixela pixel value.
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be nullptr.
ra pointer filled in with the red component, may be nullptr.
ga pointer filled in with the green component, may be nullptr.
ba pointer filled in with the blue component, may be nullptr.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGBA
MapRGB
MapColor

◆ GetRGBA()

void SDL::GetRGBA ( Uint32  pixel,
const PixelFormatDetails format,
PaletteConstParam  palette,
Uint8 r,
Uint8 g,
Uint8 b,
Uint8 a 
)
inline

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).

Parameters
pixela pixel value.
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be nullptr.
ra pointer filled in with the red component, may be nullptr.
ga pointer filled in with the green component, may be nullptr.
ba pointer filled in with the blue component, may be nullptr.
aa pointer filled in with the alpha component, may be nullptr.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGB
MapRGB
MapColor

◆ GetTransfer()

constexpr TransferCharacteristics SDL::Colorspace::GetTransfer ( ) const
constexpr
Returns
the TransferCharacteristics of cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetType() [1/2]

constexpr PixelType SDL::PixelFormat::GetType ( ) const
constexpr
Returns
the type as PixelType.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ GetType() [2/2]

constexpr ColorType SDL::Colorspace::GetType ( ) const
constexpr
Returns
the ColorType for cspace.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ Is10Bit()

constexpr bool SDL::PixelFormat::Is10Bit ( ) const
constexpr
Returns
true if the format is 10-bit, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsAlpha()

constexpr bool SDL::PixelFormat::IsAlpha ( ) const
constexpr
Returns
true if the format has alpha, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsArray()

constexpr bool SDL::PixelFormat::IsArray ( ) const
constexpr
Returns
true if the format is an array, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsColorspaceFullRange()

constexpr bool SDL::IsColorspaceFullRange ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
true if full range, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsColorspaceLimitedRange()

constexpr bool SDL::IsColorspaceLimitedRange ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
true if limited range, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsColorspaceMatrixBT2020_NCL()

constexpr bool SDL::IsColorspaceMatrixBT2020_NCL ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
true if BT2020_NCL, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsColorspaceMatrixBT601()

constexpr bool SDL::IsColorspaceMatrixBT601 ( ColorspaceRaw  cspace)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
cspacean Colorspace to check.
Returns
true if BT601 or BT470BG, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsColorspaceMatrixBT709()

constexpr bool SDL::IsColorspaceMatrixBT709 ( ColorspaceRaw  cspace)
constexpr
Parameters
cspacean Colorspace to check.
Returns
true if BT709, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsFloat()

constexpr bool SDL::PixelFormat::IsFloat ( ) const
constexpr
Returns
true if the format is 10-bit, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsFourCC()

constexpr bool SDL::PixelFormat::IsFourCC ( ) const
constexpr

This covers custom and other unusual formats.

Returns
true if the format has alpha, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsFullRange()

constexpr bool SDL::Colorspace::IsFullRange ( ) const
constexpr
Returns
true if full range, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsIndexed()

constexpr bool SDL::PixelFormat::IsIndexed ( ) const
constexpr
Returns
true if the format is indexed, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsLimitedRange()

constexpr bool SDL::Colorspace::IsLimitedRange ( ) const
constexpr
Returns
true if limited range, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsMatrixBT2020_NCL()

constexpr bool SDL::Colorspace::IsMatrixBT2020_NCL ( ) const
constexpr
Returns
true if BT2020_NCL, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsMatrixBT601()

constexpr bool SDL::Colorspace::IsMatrixBT601 ( ) const
constexpr
Returns
true if BT601 or BT470BG, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsMatrixBT709()

constexpr bool SDL::Colorspace::IsMatrixBT709 ( ) const
constexpr
Returns
true if BT709, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsPacked()

constexpr bool SDL::PixelFormat::IsPacked ( ) const
constexpr
Returns
true if the format is packed, false otherwise.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ IsPixelFormat10Bit()

constexpr bool SDL::IsPixelFormat10Bit ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format is 10-bit, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatAlpha()

constexpr bool SDL::IsPixelFormatAlpha ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format has alpha, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatArray()

constexpr bool SDL::IsPixelFormatArray ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format is an array, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatFloat()

constexpr bool SDL::IsPixelFormatFloat ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format is 10-bit, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatFourCC()

constexpr bool SDL::IsPixelFormatFourCC ( PixelFormatRaw  format)
constexpr

This covers custom and other unusual formats.

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format has alpha, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatIndexed()

constexpr bool SDL::IsPixelFormatIndexed ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format is indexed, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ IsPixelFormatPacked()

constexpr bool SDL::IsPixelFormatPacked ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

Parameters
formatan PixelFormat to check.
Returns
true if the format is packed, false otherwise.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ Map() [1/2]

Uint32 SDL::PixelFormat::Map ( ColorRaw  c,
PaletteConstParam  palette = {} 
) const
inline

This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

Parameters
cthe color components of the pixel in the range 0-255.
palettean optional palette for indexed formats, may be NULL.
Returns
a pixel value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
GetPixelFormatDetails()
Get()
MapRGBA()
Surface.MapColor()

◆ Map() [2/2]

Uint32 SDL::Color::Map ( const PixelFormatDetails format,
PaletteConstParam  palette 
) const
inline

This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

Parameters
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be NULL.
Returns
a pixel value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.

◆ MapColor()

Uint32 SDL::MapColor ( const PixelFormatDetails format,
ColorRaw  c,
PaletteConstParam  palette = {} 
)
inline

This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

Parameters
formata pointer to PixelFormatDetails describing the pixel format.
cthe color components of the pixel in the range 0-255.
palettean optional palette for indexed formats, may be nullptr.
Returns
a pixel value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGBA
MapRGB
Surface.MapRGBA

◆ MapRGB()

Uint32 SDL::MapRGB ( const PixelFormatDetails format,
PaletteConstParam  palette,
Uint8  r,
Uint8  g,
Uint8  b 
)
inline

This function maps the RGB color value to the specified pixel format and returns the pixel value best approximating the given RGB color value for the given pixel format.

If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).

If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

Parameters
formata pointer to PixelFormatDetails describing the pixel format.
palettean optional palette for indexed formats, may be nullptr.
rthe red component of the pixel in the range 0-255.
gthe green component of the pixel in the range 0-255.
bthe blue component of the pixel in the range 0-255.
Returns
a pixel value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGB
MapColor
Surface.MapRGB

◆ MapRGBA()

Uint32 SDL::MapRGBA ( const PixelFormatDetails format,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
PaletteConstParam  palette = {} 
)
inline

This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

Parameters
formata pointer to PixelFormatDetails describing the pixel format.
rthe red component of the pixel in the range 0-255.
gthe green component of the pixel in the range 0-255.
bthe blue component of the pixel in the range 0-255.
athe alpha component of the pixel in the range 0-255.
palettean optional palette for indexed formats, may be nullptr.
Returns
a pixel value.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified.
Since
This function is available since SDL 3.2.0.
See also
PixelFormat.GetDetails
GetRGBA
MapRGB
Surface.MapRGBA

◆ PixelFormatBitsPerPixel()

constexpr int SDL::PixelFormatBitsPerPixel ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

FourCC formats will report zero here, as it rarely makes sense to measure them per-pixel.

Parameters
formatan PixelFormat to check.
Returns
the bits-per-pixel of format.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.
See also
PixelFormat.GetBytesPerPixel

◆ PixelFormatBytesPerPixel()

constexpr int SDL::PixelFormatBytesPerPixel ( PixelFormatRaw  format)
constexpr

Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.

FourCC formats do their best here, but many of them don't have a meaningful measurement of bytes per pixel.

Parameters
formatan PixelFormat to check.
Returns
the bytes-per-pixel of format.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.
See also
PixelFormat.GetBitsPerPixel

◆ PixelFormatFlags()

constexpr Uint8 SDL::PixelFormatFlags ( PixelFormatRaw  format)
constexpr

This function is generally not needed directly by an app, which should use specific tests, like PixelFormat.IsFourCC, instead.

Parameters
formatan PixelFormat to check.
Returns
the flags of format.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.

◆ PixelFormatLayout()

constexpr PackedLayout SDL::PixelFormatLayout ( PixelFormatRaw  format)
constexpr

This is usually a value from the PackedLayout enumeration, or zero if a layout doesn't make sense for the format type.

Parameters
formatan PixelFormat to check.
Returns
the layout of format.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ PixelFormatOrder()

constexpr int SDL::PixelFormatOrder ( PixelFormatRaw  format)
constexpr

This is usually a value from the BitmapOrder, PackedOrder, or ArrayOrder enumerations, depending on the format type.

Parameters
formatan PixelFormat to check.
Returns
the order of format.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ PixelFormatType()

constexpr PixelType SDL::PixelFormatType ( PixelFormatRaw  format)
constexpr

This is usually a value from the PixelType enumeration.

Parameters
formatan PixelFormat to check.
Returns
the type of format.
Thread safety:
It is safe to call this macro from any thread.
Since
This macro is available since SDL 3.2.0.

◆ SetColors()

void SDL::Palette::SetColors ( SpanRef< const ColorRaw colors,
int  firstcolor = 0 
)
inline
Parameters
colorsan array of Color structures to copy into the palette.
firstcolorthe index of the first palette entry to modify.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
Since
This function is available since SDL 3.2.0.
See also
Palette.Palette

◆ SetPaletteColors()

void SDL::SetPaletteColors ( PaletteParam  palette,
SpanRef< const ColorRaw colors,
int  firstcolor = 0 
)
inline
Parameters
palettethe Palette structure to modify.
colorsan array of Color structures to copy into the palette.
firstcolorthe index of the first palette entry to modify.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread, as long as the palette is not modified or destroyed in another thread.
Since
This function is available since SDL 3.2.0.

Variable Documentation

◆ ALPHA_OPAQUE

constexpr Uint8 SDL::ALPHA_OPAQUE = SDL_ALPHA_OPAQUE
constexpr
Since
This macro is available since SDL 3.2.0.
See also
ALPHA_TRANSPARENT

◆ ALPHA_OPAQUE_FLOAT

constexpr float SDL::ALPHA_OPAQUE_FLOAT = SDL_ALPHA_OPAQUE_FLOAT
constexpr
Since
This macro is available since SDL 3.2.0.
See also
ALPHA_TRANSPARENT_FLOAT

◆ ALPHA_TRANSPARENT

constexpr Uint8 SDL::ALPHA_TRANSPARENT = SDL_ALPHA_TRANSPARENT
constexpr
Since
This macro is available since SDL 3.2.0.
See also
ALPHA_OPAQUE

◆ ALPHA_TRANSPARENT_FLOAT

constexpr float SDL::ALPHA_TRANSPARENT_FLOAT = SDL_ALPHA_TRANSPARENT_FLOAT
constexpr
Since
This macro is available since SDL 3.2.0.
See also
ALPHA_OPAQUE_FLOAT

◆ CHROMA_LOCATION_CENTER

constexpr ChromaLocation SDL::CHROMA_LOCATION_CENTER = SDL_CHROMA_LOCATION_CENTER
constexpr

In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.

◆ CHROMA_LOCATION_LEFT

constexpr ChromaLocation SDL::CHROMA_LOCATION_LEFT = SDL_CHROMA_LOCATION_LEFT
constexpr

In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.

◆ CHROMA_LOCATION_NONE

constexpr ChromaLocation SDL::CHROMA_LOCATION_NONE
constexpr
Initial value:
=
SDL_CHROMA_LOCATION_NONE

◆ COLOR_PRIMARIES_BT2020

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT2020
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_BT2020

◆ COLOR_PRIMARIES_BT470BG

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT470BG
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_BT470BG

◆ COLOR_PRIMARIES_BT470M

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT470M
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_BT470M

◆ COLOR_PRIMARIES_BT601

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT601
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_BT601

◆ COLOR_PRIMARIES_BT709

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_BT709
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_BT709

◆ COLOR_PRIMARIES_CUSTOM

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_CUSTOM
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_CUSTOM

◆ COLOR_PRIMARIES_EBU3213

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_EBU3213
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_EBU3213

◆ COLOR_PRIMARIES_GENERIC_FILM

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_GENERIC_FILM
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_GENERIC_FILM

◆ COLOR_PRIMARIES_SMPTE240

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE240
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_SMPTE240

◆ COLOR_PRIMARIES_SMPTE431

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE431
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_SMPTE431

◆ COLOR_PRIMARIES_SMPTE432

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_SMPTE432
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_SMPTE432

◆ COLOR_PRIMARIES_UNKNOWN

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_UNKNOWN
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_UNKNOWN

◆ COLOR_PRIMARIES_UNSPECIFIED

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_UNSPECIFIED
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_UNSPECIFIED

◆ COLOR_PRIMARIES_XYZ

constexpr ColorPrimaries SDL::COLOR_PRIMARIES_XYZ
constexpr
Initial value:
=
SDL_COLOR_PRIMARIES_XYZ

◆ COLOR_RANGE_LIMITED

constexpr ColorRange SDL::COLOR_RANGE_LIMITED = SDL_COLOR_RANGE_LIMITED
constexpr

16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma

◆ COLOR_RANGE_UNKNOWN

constexpr ColorRange SDL::COLOR_RANGE_UNKNOWN
constexpr
Initial value:
=
SDL_COLOR_RANGE_UNKNOWN

◆ COLOR_TYPE_UNKNOWN

constexpr ColorType SDL::COLOR_TYPE_UNKNOWN
constexpr
Initial value:
=
SDL_COLOR_TYPE_UNKNOWN

◆ COLOR_TYPE_YCBCR

constexpr ColorType SDL::COLOR_TYPE_YCBCR
constexpr
Initial value:
=
SDL_COLOR_TYPE_YCBCR

◆ MATRIX_COEFFICIENTS_BT2020_CL

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT2020_CL
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_BT2020_CL

◆ MATRIX_COEFFICIENTS_BT2020_NCL

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT2020_NCL
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_BT2020_NCL

◆ MATRIX_COEFFICIENTS_BT470BG

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT470BG
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_BT470BG

◆ MATRIX_COEFFICIENTS_BT601

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT601
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_BT601

◆ MATRIX_COEFFICIENTS_BT709

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_BT709
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_BT709

◆ MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL

◆ MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL

◆ MATRIX_COEFFICIENTS_CUSTOM

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_CUSTOM
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_CUSTOM

◆ MATRIX_COEFFICIENTS_FCC

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_FCC
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_FCC

◆ MATRIX_COEFFICIENTS_ICTCP

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_ICTCP
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_ICTCP

◆ MATRIX_COEFFICIENTS_IDENTITY

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_IDENTITY
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_IDENTITY

◆ MATRIX_COEFFICIENTS_SMPTE2085

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_SMPTE2085
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_SMPTE2085

◆ MATRIX_COEFFICIENTS_SMPTE240

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_SMPTE240
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_SMPTE240

◆ MATRIX_COEFFICIENTS_UNSPECIFIED

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_UNSPECIFIED
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_UNSPECIFIED

◆ MATRIX_COEFFICIENTS_YCGCO

constexpr MatrixCoefficients SDL::MATRIX_COEFFICIENTS_YCGCO
constexpr
Initial value:
=
SDL_MATRIX_COEFFICIENTS_YCGCO

◆ PACKEDLAYOUT_1010102

constexpr PackedLayout SDL::PACKEDLAYOUT_1010102
constexpr
Initial value:
=
SDL_PACKEDLAYOUT_1010102

◆ PACKEDLAYOUT_2101010

constexpr PackedLayout SDL::PACKEDLAYOUT_2101010
constexpr
Initial value:
=
SDL_PACKEDLAYOUT_2101010

◆ PIXELFORMAT_ABGR128_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_ABGR128_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR128_FLOAT

◆ PIXELFORMAT_ABGR1555

constexpr PixelFormat SDL::PIXELFORMAT_ABGR1555
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR1555

◆ PIXELFORMAT_ABGR2101010

constexpr PixelFormat SDL::PIXELFORMAT_ABGR2101010
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR2101010

◆ PIXELFORMAT_ABGR4444

constexpr PixelFormat SDL::PIXELFORMAT_ABGR4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR4444

◆ PIXELFORMAT_ABGR64_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_ABGR64_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR64_FLOAT

◆ PIXELFORMAT_ABGR8888

constexpr PixelFormat SDL::PIXELFORMAT_ABGR8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_ABGR8888

◆ PIXELFORMAT_ARGB128_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_ARGB128_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB128_FLOAT

◆ PIXELFORMAT_ARGB1555

constexpr PixelFormat SDL::PIXELFORMAT_ARGB1555
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB1555

◆ PIXELFORMAT_ARGB2101010

constexpr PixelFormat SDL::PIXELFORMAT_ARGB2101010
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB2101010

◆ PIXELFORMAT_ARGB4444

constexpr PixelFormat SDL::PIXELFORMAT_ARGB4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB4444

◆ PIXELFORMAT_ARGB64_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_ARGB64_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB64_FLOAT

◆ PIXELFORMAT_ARGB8888

constexpr PixelFormat SDL::PIXELFORMAT_ARGB8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_ARGB8888

◆ PIXELFORMAT_BGR48_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_BGR48_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGR48_FLOAT

◆ PIXELFORMAT_BGR96_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_BGR96_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGR96_FLOAT

◆ PIXELFORMAT_BGRA128_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_BGRA128_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRA128_FLOAT

◆ PIXELFORMAT_BGRA4444

constexpr PixelFormat SDL::PIXELFORMAT_BGRA4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRA4444

◆ PIXELFORMAT_BGRA5551

constexpr PixelFormat SDL::PIXELFORMAT_BGRA5551
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRA5551

◆ PIXELFORMAT_BGRA64_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_BGRA64_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRA64_FLOAT

◆ PIXELFORMAT_BGRA8888

constexpr PixelFormat SDL::PIXELFORMAT_BGRA8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRA8888

◆ PIXELFORMAT_BGRX8888

constexpr PixelFormat SDL::PIXELFORMAT_BGRX8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_BGRX8888

◆ PIXELFORMAT_EXTERNAL_OES

constexpr PixelFormat SDL::PIXELFORMAT_EXTERNAL_OES
constexpr
Initial value:
=
SDL_PIXELFORMAT_EXTERNAL_OES

◆ PIXELFORMAT_INDEX1LSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX1LSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX1LSB

◆ PIXELFORMAT_INDEX1MSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX1MSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX1MSB

◆ PIXELFORMAT_INDEX2LSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX2LSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX2LSB

◆ PIXELFORMAT_INDEX2MSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX2MSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX2MSB

◆ PIXELFORMAT_INDEX4LSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX4LSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX4LSB

◆ PIXELFORMAT_INDEX4MSB

constexpr PixelFormat SDL::PIXELFORMAT_INDEX4MSB
constexpr
Initial value:
=
SDL_PIXELFORMAT_INDEX4MSB

◆ PIXELFORMAT_IYUV

constexpr PixelFormat SDL::PIXELFORMAT_IYUV
constexpr
Initial value:
=
SDL_PIXELFORMAT_IYUV

◆ PIXELFORMAT_NV12

constexpr PixelFormat SDL::PIXELFORMAT_NV12
constexpr
Initial value:
=
SDL_PIXELFORMAT_NV12

◆ PIXELFORMAT_NV21

constexpr PixelFormat SDL::PIXELFORMAT_NV21
constexpr
Initial value:
=
SDL_PIXELFORMAT_NV21

◆ PIXELFORMAT_P010

constexpr PixelFormat SDL::PIXELFORMAT_P010
constexpr
Initial value:
=
SDL_PIXELFORMAT_P010

◆ PIXELFORMAT_RGB48_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_RGB48_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGB48_FLOAT

◆ PIXELFORMAT_RGB96_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_RGB96_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGB96_FLOAT

◆ PIXELFORMAT_RGBA128_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_RGBA128_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBA128_FLOAT

◆ PIXELFORMAT_RGBA4444

constexpr PixelFormat SDL::PIXELFORMAT_RGBA4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBA4444

◆ PIXELFORMAT_RGBA5551

constexpr PixelFormat SDL::PIXELFORMAT_RGBA5551
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBA5551

◆ PIXELFORMAT_RGBA64_FLOAT

constexpr PixelFormat SDL::PIXELFORMAT_RGBA64_FLOAT
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBA64_FLOAT

◆ PIXELFORMAT_RGBA8888

constexpr PixelFormat SDL::PIXELFORMAT_RGBA8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBA8888

◆ PIXELFORMAT_RGBX8888

constexpr PixelFormat SDL::PIXELFORMAT_RGBX8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_RGBX8888

◆ PIXELFORMAT_UNKNOWN

constexpr PixelFormat SDL::PIXELFORMAT_UNKNOWN
constexpr
Initial value:
=
SDL_PIXELFORMAT_UNKNOWN

◆ PIXELFORMAT_UYVY

constexpr PixelFormat SDL::PIXELFORMAT_UYVY
constexpr
Initial value:
=
SDL_PIXELFORMAT_UYVY

◆ PIXELFORMAT_XBGR1555

constexpr PixelFormat SDL::PIXELFORMAT_XBGR1555
constexpr
Initial value:
=
SDL_PIXELFORMAT_XBGR1555

◆ PIXELFORMAT_XBGR2101010

constexpr PixelFormat SDL::PIXELFORMAT_XBGR2101010
constexpr
Initial value:
=
SDL_PIXELFORMAT_XBGR2101010

◆ PIXELFORMAT_XBGR4444

constexpr PixelFormat SDL::PIXELFORMAT_XBGR4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_XBGR4444

◆ PIXELFORMAT_XBGR8888

constexpr PixelFormat SDL::PIXELFORMAT_XBGR8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_XBGR8888

◆ PIXELFORMAT_XRGB1555

constexpr PixelFormat SDL::PIXELFORMAT_XRGB1555
constexpr
Initial value:
=
SDL_PIXELFORMAT_XRGB1555

◆ PIXELFORMAT_XRGB2101010

constexpr PixelFormat SDL::PIXELFORMAT_XRGB2101010
constexpr
Initial value:
=
SDL_PIXELFORMAT_XRGB2101010

◆ PIXELFORMAT_XRGB4444

constexpr PixelFormat SDL::PIXELFORMAT_XRGB4444
constexpr
Initial value:
=
SDL_PIXELFORMAT_XRGB4444

◆ PIXELFORMAT_XRGB8888

constexpr PixelFormat SDL::PIXELFORMAT_XRGB8888
constexpr
Initial value:
=
SDL_PIXELFORMAT_XRGB8888

◆ PIXELFORMAT_YUY2

constexpr PixelFormat SDL::PIXELFORMAT_YUY2
constexpr
Initial value:
=
SDL_PIXELFORMAT_YUY2

◆ PIXELFORMAT_YV12

constexpr PixelFormat SDL::PIXELFORMAT_YV12
constexpr
Initial value:
=
SDL_PIXELFORMAT_YV12

◆ PIXELFORMAT_YVYU

constexpr PixelFormat SDL::PIXELFORMAT_YVYU
constexpr
Initial value:
=
SDL_PIXELFORMAT_YVYU

◆ TRANSFER_CHARACTERISTICS_BT1361

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT1361
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_BT1361

◆ TRANSFER_CHARACTERISTICS_BT2020_10BIT

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT2020_10BIT
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_BT2020_10BIT

◆ TRANSFER_CHARACTERISTICS_BT2020_12BIT

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT2020_12BIT
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_BT2020_12BIT

◆ TRANSFER_CHARACTERISTICS_BT601

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT601
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_BT601

◆ TRANSFER_CHARACTERISTICS_BT709

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_BT709
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_BT709

◆ TRANSFER_CHARACTERISTICS_CUSTOM

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_CUSTOM
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_CUSTOM

◆ TRANSFER_CHARACTERISTICS_GAMMA22

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_GAMMA22
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_GAMMA22

◆ TRANSFER_CHARACTERISTICS_GAMMA28

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_GAMMA28
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_GAMMA28

◆ TRANSFER_CHARACTERISTICS_HLG

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_HLG
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_HLG

◆ TRANSFER_CHARACTERISTICS_IEC61966

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_IEC61966
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_IEC61966

◆ TRANSFER_CHARACTERISTICS_LINEAR

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LINEAR
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_LINEAR

◆ TRANSFER_CHARACTERISTICS_LOG100

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LOG100
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_LOG100

◆ TRANSFER_CHARACTERISTICS_LOG100_SQRT10

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_LOG100_SQRT10
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_LOG100_SQRT10

◆ TRANSFER_CHARACTERISTICS_PQ

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_PQ
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_PQ

◆ TRANSFER_CHARACTERISTICS_SMPTE240

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SMPTE240
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_SMPTE240

◆ TRANSFER_CHARACTERISTICS_SMPTE428

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SMPTE428
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_SMPTE428

◆ TRANSFER_CHARACTERISTICS_SRGB

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_SRGB
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_SRGB

◆ TRANSFER_CHARACTERISTICS_UNKNOWN

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_UNKNOWN
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_UNKNOWN

◆ TRANSFER_CHARACTERISTICS_UNSPECIFIED

constexpr TransferCharacteristics SDL::TRANSFER_CHARACTERISTICS_UNSPECIFIED
constexpr
Initial value:
=
SDL_TRANSFER_CHARACTERISTICS_UNSPECIFIED