KiCad PCB EDA Suite
KIGFX::COLOR4D Class Reference

Class COLOR4D is the color representation with 4 components: red, green, blue, alpha. More...

#include <color4d.h>

Public Member Functions

 COLOR4D ()
 
 COLOR4D (double aRed, double aGreen, double aBlue, double aAlpha)
 Constructor. More...
 
 COLOR4D (EDA_COLOR_T aColor)
 Constructor. More...
 
COLOR4DBrighten (double aFactor)
 Function Brighten Makes the color brighter by a given factor. More...
 
COLOR4DDarken (double aFactor)
 Function Darken Makes the color darker by a given factor. More...
 
COLOR4DInvert ()
 Function Invert Makes the color inverted, alpha remains the same. More...
 
COLOR4DSaturate (double aFactor)
 Saturates the color to a given factor (in HSV model) More...
 
COLOR4D Brightened (double aFactor) const
 Function Brightened Returns a color that is brighter by a given factor, without modifying object. More...
 
COLOR4D Darkened (double aFactor) const
 Function Darkened Returns a color that is darker by a given factor, without modifying object. More...
 
COLOR4D WithAlpha (double aAlpha) const
 Function WithAlpha Returns a colour with the same colour, but the given alpha. More...
 
COLOR4D Inverted () const
 Function Inverted Returns an inverted color, alpha remains the same. More...
 
double GetBrightness () const
 Function GetBrightness Returns the brightness value of the color ranged from 0.0 to 1.0. More...
 
void ToHSV (double &aOutHue, double &aOutSaturation, double &aOutValue, bool aAlwaysDefineHue=false) const
 Function ToHSV() Converts current color (stored in RGB) to HSV format. More...
 
void FromHSV (double aInH, double aInS, double aInV)
 Function FromHSV() Changes currently used color to the one given by hue, saturation and value parameters. More...
 

Public Attributes

double r
 Red component. More...
 
double g
 Green component. More...
 
double b
 Blue component. More...
 
double a
 Alpha component. More...
 

Static Public Attributes

static const COLOR4D UNSPECIFIED
 For legacy support; used as a value to indicate color hasn't been set yet. More...
 
static const COLOR4D WHITE
 
static const COLOR4D BLACK
 

Detailed Description

Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.

Definition at line 39 of file color4d.h.

Constructor & Destructor Documentation

KIGFX::COLOR4D::COLOR4D ( )
inline

Definition at line 43 of file color4d.h.

Referenced by Brightened(), COLOR4D(), Darkened(), Inverted(), and WithAlpha().

