Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
RGammaLUT Class Referencefinal

Gamma LUT. More...

#include <RGammaLUT.h>

+ Inheritance diagram for RGammaLUT:

Public Member Functions

 ~RGammaLUT ()=default
 Destructor for RGammaLUT.
 
void setSize (size_t size) noexcept
 Set the size of the gamma correction table.
 
size_t size () const noexcept
 Gets the size of the gamma correction table.
 
void fill (Float64 gamma, Float64 brightness, Float64 contrast) noexcept
 Fill method for setting table values.
 
std::span< UInt16 > red () noexcept
 Gets a pointer to the beginning of the red curve in the array.
 
std::span< UInt16 > green () noexcept
 Gets a pointer to the beginning of the green curve in the array.
 
std::span< UInt16 > blue () noexcept
 Gets a pointer to the beginning of the blue curve in the array.
 
std::span< const UInt16 > red () const noexcept
 Gets a read-only view of the red curve in the array.
 
std::span< const UInt16 > green () const noexcept
 Gets a read-only view of the green curve in the array.
 
std::span< const UInt16 > blue () const noexcept
 Gets a read-only view of the blue curve in the array.
 
- Public Member Functions inherited from RObject
 RObject ()=default
 Constructs a default RObject.
 

Static Public Member Functions

static std::shared_ptr< RGammaLUTMake (size_t size=0) noexcept
 Constructs an RGammaLUT with the specified size.
 
static std::shared_ptr< RGammaLUTMakeFilled (size_t size, Float64 gamma, Float64 brightness, Float64 contrast) noexcept
 Constructs an RGammaLUT of the given size and fills it.
 

Detailed Description

Gamma LUT.

Constructor & Destructor Documentation

◆ ~RGammaLUT()

~RGammaLUT ( )
default

Destructor for RGammaLUT.

Destroys the gamma correction table.

Member Function Documentation

◆ Make()

static std::shared_ptr< RGammaLUT > Make ( size_t  size = 0)
staticnoexcept

Constructs an RGammaLUT with the specified size.

Parameters
sizeThe size of the gamma correction table. Defaults to 0.

◆ MakeFilled()

static std::shared_ptr< RGammaLUT > MakeFilled ( size_t  size,
Float64  gamma,
Float64  brightness,
Float64  contrast 
)
staticnoexcept

Constructs an RGammaLUT of the given size and fills it.

Equivalent to Make() followed by fill().

Parameters
sizeThe size of the gamma correction table.
gammaThe gamma correction value.
brightnessThe brightness adjustment value.
contrastThe contrast adjustment value.
Returns
A shared pointer to the new, filled RGammaLUT.

◆ setSize()

void setSize ( size_t  size)
inlinenoexcept

Set the size of the gamma correction table.

Note
This operation removes previous values.
Parameters
sizeThe new size for the gamma correction table.

◆ size()

size_t size ( ) const
inlinenoexcept

Gets the size of the gamma correction table.

The size represents the number of UInt16 values used to independently represent each RGB curve.

Returns
The size of the gamma correction table.

◆ fill()

void fill ( Float64  gamma,
Float64  brightness,
Float64  contrast 
)
noexcept

Fill method for setting table values.

This auxiliary method allows setting gamma, brightness, and contrast values for the table.

Parameters
gammaThe gamma correction value.
brightnessThe brightness adjustment value.
contrastThe contrast adjustment value.

◆ red() [1/2]

std::span< UInt16 > red ( )
inlinenoexcept

Gets a pointer to the beginning of the red curve in the array.

Returns
Pointer to the red curve in the array, or nullptr if the table size is 0.

◆ green() [1/2]

std::span< UInt16 > green ( )
inlinenoexcept

Gets a pointer to the beginning of the green curve in the array.

Returns
Pointer to the green curve in the array, or nullptr if the table size is 0.

◆ blue() [1/2]

std::span< UInt16 > blue ( )
inlinenoexcept

Gets a pointer to the beginning of the blue curve in the array.

Returns
Pointer to the blue curve in the array, or nullptr if the table size is 0.

◆ red() [2/2]

std::span< const UInt16 > red ( ) const
inlinenoexcept

Gets a read-only view of the red curve in the array.

Returns
A span over the red curve; empty if the table size is 0.

◆ green() [2/2]

std::span< const UInt16 > green ( ) const
inlinenoexcept

Gets a read-only view of the green curve in the array.

Returns
A span over the green curve; empty if the table size is 0.

◆ blue() [2/2]

std::span< const UInt16 > blue ( ) const
inlinenoexcept

Gets a read-only view of the blue curve in the array.

Returns
A span over the blue curve; empty if the table size is 0.