|
SDL3pp
A slim C++ wrapper for SDL3
|
Colorspace definitions. More...
Public Member Functions | |
| constexpr | Colorspace (ColorspaceRaw cspace={}) |
| Wraps Colorspace. More... | |
| constexpr | Colorspace (ColorType type, ColorRange range, ColorPrimaries primaries, TransferCharacteristics transfer, MatrixCoefficients matrix, ChromaLocation chroma) |
| Define custom Colorspace formats. More... | |
| constexpr | operator ColorspaceRaw () const |
| Unwraps to the underlying Colorspace. More... | |
| constexpr ColorType | GetType () const |
| Retrieve the type of a Colorspace. More... | |
| constexpr ColorRange | GetRange () const |
| Retrieve the range of a Colorspace. More... | |
| constexpr ChromaLocation | GetChroma () const |
| Retrieve the chroma sample location of an Colorspace. More... | |
| constexpr ColorPrimaries | GetPrimaries () const |
| Retrieve the primaries of an Colorspace. More... | |
| constexpr TransferCharacteristics | GetTransfer () const |
| Retrieve the transfer characteristics of an Colorspace. More... | |
| constexpr MatrixCoefficients | GetMatrix () const |
| Retrieve the matrix coefficients of an Colorspace. More... | |
| constexpr bool | IsMatrixBT601 () const |
| Determine if a Colorspace uses BT601 (or BT470BG) matrix coefficients. More... | |
| constexpr bool | IsMatrixBT709 () const |
| Determine if an Colorspace uses BT709 matrix coefficients. More... | |
| constexpr bool | IsMatrixBT2020_NCL () const |
| Determine if an Colorspace uses BT2020_NCL matrix coefficients. More... | |
| constexpr bool | IsLimitedRange () const |
| A function to determine if an Colorspace has a limited range. More... | |
| constexpr bool | IsFullRange () const |
| A function to determine if an Colorspace has a full range. 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.
|
inlineconstexpr |
| cspace | the value to be wrapped |
|
inlineconstexpr |
For example, defining COLORSPACE_SRGB looks like this:
| 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. |
|
inlineconstexpr |