43  :
44  r( 0 ), g( 0 ), b( 0 ), a( 1.0 )
45  {
46  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
double r
Red component.
Definition: color4d.h:291
KIGFX::COLOR4D::COLOR4D ( double  aRed,
double  aGreen,
double  aBlue,
double  aAlpha 
)
inline

Constructor.

Parameters
aRedis the red component [0.0 .. 1.0].
aGreenis the green component [0.0 .. 1.0].
aBlueis the blue component [0.0 .. 1.0].
aAlphais the alpha value [0.0 .. 1.0].

Definition at line 56 of file color4d.h.

References a, b, COLOR4D(), g, and r.

56  :
57  r( aRed ), g( aGreen ), b( aBlue ), a( aAlpha )
58  {
59  assert( r >= 0.0 && r <= 1.0 );
60  assert( g >= 0.0 && g <= 1.0 );
61  assert( b >= 0.0 && b <= 1.0 );
62  assert( a >= 0.0 && a <= 1.0 );
63  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
double r
Red component.
Definition: color4d.h:291
COLOR4D::COLOR4D ( EDA_COLOR_T  aColor)

Constructor.

Parameters
aColoris one of KiCad's palette colors.
See also
EDA_COLOR_T

Definition at line 32 of file color4d.cpp.

References a, b, BLACK, COLOR4D(), ColorFindNearest(), g, g_ColorRefs, StructColors::m_Blue, StructColors::m_Green, StructColors::m_LightColor, StructColors::m_Red, NBCOLORS, NextColor(), r, ToHSV(), and UNSPECIFIED.

33 {
34  if( aColor <= UNSPECIFIED_COLOR || aColor >= NBCOLORS )
35  {
36  *this = COLOR4D::UNSPECIFIED;
37  return;
38  }
39 
40  r = g_ColorRefs[aColor].m_Red / 255.0;
41  g = g_ColorRefs[aColor].m_Green / 255.0;
42  b = g_ColorRefs[aColor].m_Blue / 255.0;
43  a = 1.0;
44 }
unsigned char m_Red
Definition: colors.h:146
unsigned char m_Green
Definition: colors.h:145
double g
Green component.
Definition: color4d.h:292
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn&#39;t been set yet.
Definition: color4d.h:297
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
unsigned char m_Blue
Definition: colors.h:144
const StructColors g_ColorRefs[NBCOLORS]
The predefined colors used in KiCad.
Definition: colors.cpp:37
double r
Red component.
Definition: color4d.h:291
Number of colors.
Definition: colors.h:75

Member Function Documentation

COLOR4D& KIGFX::COLOR4D::Brighten ( double  aFactor)
inline

Function Brighten Makes the color brighter by a given factor.

Parameters
aFactorSpecifies how bright the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D& Brightened color.

Definition at line 152 of file color4d.h.

References b, g, and r.

153  {
154  assert( aFactor >= 0.0 && aFactor <= 1.0 );
155 
156  r = r * ( 1.0 - aFactor ) + aFactor;
157  g = g * ( 1.0 - aFactor ) + aFactor;
158  b = b * ( 1.0 - aFactor ) + aFactor;
159 
160  return *this;
161  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double r
Red component.
Definition: color4d.h:291
COLOR4D KIGFX::COLOR4D::Brightened ( double  aFactor) const
inline

Function Brightened Returns a color that is brighter by a given factor, without modifying object.

Parameters
aFactorSpecifies how bright the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D Highlighted color.

Definition at line 205 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::ImportLegacyColors(), and KIGFX::RENDER_SETTINGS::update().

206  {
207  assert( aFactor >= 0.0 && aFactor <= 1.0 );
208 
209  return COLOR4D( r * ( 1.0 - aFactor ) + aFactor,
210  g * ( 1.0 - aFactor ) + aFactor,
211  b * ( 1.0 - aFactor ) + aFactor,
212  a );
213  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
double r
Red component.
Definition: color4d.h:291
COLOR4D& KIGFX::COLOR4D::Darken ( double  aFactor)
inline

Function Darken Makes the color darker by a given factor.

Parameters
aFactorSpecifies how dark the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D& Darkened color.

Definition at line 169 of file color4d.h.

References b, g, and r.

Referenced by SetLayerColor().

170  {
171  assert( aFactor >= 0.0 && aFactor <= 1.0 );
172 
173  r = r * ( 1.0 - aFactor );
174  g = g * ( 1.0 - aFactor );
175  b = b * ( 1.0 - aFactor );
176 
177  return *this;
178  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double r
Red component.
Definition: color4d.h:291
COLOR4D KIGFX::COLOR4D::Darkened ( double  aFactor) const
inline

Function Darkened Returns a color that is darker by a given factor, without modifying object.

Parameters
aFactorSpecifies how dark the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D Darkened color.

Definition at line 221 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::ImportLegacyColors(), and KIGFX::RENDER_SETTINGS::update().

222  {
223  assert( aFactor >= 0.0 && aFactor <= 1.0 );
224 
225  return COLOR4D( r * ( 1.0 - aFactor ),
226  g * ( 1.0 - aFactor ),
227  b * ( 1.0 - aFactor ),
228  a );
229  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
double r
Red component.
Definition: color4d.h:291
void COLOR4D::FromHSV ( double  aInH,
double  aInS,
double  aInV 
)

Function FromHSV() Changes currently used color to the one given by hue, saturation and value parameters.

Parameters
aInHis hue component, in degrees.
aInSis saturation component.
aInVis value component.

Definition at line 325 of file color4d.cpp.

References b, g, i, and r.

Referenced by COLOR4D_PICKER_DLG::createHSVBitmap(), GetBrightness(), COLOR4D_PICKER_DLG::OnChangeBrightness(), COLOR4D_PICKER_DLG::OnChangeEditHue(), COLOR4D_PICKER_DLG::OnChangeEditSat(), Saturate(), and COLOR4D_PICKER_DLG::setHSvaluesFromCursor().

326 {
327  if( aInS <= 0.0 )
328  {
329  r = aInV;
330  g = aInV;
331  b = aInV;
332  return;
333  }
334 
335  double hh = aInH;
336 
337  while( hh >= 360.0 )
338  hh -= 360.0;
339 
340  /* Hue in degrees (0...360) is coded according to this table
341  * 0 or 360 : red
342  * 60 : yellow
343  * 120 : green
344  * 180 : cyan
345  * 240 : blue
346  * 300 : magenta
347  */
348  hh /= 60.0;
349 
350  int i = (int) hh;
351  double ff = hh - i;
352 
353  double p = aInV * ( 1.0 - aInS );
354  double q = aInV * ( 1.0 - ( aInS * ff ) );
355  double t = aInV * ( 1.0 - ( aInS * ( 1.0 - ff ) ) );
356 
357  switch( i )
358  {
359  case 0:
360  r = aInV;
361  g = t;
362  b = p;
363  break;
364 
365  case 1:
366  r = q;
367  g = aInV;
368  b = p;
369  break;
370 
371  case 2:
372  r = p;
373  g = aInV;
374  b = t;
375  break;
376 
377  case 3:
378  r = p;
379  g = q;
380  b = aInV;
381  break;
382 
383  case 4:
384  r = t;
385  g = p;
386  b = aInV;
387  break;
388 
389  case 5:
390  default:
391  r = aInV;
392  g = p;
393  b = q;
394  break;
395  }
396 }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
size_t i
Definition: json11.cpp:597
double r
Red component.
Definition: color4d.h:291
double KIGFX::COLOR4D::GetBrightness ( ) const
inline

Function GetBrightness Returns the brightness value of the color ranged from 0.0 to 1.0.

Returns
The brightness value.

Definition at line 259 of file color4d.h.

References b, FromHSV(), g, r, and ToHSV().

Referenced by DrawGraphicHaloText(), KIGFX::PCB_RENDER_SETTINGS::IsBackgroundDark(), and EDA_DRAW_PANEL::ReDraw().

260  {
261  // Weighted W3C formula
262  return r * 0.299 + g * 0.587 + b * 0.117;
263  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double r
Red component.
Definition: color4d.h:291
COLOR4D& KIGFX::COLOR4D::Invert ( )
inline

Function Invert Makes the color inverted, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 185 of file color4d.h.

References b, g, r, and Saturate().

Referenced by EDA_DRAW_PANEL::DrawCrossHair().

186  {
187  r = ( 1.0 - r );
188  g = ( 1.0 - g );
189  b = ( 1.0 - b );
190 
191  return *this;
192  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double r
Red component.
Definition: color4d.h:291
COLOR4D KIGFX::COLOR4D::Inverted ( ) const
inline

Function Inverted Returns an inverted color, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 249 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::PCB_RENDER_SETTINGS::ImportLegacyColors().

250  {
251  return COLOR4D( 1.0 - r, 1.0 - g, 1.0 - b, a );
252  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double a
Alpha component.
Definition: color4d.h:294
double r
Red component.
Definition: color4d.h:291
COLOR4D & COLOR4D::Saturate ( double  aFactor)

Saturates the color to a given factor (in HSV model)

Definition at line 399 of file color4d.cpp.

References BLACK, FromHSV(), ToHSV(), UNSPECIFIED, and WHITE.

Referenced by Invert().

400 {
401  double h, s, v;
402 
403  ToHSV( h, s, v );
404  FromHSV( h, aFactor, 1.0 );
405 
406  return *this;
407 }
void ToHSV(double &aOutHue, double &aOutSaturation, double &aOutValue, bool aAlwaysDefineHue=false) const
Function ToHSV() Converts current color (stored in RGB) to HSV format.
Definition: color4d.cpp:272
void FromHSV(double aInH, double aInS, double aInV)
Function FromHSV() Changes currently used color to the one given by hue, saturation and value paramet...
Definition: color4d.cpp:325
void COLOR4D::ToHSV ( double &  aOutHue,
double &  aOutSaturation,
double &  aOutValue,
bool  aAlwaysDefineHue = false 
) const

Function ToHSV() Converts current color (stored in RGB) to HSV format.

Parameters
aOutHueis the conversion result for hue component, in degrees 0 ... 360.0
aOutSaturationis the conversion result for saturation component (0 ... 1.0).
aOutValueis conversion result for value component (0 ... 1.0).
aAlwaysDefineHuecontrols the way hue is defined when r = v = b
Note
saturation is set to 0.0 for black color (r = v = b = 0), and if r = v = b, hue is set to 0.0 if aAlwaysDefineHue = true, and set to NAN if aAlwaysDefineHue = false. this option is usefull to convert a 4D color to a legacy color, because Red has hue = 0, therefore aAlwaysDefineHue = false makes difference between Red and Gray colors.

Definition at line 272 of file color4d.cpp.

References b, delta, g, max, min, and r.

Referenced by COLOR4D_PICKER_DLG::buttColorClick(), COLOR4D(), COLOR4D_PICKER_DLG::COLOR4D_PICKER_DLG(), GetBrightness(), COLOR4D_PICKER_DLG::onRGBMouseDrag(), Saturate(), and COLOR4D_PICKER_DLG::SetEditVals().

273 {
274  double min, max, delta;
275 
276  min = r < g ? r : g;
277  min = min < b ? min : b;
278 
279  max = r > g ? r : g;
280  max = max > b ? max : b;
281 
282  aOutValue = max; // value
283  delta = max - min;
284 
285  if( max > 0.0 )
286  {
287  aOutSaturation = ( delta / max );
288  }
289  else // for black color (r = g = b = 0 ) saturation is set to 0.
290  {
291  aOutSaturation = 0.0;
292  aOutHue = aAlwaysDefineHue ? 0.0 : NAN;
293  return;
294  }
295 
296  /* Hue in degrees (0...360) is coded according to this table
297  * 0 or 360 : red
298  * 60 : yellow
299  * 120 : green
300  * 180 : cyan
301  * 240 : blue
302  * 300 : magenta
303  */
304  if( delta != 0.0 )
305  {
306  if( r >= max )
307  aOutHue = ( g - b ) / delta; // between yellow & magenta
308  else if( g >= max )
309  aOutHue = 2.0 + ( b - r ) / delta; // between cyan & yellow
310  else
311  aOutHue = 4.0 + ( r - g ) / delta; // between magenta & cyan
312 
313  aOutHue *= 60.0; // degrees
314 
315  if( aOutHue < 0.0 )
316  aOutHue += 360.0;
317  }
318  else // delta = 0 means r = g = b. hue is set to 0.0
319  {
320  aOutHue = aAlwaysDefineHue ? 0.0 : NAN;
321  }
322 }
double g
Green component.
Definition: color4d.h:292
static const int delta[8][2]
Definition: solve.cpp:112
double b
Blue component.
Definition: color4d.h:293
#define max(a, b)
Definition: auxiliary.h:86
double r
Red component.
Definition: color4d.h:291
#define min(a, b)
Definition: auxiliary.h:85
COLOR4D KIGFX::COLOR4D::WithAlpha ( double  aAlpha) const
inline

Function WithAlpha Returns a colour with the same colour, but the given alpha.

Parameters
aAlphaspecifies the alpha of the new color
Returns
COLOR4D color with that alpha

Definition at line 237 of file color4d.h.

References b, COLOR4D(), g, and r.

Referenced by drawLineWithHilight(), makeBitmap(), DIALOG_COPPER_ZONE::makeLayerBitmap(), ZONE_CREATE_HELPER::OnFirstPoint(), PCB_EDIT_FRAME::PrepareLayerIndicator(), and LAYER_SELECTOR::SetBitmapLayer().

238  {
239  assert( aAlpha >= 0.0 && aAlpha <= 1.0 );
240 
241  return COLOR4D( r, g, b, aAlpha );
242  }
double g
Green component.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:293
double r
Red component.
Definition: color4d.h:291

Member Data Documentation

double KIGFX::COLOR4D::b

Blue component.

Definition at line 293 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), COLOR4D_PICKER_DLG::buttColorClick(), KIGFX::CAIRO_GAL::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), COLOR4D_PICKER_DLG::createRGBBitmap(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL::drawGridLine(), KIGFX::CAIRO_GAL::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), COLOR4D_PICKER_DLG::drawRGBPalette(), KIGFX::CAIRO_GAL::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), COLOR4D_PICKER_DLG::OnChangeEditBlue(), COLOR4D_PICKER_DLG::onRGBMouseDrag(), KIGFX::operator==(), PSLIKE_PLOTTER::SetColor(), COLOR4D_PICKER_DLG::SetEditVals(), KIGFX::CAIRO_GAL::SetFillColor(), COLOR4D_PICKER_DLG::setIconColor(), KIGFX::CAIRO_GAL::SetStrokeColor(), KIGFX::CAIRO_GAL::storePath(), ToHSV(), and WithAlpha().

double KIGFX::COLOR4D::g

Green component.

Definition at line 292 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), COLOR4D_PICKER_DLG::buttColorClick(), KIGFX::CAIRO_GAL::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), COLOR4D_PICKER_DLG::createRGBBitmap(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL::drawGridLine(), KIGFX::CAIRO_GAL::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), COLOR4D_PICKER_DLG::drawRGBPalette(), KIGFX::CAIRO_GAL::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), COLOR4D_PICKER_DLG::OnChangeEditGreen(), COLOR4D_PICKER_DLG::onRGBMouseDrag(), KIGFX::operator==(), PSLIKE_PLOTTER::SetColor(), COLOR4D_PICKER_DLG::SetEditVals(), KIGFX::CAIRO_GAL::SetFillColor(), COLOR4D_PICKER_DLG::setIconColor(), KIGFX::CAIRO_GAL::SetStrokeColor(), KIGFX::CAIRO_GAL::storePath(), ToHSV(), and WithAlpha().

double KIGFX::COLOR4D::r

Red component.

Definition at line 291 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), COLOR4D_PICKER_DLG::buttColorClick(), KIGFX::CAIRO_GAL::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), COLOR4D_PICKER_DLG::createRGBBitmap(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL::drawGridLine(), KIGFX::CAIRO_GAL::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), COLOR4D_PICKER_DLG::drawRGBPalette(), KIGFX::CAIRO_GAL::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), COLOR4D_PICKER_DLG::OnChangeEditRed(), COLOR4D_PICKER_DLG::onRGBMouseDrag(), KIGFX::operator==(), PSLIKE_PLOTTER::SetColor(), COLOR4D_PICKER_DLG::SetEditVals(), KIGFX::CAIRO_GAL::SetFillColor(), COLOR4D_PICKER_DLG::setIconColor(), KIGFX::CAIRO_GAL::SetStrokeColor(), KIGFX::CAIRO_GAL::storePath(), ToHSV(), and WithAlpha().

return COLOR4D::UNSPECIFIED
static

For legacy support; used as a value to indicate color hasn't been set yet.

Definition at line 297 of file color4d.h.

Referenced by COLOR4D(), and Saturate().

const COLOR4D COLOR4D::WHITE
static

Definition at line 300 of file color4d.h.

Referenced by Saturate().


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