Louvre
v2.13.0-1
C++ library for Wayland compositors
|
Gamma correction table for outputs. More...
Public Member Functions | |
LGammaTable (UInt32 size=0) noexcept | |
Constructs an LGammaTable with the specified size. More... | |
~LGammaTable () | |
Destructor for LGammaTable. More... | |
LGammaTable (const LGammaTable &other) noexcept | |
Copy constructor for LGammaTable. More... | |
LGammaTable & | operator= (const LGammaTable &other) noexcept |
Assignment operator for LGammaTable. More... | |
void | setSize (UInt32 size) noexcept |
Set the size of the gamma correction table. More... | |
UInt32 | size () const noexcept |
Gets the size of the gamma correction table. More... | |
void | fill (Float64 gamma, Float64 brightness, Float64 contrast) noexcept |
Fill method for setting table values. More... | |
UInt16 * | red () const noexcept |
Gets a pointer to the beginning of the red curve in the array. More... | |
UInt16 * | green () const noexcept |
Gets a pointer to the beginning of the green curve in the array. More... | |
UInt16 * | blue () const noexcept |
Gets a pointer to the beginning of the blue curve in the array. More... | |
Gamma correction table for outputs.
The LGammaTable class allows to define the gamma correction curves for each RGB component of an LOutput, applicable through the LOutput::setGamma() method.
The curves (red, green and blue) are stored in a single array of type UInt16. The table size (size()) indicates how many UInt16 values each curve contains. For example, if size() is 256, the array would have 256 * 3 UInt16 values, where the first 256 represent the red curve, the next 256 represent the green curve, and the remaining values represent the blue curve.
The table size must match the LOutput::gammaSize() property of the output to which the correction is applied. If not, LOutput::setGamma() will fail. To modify table values, you can use the fill() auxiliary method or directly modify each curve using red(), green(), and blue(), which return the address of each curve in the array.
|
inlinenoexcept |
Constructs an LGammaTable with the specified size.
size | The size of the gamma correction table. Defaults to 0. |
|
inline |
Destructor for LGammaTable.
Destroys the gamma correction table.
|
inlinenoexcept |
Copy constructor for LGammaTable.
Creates a new LGammaTable by copying the content of another table.
other | The LGammaTable object to be copied. |
|
inlinenoexcept |
Assignment operator for LGammaTable.
Assigns the content of another LGammaTable to this table.
other | The LGammaTable object to be assigned. |
|
inlinenoexcept |
Set the size of the gamma correction table.
size | The new size for the gamma correction table. |
|
inlinenoexcept |
Gets the size of the gamma correction table.
The size represents the number of UInt16 values used to independently represent each RGB curve.
Fill method for setting table values.
This auxiliary method allows setting gamma, brightness, and contrast values for the table.
gamma | The gamma correction value. |
brightness | The brightness adjustment value. |
contrast | The contrast adjustment value. |
|
inlinenoexcept |
Gets a pointer to the beginning of the red curve in the array.
nullptr
if the table size is 0.
|
inlinenoexcept |
Gets a pointer to the beginning of the green curve in the array.
nullptr
if the table size is 0.
|
inlinenoexcept |
Gets a pointer to the beginning of the blue curve in the array.
nullptr
if the table size is 0.