ALBA
|
#include <albaColor.h>
Public Member Functions | |
albaColor () | |
albaColor (int r, int g, int b, int a=0) | |
albaColor (double *vtkRGBA) | |
albaColor (wxColour col) | |
void | Set (wxColour col) |
wxColour | Get () |
void | SetRGB (int r, int g, int b, int a=-1) |
void | GetRGB (int *r, int *g, int *b, int *a=NULL) |
void | SetHSV (int h, int s, int v) |
void | GetHSV (int *h, int *s, int *v) |
void | SetFloatRGB (double r, double g, double b, double o=-1) |
void | GetFloatRGB (double *r, double *g, double *b, double *o) |
void | HSVToRGB () |
void | RGBToHSV () |
Static Public Member Functions | |
static void | RGBToHSV (int r, int g, int b, int *h, int *s, int *v) |
static void | HSVToRGB (int h, int s, int v, int *r, int *g, int *b) |
static void | RGBToHSL (int r, int g, int b, int *h, int *s, int *l) |
static void | HSLToRGB (int h, int s, int v, int *r, int *g, int *b) |
static albaColor | InterpolateHSV (albaColor c1, albaColor c2, double t) |
static albaColor | InterpolateRGB (albaColor c1, albaColor c2, double t) |
static albaColor | CheckeredColor (albaColor c, int x, int y) |
Public Attributes | |
int | m_Red |
int | m_Green |
int | m_Blue |
int | m_Hue |
int | m_Saturation |
int | m_Value |
int | m_Alpha |
albaColor is a class representing an RGBA color:
Definition at line 42 of file albaColor.h.
albaColor::albaColor | ( | ) |
default ctor
albaColor::albaColor | ( | int | r, |
int | g, | ||
int | b, | ||
int | a = 0 |
||
) |
ctor accepting an integer RGBA
albaColor::albaColor | ( | double * | vtkRGBA | ) |
ctor accepting an vtk color
albaColor::albaColor | ( | wxColour | col | ) |
ctor accepting an wxColour
void albaColor::Set | ( | wxColour | col | ) |
Set using wxColour.
wxColour albaColor::Get | ( | ) |
Get returning wxColour.
void albaColor::SetRGB | ( | int | r, |
int | g, | ||
int | b, | ||
int | a = -1 |
||
) |
Set using integer RGBA - components in [0..255].
void albaColor::GetRGB | ( | int * | r, |
int * | g, | ||
int * | b, | ||
int * | a = NULL |
||
) |
Get returning integer RGBA - components in [0..255].
void albaColor::SetHSV | ( | int | h, |
int | s, | ||
int | v | ||
) |
Set using integer HSV - H in [0..360] ,S,V in [0..255].
void albaColor::GetHSV | ( | int * | h, |
int * | s, | ||
int * | v | ||
) |
Set returning integer HSV - H in [0..360] ,S,V in [0..255].
void albaColor::SetFloatRGB | ( | double | r, |
double | g, | ||
double | b, | ||
double | o = -1 |
||
) |
Set using double RGBA - components normalized on [0,1].
void albaColor::GetFloatRGB | ( | double * | r, |
double * | g, | ||
double * | b, | ||
double * | o | ||
) |
Get returning double RGBA - components normalized on [0,1].
void albaColor::HSVToRGB | ( | ) |
Force updating the RGB representation.
void albaColor::RGBToHSV | ( | ) |
Force updating the HSV representation.
|
static |
static function - conversion from RGB to HSV, all represented on Integer
|
static |
static function - conversion from HSV to RGB, all represented on Integer
|
static |
static function - conversion from RGB to HSL, all represented on Integer
|
static |
static function - conversion from RGB to HSL, all represented on Integer
static function - Interpolate two color using a weight t in HSV space.
t=0 return c1, t=1 return c2
static function - Interpolate two color using a weight t in RGB space.
t=0 return c1, t=1 return c2
Referenced by CheckeredColor().
static function - used to visually render a transparent color.
The resulting color depend on the position, and form a checkered pattern
Definition at line 102 of file albaColor.h.
References InterpolateRGB(), and m_Alpha.
int albaColor::m_Red |
Definition at line 115 of file albaColor.h.
int albaColor::m_Green |
Definition at line 115 of file albaColor.h.
int albaColor::m_Blue |
rgb color representation
Definition at line 115 of file albaColor.h.
int albaColor::m_Hue |
Definition at line 116 of file albaColor.h.
int albaColor::m_Saturation |
Definition at line 116 of file albaColor.h.
int albaColor::m_Value |
hsv color representation
Definition at line 116 of file albaColor.h.
int albaColor::m_Alpha |