17#ifndef __albaColor_H__
18#define __albaColor_H__
56 void Set( wxColour col );
61 void SetRGB(
int r,
int g,
int b,
int a=-1 );
63 void GetRGB(
int *r,
int *g,
int *b,
int *a= NULL );
72 void SetFloatRGB(
double r,
double g,
double b,
double o=-1 );
75 void GetFloatRGB(
double *r,
double *g,
double *b,
double *o );
85 static void RGBToHSV(
int r,
int g,
int b,
int *h,
int *s,
int *v);
87 static void HSVToRGB(
int h,
int s,
int v,
int *r,
int *g,
int *b);
90 static void RGBToHSL(
int r,
int g,
int b,
int *h,
int *s,
int *l);
92 static void HSLToRGB(
int h,
int s,
int v,
int *r,
int *g,
int *b);
albaColor is a class representing an RGBA color:
void SetRGB(int r, int g, int b, int a=-1)
Set using integer RGBA - components in [0..255].
static void RGBToHSL(int r, int g, int b, int *h, int *s, int *l)
static function - conversion from RGB to HSL, all represented on Integer
static void RGBToHSV(int r, int g, int b, int *h, int *s, int *v)
static function - conversion from RGB to HSV, all represented on Integer
static albaColor InterpolateHSV(albaColor c1, albaColor c2, double t)
static function - Interpolate two color using a weight t in HSV space.
static void HSLToRGB(int h, int s, int v, int *r, int *g, int *b)
static function - conversion from RGB to HSL, all represented on Integer
void SetFloatRGB(double r, double g, double b, double o=-1)
Set using double RGBA - components normalized on [0,1].
void GetRGB(int *r, int *g, int *b, int *a=NULL)
Get returning integer RGBA - components in [0..255].
void Set(wxColour col)
Set using wxColour.
wxColour Get()
Get returning wxColour.
int m_Blue
rgb color representation
albaColor(int r, int g, int b, int a=0)
ctor accepting an integer RGBA
void GetFloatRGB(double *r, double *g, double *b, double *o)
Get returning double RGBA - components normalized on [0,1].
albaColor(wxColour col)
ctor accepting an wxColour
static albaColor CheckeredColor(albaColor c, int x, int y)
static function - used to visually render a transparent color.
void GetHSV(int *h, int *s, int *v)
Set returning integer HSV - H in [0..360] ,S,V in [0..255].
albaColor(double *vtkRGBA)
ctor accepting an vtk color
void HSVToRGB()
Force updating the RGB representation.
void RGBToHSV()
Force updating the HSV representation.
static albaColor InterpolateRGB(albaColor c1, albaColor c2, double t)
static function - Interpolate two color using a weight t in RGB space.
static void HSVToRGB(int h, int s, int v, int *r, int *g, int *b)
static function - conversion from HSV to RGB, all represented on Integer
void SetHSV(int h, int s, int v)
Set using integer HSV - H in [0..360] ,S,V in [0..255].