Colorspace definitions.
More...
Since similar colorspaces may vary in their details (matrix, transfer function, etc.), this is not an exhaustive list, but rather a representative sample of the kinds of colorspaces supported in SDL.
- Since
- This enum is available since SDL 3.2.0.
- Category:
- Wrap state
- See also
- Colorspaces
-
ColorPrimaries
-
ColorRange
-
ColorType
-
MatrixCoefficients
-
TransferCharacteristics
◆ Colorspace() [1/2]
constexpr SDL::Colorspace::Colorspace |
( |
SDL_Colorspace |
colorspace = {} | ) |
|
|
inlineconstexpr |
- Parameters
-
colorspace | the value to be wrapped |
◆ Colorspace() [2/2]
For example, defining COLORSPACE_SRGB looks like this:
Colorspace definitions.
Definition SDL3pp_pixels.h:1301
constexpr ColorPrimaries COLOR_PRIMARIES_BT709
ITU-R BT.709-6.
Definition SDL3pp_pixels.h:1044
constexpr TransferCharacteristics TRANSFER_CHARACTERISTICS_SRGB
IEC 61966-2-1 (sRGB or sYCC)
Definition SDL3pp_pixels.h:1144
constexpr ColorType COLOR_TYPE_RGB
COLOR_TYPE_RGB.
Definition SDL3pp_pixels.h:993
constexpr ColorRange COLOR_RANGE_FULL
Full range, e.g.
Definition SDL3pp_pixels.h:1024
constexpr ChromaLocation CHROMA_LOCATION_NONE
RGB, no chroma sampling.
Definition SDL3pp_pixels.h:1251
constexpr MatrixCoefficients MATRIX_COEFFICIENTS_IDENTITY
MATRIX_COEFFICIENTS_IDENTITY.
Definition SDL3pp_pixels.h:1187
- Parameters
-
type | the type of the new format, probably an ColorType value. |
range | the range of the new format, probably a ColorRange value. |
primaries | the primaries of the new format, probably an ColorPrimaries value. |
transfer | the transfer characteristics of the new format, probably an TransferCharacteristics value. |
matrix | the matrix coefficients of the new format, probably an MatrixCoefficients value. |
chroma | the chroma sample location of the new format, probably an ChromaLocation value. |
- Postcondition
- 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.
◆ GetChroma()
- 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.
◆ GetMatrix()
- 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.
◆ GetPrimaries()
- 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 |
|
inlineconstexpr |
- 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.
◆ GetTransfer()
- 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()
constexpr ColorType SDL::Colorspace::GetType |
( |
| ) |
const |
|
inlineconstexpr |
- 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.
◆ IsFullRange()
constexpr bool SDL::Colorspace::IsFullRange |
( |
| ) |
const |
|
inlineconstexpr |
- 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.
◆ IsLimitedRange()
constexpr bool SDL::Colorspace::IsLimitedRange |
( |
| ) |
const |
|
inlineconstexpr |
- 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 |
|
inlineconstexpr |
- 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 |
|
inlineconstexpr |
- 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 |
|
inlineconstexpr |
- 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.
◆ operator bool()
constexpr SDL::Colorspace::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexpr |
- Returns
- True if valid state, false otherwise.
◆ operator SDL_Colorspace()
constexpr SDL::Colorspace::operator SDL_Colorspace |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following file: