neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::hsv_color Class Reference

#include <hsv_color.hpp>

Public Member Functions

 hsv_color ()
 
 hsv_color (double aHue, double aSaturation, double aValue, double aAlpha=1.0)
 
template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
 hsv_color (const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
 
double hue () const
 
double saturation () const
 
double value () const
 
double brightness () const
 
double alpha () const
 
void set_hue (double aHue)
 
void set_saturation (double aSaturation)
 
void set_value (double aValue)
 
void set_brightness (double aBrightness)
 
void set_alpha (double aAlpha)
 
bool hue_undefined () const
 
hsv_color with_hue (double aNewHue) const
 
hsv_color with_saturation (double aNewSaturation) const
 
hsv_color with_value (double aNewValue) const
 
hsv_color with_brightness (double aNewLightness) const
 
hsv_color brighter (double aDelta) const
 
hsv_color brighter (double aCoeffecient, double aDelta) const
 
void to_rgb (scalar &aRed, scalar &aGreen, scalar &aBlue, scalar &aAlpha) const
 
template<typename RgbColor >
RgbColor::return_type to_rgb () const
 
bool operator== (const hsv_color &aOther) const
 
bool operator!= (const hsv_color &aOther) const
 
bool operator< (const hsv_color &aOther) const
 

Static Public Member Functions

static hsv_color from_rgb (scalar aRed, scalar aGreen, scalar aBlue, scalar aAlpha=1.0)
 
template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
static hsv_color from_rgb (const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &aColor)
 
static double undefined_hue ()
 

Detailed Description

Definition at line 29 of file hsv_color.hpp.

Constructor & Destructor Documentation

◆ hsv_color() [1/3]

neogfx::hsv_color::hsv_color ( )

◆ hsv_color() [2/3]

neogfx::hsv_color::hsv_color ( double  aHue,
double  aSaturation,
double  aValue,
double  aAlpha = 1.0 
)

◆ hsv_color() [3/3]

template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
neogfx::hsv_color::hsv_color ( const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &  aColor)
inline

Definition at line 35 of file hsv_color.hpp.

Member Function Documentation

◆ alpha()

double neogfx::hsv_color::alpha ( ) const

◆ brighter() [1/2]

hsv_color neogfx::hsv_color::brighter ( double  aCoeffecient,
double  aDelta 
) const

◆ brighter() [2/2]

hsv_color neogfx::hsv_color::brighter ( double  aDelta) const

◆ brightness()

double neogfx::hsv_color::brightness ( ) const

◆ from_rgb() [1/2]

template<color_space ColorSpace, typename BaseComponent , typename ViewComponent = BaseComponent, typename Derived = void>
static hsv_color neogfx::hsv_color::from_rgb ( const basic_rgb_color< ColorSpace, BaseComponent, ViewComponent, Derived > &  aColor)
inlinestatic

Definition at line 71 of file hsv_color.hpp.

◆ from_rgb() [2/2]

static hsv_color neogfx::hsv_color::from_rgb ( scalar  aRed,
scalar  aGreen,
scalar  aBlue,
scalar  aAlpha = 1.0 
)
static

◆ hue()

double neogfx::hsv_color::hue ( ) const

◆ hue_undefined()

bool neogfx::hsv_color::hue_undefined ( ) const

◆ operator!=()

bool neogfx::hsv_color::operator!= ( const hsv_color aOther) const

◆ operator<()

bool neogfx::hsv_color::operator< ( const hsv_color aOther) const

◆ operator==()

bool neogfx::hsv_color::operator== ( const hsv_color aOther) const

◆ saturation()

double neogfx::hsv_color::saturation ( ) const

◆ set_alpha()

void neogfx::hsv_color::set_alpha ( double  aAlpha)

◆ set_brightness()

void neogfx::hsv_color::set_brightness ( double  aBrightness)

◆ set_hue()

void neogfx::hsv_color::set_hue ( double  aHue)

◆ set_saturation()

void neogfx::hsv_color::set_saturation ( double  aSaturation)

◆ set_value()

void neogfx::hsv_color::set_value ( double  aValue)

◆ to_rgb() [1/2]

template<typename RgbColor >
RgbColor::return_type neogfx::hsv_color::to_rgb ( ) const
inline

Definition at line 58 of file hsv_color.hpp.

◆ to_rgb() [2/2]

void neogfx::hsv_color::to_rgb ( scalar aRed,
scalar aGreen,
scalar aBlue,
scalar aAlpha 
) const

◆ undefined_hue()

static double neogfx::hsv_color::undefined_hue ( )
static

◆ value()

double neogfx::hsv_color::value ( ) const

◆ with_brightness()

hsv_color neogfx::hsv_color::with_brightness ( double  aNewLightness) const

◆ with_hue()

hsv_color neogfx::hsv_color::with_hue ( double  aNewHue) const

◆ with_saturation()

hsv_color neogfx::hsv_color::with_saturation ( double  aNewSaturation) const

◆ with_value()

hsv_color neogfx::hsv_color::with_value ( double  aNewValue) const

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