hyperion.ng
Public Member Functions | List of all members
RgbTransform Class Reference

Color transformation to adjust the saturation and value of a RGB color value. More...

#include <RgbTransform.h>

Public Member Functions

 RgbTransform ()
 Default constructor.
 
 RgbTransform (double gammaR, double gammaG, double gammaB, double backlightThreshold, bool backlightColored, uint8_t brightness, uint8_t brightnessCompensation)
 Constructor. More...
 
 ~RgbTransform ()
 Destructor.
 
double getGammaR () const
 
double getGammaG () const
 
double getGammaB () const
 
void setGamma (double gammaR, double gammaG=-1, double gammaB=-1)
 
int getBacklightThreshold () const
 
void setBacklightThreshold (int backlightThreshold)
 
bool getBacklightColored () const
 
void setBacklightColored (bool backlightColored)
 
bool getBackLightEnabled () const
 
void setBackLightEnabled (bool enable)
 
uint8_t getBrightness () const
 
void setBrightness (uint8_t brightness)
 
uint8_t getBrightnessCompensation () const
 
void setBrightnessCompensation (uint8_t brightnessCompensation)
 
void getBrightnessComponents (uint8_t &rgb, uint8_t &cmy, uint8_t &w)
 get component values of brightness for compensated brightness More...
 
void transform (uint8_t &red, uint8_t &green, uint8_t &blue)
 Apply the transform the the given RGB values. More...
 

Detailed Description

Color transformation to adjust the saturation and value of a RGB color value.

Constructor & Destructor Documentation

§ RgbTransform()

RgbTransform::RgbTransform ( double  gammaR,
double  gammaG,
double  gammaB,
double  backlightThreshold,
bool  backlightColored,
uint8_t  brightness,
uint8_t  brightnessCompensation 
)

Constructor.

Parameters
gammaRThe used red gamma
gammaGThe used green gamma
gammabThe used blue gamma
backlightThresholdThe used lower brightness
backlightColoreduse color in backlight
brightnessHighThe used higher brightness

Member Function Documentation

§ getBacklightColored()

bool RgbTransform::getBacklightColored ( ) const
Returns
The current state

§ getBackLightEnabled()

bool RgbTransform::getBackLightEnabled ( ) const
Returns
return state of backlight

§ getBacklightThreshold()

int RgbTransform::getBacklightThreshold ( ) const
Returns
The current lower brightness

§ getBrightness()

uint8_t RgbTransform::getBrightness ( ) const
Returns
The current brightness

§ getBrightnessCompensation()

uint8_t RgbTransform::getBrightnessCompensation ( ) const
Returns
The current brightnessCompensation value

§ getBrightnessComponents()

void RgbTransform::getBrightnessComponents ( uint8_t &  rgb,
uint8_t &  cmy,
uint8_t &  w 
)

get component values of brightness for compensated brightness

Parameters
rgbthe rgb component
cmythe cyan magenta yellow component
wthe white component
Note
The values are updated in place.

§ getGammaB()

double RgbTransform::getGammaB ( ) const
Returns
The current blue gamma value

§ getGammaG()

double RgbTransform::getGammaG ( ) const
Returns
The current green gamma value

§ getGammaR()

double RgbTransform::getGammaR ( ) const
Returns
The current red gamma value

§ setBacklightColored()

void RgbTransform::setBacklightColored ( bool  backlightColored)
Parameters
backlightColoreden/disable colored backlight

§ setBackLightEnabled()

void RgbTransform::setBackLightEnabled ( bool  enable)
Parameters
enableen/disable backlight

§ setBacklightThreshold()

void RgbTransform::setBacklightThreshold ( int  backlightThreshold)
Parameters
backlightThresholdNew lower brightness

§ setBrightness()

void RgbTransform::setBrightness ( uint8_t  brightness)
Parameters
brightnessNew brightness

§ setBrightnessCompensation()

void RgbTransform::setBrightnessCompensation ( uint8_t  brightnessCompensation)
Parameters
brightnessCompensationnew brightnessCompensation

§ setGamma()

void RgbTransform::setGamma ( double  gammaR,
double  gammaG = -1,
double  gammaB = -1 
)
Parameters
gammaRNew red gamma value
gammaGNew green gamma value
gammaBNew blue gamma value

§ transform()

void RgbTransform::transform ( uint8_t &  red,
uint8_t &  green,
uint8_t &  blue 
)

Apply the transform the the given RGB values.

Parameters
redThe red color component
greenThe green color component
blueThe blue color component
Note
The values are updated in place.

The documentation for this class was generated from the following files: