KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::COLOR4D Class Reference

A 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)
 
 COLOR4D (EDA_COLOR_T aColor)
 
COLOR4DFromCSSRGBA (int aRed, int aGreen, int aBlue, double aAlpha=1.0)
 Initialize the color from a RGBA value with 0-255 red/green/blue and 0-1 alpha. More...
 
 COLOR4D (const wxString &aColorStr)
 Defines a color from a CSS or HTML-type string. More...
 
 COLOR4D (const wxColour &aColor)
 
bool SetFromWxString (const wxString &aColorString)
 Set color values by parsing a string using wxColour::Set(). More...
 
wxString ToCSSString () const
 
bool SetFromHexString (const wxString &aColorString)
 
wxString ToHexString () const
 
wxColour ToColour () const
 
COLOR4D LegacyMix (const COLOR4D &aColor) const
 Mix this COLOR4D with an input COLOR4D using the OR-mixing of legacy canvas. More...
 
void ToHSL (double &aOutHue, double &aOutSaturation, double &aOutValue) const
 Converts current color (stored in RGB) to HSL format. More...
 
void FromHSL (double aInHue, double aInSaturation, double aInLightness)
 Change currently used color to the one given by hue, saturation and lightness parameters. More...
 
COLOR4DBrighten (double aFactor)
 Makes the color brighter by a given factor. More...
 
COLOR4DDarken (double aFactor)
 Makes the color darker by a given factor. More...
 
COLOR4DInvert ()
 Makes the color inverted, alpha remains the same. More...
 
COLOR4DSaturate (double aFactor)
 Saturates the color to a given factor (in HSV model) More...
 
COLOR4DDesaturate ()
 Removes color (in HSL model) More...
 
COLOR4D Brightened (double aFactor) const
 Return a color that is brighter by a given factor, without modifying object. More...
 
COLOR4D Darkened (double aFactor) const
 Return a color that is darker by a given factor, without modifying object. More...
 
COLOR4D Mix (const COLOR4D &aColor, double aFactor) const
 Return a color that is mixed with the input by a factor. More...
 
COLOR4D WithAlpha (double aAlpha) const
 Return a color with the same color, but the given alpha. More...
 
COLOR4D Inverted () const
 Returns an inverted color, alpha remains the same. More...
 
double GetBrightness () const
 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
 Convert current color (stored in RGB) to HSV format. More...
 
void FromHSV (double aInH, double aInS, double aInV)
 Changes currently used color to the one given by hue, saturation and value parameters. More...
 
double Distance (const COLOR4D &other) const
 Returns the distance (in RGB space) between two colors. More...
 
int Compare (const COLOR4D &aRhs) const
 

Static Public Member Functions

static EDA_COLOR_T FindNearestLegacyColor (int aR, int aG, int aB)
 Returns a legacy color ID that is closest to the given 8-bit RGB values. 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
 
static const COLOR4D CLEAR
 

Detailed Description

A color representation with 4 components: red, green, blue, alpha.

Definition at line 103 of file color4d.h.

Constructor & Destructor Documentation

◆ COLOR4D() [1/5]

KIGFX::COLOR4D::COLOR4D ( )
inline

Definition at line 107 of file color4d.h.

◆ COLOR4D() [2/5]

KIGFX::COLOR4D::COLOR4D ( double  aRed,
double  aGreen,
double  aBlue,
double  aAlpha 
)
inline
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 121 of file color4d.h.

◆ COLOR4D() [3/5]

COLOR4D::COLOR4D ( EDA_COLOR_T  aColor)
Parameters
aColoris one of KiCad's palette colors.
See also
EDA_COLOR_T

Definition at line 84 of file color4d.cpp.

References a, b, colorRefs(), g, StructColors::m_Blue, StructColors::m_Green, StructColors::m_Red, NBCOLORS, r, and UNSPECIFIED.

◆ COLOR4D() [4/5]

COLOR4D::COLOR4D ( const wxString &  aColorStr)

Defines a color from a CSS or HTML-type string.

Parameters
aColorStrinput string

Definition at line 113 of file color4d.cpp.

References SetFromHexString(), and SetFromWxString().

◆ COLOR4D() [5/5]

COLOR4D::COLOR4D ( const wxColour &  aColor)
Parameters
aColoris the color type used by wxWidgets.

Definition at line 120 of file color4d.cpp.

References a, b, g, and r.

Member Function Documentation

◆ Brighten()

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

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 209 of file color4d.h.

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

◆ Brightened()

COLOR4D KIGFX::COLOR4D::Brightened ( double  aFactor) const
inline

Return 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 268 of file color4d.h.

Referenced by KIGFX::SCH_PAINTER::drawDanglingSymbol(), KIGFX::SCH_PAINTER::drawPinDanglingSymbol(), KIGFX::DS_RENDER_SETTINGS::DS_RENDER_SETTINGS(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), KIGFX::GERBVIEW_RENDER_SETTINGS::LoadColors(), COLOR_SWATCH::RenderToDC(), KIGFX::RENDER_SETTINGS::update(), and EDIT_POINTS::ViewDraw().

◆ Compare()

int COLOR4D::Compare ( const COLOR4D aRhs) const

Definition at line 588 of file color4d.cpp.

References a, b, g, and r.

Referenced by BOOST_AUTO_TEST_CASE(), and TEXT_ATTRIBUTES::Compare().

◆ Darken()

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

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 226 of file color4d.h.

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

◆ Darkened()

COLOR4D KIGFX::COLOR4D::Darkened ( double  aFactor) const
inline

Return 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 282 of file color4d.h.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::LoadColors(), COLOR_SWATCH::RenderToDC(), KIGFX::RENDER_SETTINGS::update(), and EDIT_POINTS::ViewDraw().

◆ Desaturate()

COLOR4D & COLOR4D::Desaturate ( )

Removes color (in HSL model)

Returns
greyscale version of color

Definition at line 511 of file color4d.cpp.

References b, FromHSL(), g, r, and ToHSL().

Referenced by KIGFX::SCH_PAINTER::draw(), LIB_PIN::PlotPinTexts(), LIB_SHAPE::print(), LIB_PIN::printPinTexts(), and KIGFX::SCH_PAINTER::setDeviceColors().

◆ Distance()

double COLOR4D::Distance ( const COLOR4D other) const

Returns the distance (in RGB space) between two colors.

Definition at line 532 of file color4d.cpp.

References b, g, and r.

Referenced by EDIT_POINTS::ViewDraw().

◆ FindNearestLegacyColor()

EDA_COLOR_T COLOR4D::FindNearestLegacyColor ( int  aR,
int  aG,
int  aB 
)
static

Returns a legacy color ID that is closest to the given 8-bit RGB values.

Definition at line 540 of file color4d.cpp.

References colorRefs(), distance(), StructColors::m_Blue, StructColors::m_Green, and StructColors::m_Red.

Referenced by getDXFColorName().

◆ FromCSSRGBA()

COLOR4D & COLOR4D::FromCSSRGBA ( int  aRed,
int  aGreen,
int  aBlue,
double  aAlpha = 1.0 
)

Initialize the color from a RGBA value with 0-255 red/green/blue and 0-1 alpha.

Suitable for taking the values directly from the "CSS syntax" from ToWxString.

Returns
this color.

Definition at line 577 of file color4d.cpp.

References a, b, alg::clamp(), g, and r.

Referenced by GetColorFromInt().

◆ FromHSL()

void COLOR4D::FromHSL ( double  aInHue,
double  aInSaturation,
double  aInLightness 
)

Change currently used color to the one given by hue, saturation and lightness parameters.

Parameters
aInHueis hue component, in degrees (0.0 - 360.0).
aInSaturationis saturation component (0.0 - 1.0).
aInLightnessis lightness component (0.0 - 1.0).

Definition at line 327 of file color4d.cpp.

References std::abs(), b, g, and r.

Referenced by BOOST_AUTO_TEST_CASE(), and Desaturate().

◆ FromHSV()

void COLOR4D::FromHSV ( double  aInH,
double  aInS,
double  aInV 
)

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 422 of file color4d.cpp.

References b, g, and r.

Referenced by BOOST_AUTO_TEST_CASE(), DIALOG_COLOR_PICKER::OnChangeBrightness(), DIALOG_COLOR_PICKER::OnChangeEditHue(), DIALOG_COLOR_PICKER::OnChangeEditSat(), Saturate(), and DIALOG_COLOR_PICKER::setHSvaluesFromCursor().

◆ GetBrightness()

double KIGFX::COLOR4D::GetBrightness ( ) const
inline

◆ Invert()

COLOR4D & KIGFX::COLOR4D::Invert ( )
inline

Makes the color inverted, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 242 of file color4d.h.

Referenced by EDIT_POINTS::ViewDraw().

◆ Inverted()

COLOR4D KIGFX::COLOR4D::Inverted ( ) const
inline

Returns an inverted color, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 323 of file color4d.h.

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

◆ LegacyMix()

COLOR4D COLOR4D::LegacyMix ( const COLOR4D aColor) const

Mix this COLOR4D with an input COLOR4D using the OR-mixing of legacy canvas.

Can be removed once legacy canvas is removed. Depends on wxColour for simplicity, but could be re-written to avoid this dependency if desired.

Parameters
aColorThe color to mix with this one

Definition at line 231 of file color4d.cpp.

References a, b, g, and r.

◆ Mix()

COLOR4D KIGFX::COLOR4D::Mix ( const COLOR4D aColor,
double  aFactor 
) const
inline

Return a color that is mixed with the input by a factor.

Parameters
aFactorSpecifies how much of the original color to keep (valid values: 0.0 .. 1.0).
Returns
COLOR4D Mixed color.

Definition at line 295 of file color4d.h.

References b, g, and r.

Referenced by KIGFX::SCH_PAINTER::draw(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), getBorderColour(), BOARD_ADAPTER::GetLayerColors(), WX_PANEL::OnPaint(), CURSOR::Plot(), LIB_PIN::PlotPinTexts(), LIB_SHAPE::print(), LIB_PIN::printPinTexts(), KIGFX::SCH_PAINTER::setDeviceColors(), SCINTILLA_TRICKS::setupStyles(), and KIGFX::RENDER_SETTINGS::update().

◆ Saturate()

COLOR4D & COLOR4D::Saturate ( double  aFactor)

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

Definition at line 496 of file color4d.cpp.

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

◆ SetFromHexString()

bool COLOR4D::SetFromHexString ( const wxString &  aColorString)

Definition at line 177 of file color4d.cpp.

References a, b, g, and r.

Referenced by COLOR4D(), and DIALOG_COLOR_PICKER::OnColorValueText().

◆ SetFromWxString()

bool COLOR4D::SetFromWxString ( const wxString &  aColorString)

Set color values by parsing a string using wxColour::Set().

Parameters
aColorStringis a color string that wxColour can understand.
Returns
true if color was set successfully.

Definition at line 129 of file color4d.cpp.

References a, b, g, and r.

Referenced by GRID_CELL_COLOR_SELECTOR::BeginEdit(), COLOR4D(), KIGFX::from_json(), and NET_GRID_TABLE::SetValue().

◆ ToColour()

◆ ToCSSString()

◆ ToHexString()

wxString COLOR4D::ToHexString ( ) const

Definition at line 210 of file color4d.cpp.

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

Referenced by DIALOG_COLOR_PICKER::SetEditVals().

◆ ToHSL()

void COLOR4D::ToHSL ( double &  aOutHue,
double &  aOutSaturation,
double &  aOutValue 
) const

Converts current color (stored in RGB) to HSL format.

Parameters
aOutHueis the conversion result for hue component, in degrees 0 ... 360.0.
aOutSaturationis the conversion result for saturation component (0 ... 1.0).
aOutLightnessis conversion result for value component (0 ... 1.0).
Note
saturation is set to 0.0 for black color if r = g = b,

Definition at line 296 of file color4d.cpp.

References std::abs(), b, g, and r.

Referenced by Desaturate(), and PNS_TUNE_STATUS_POPUP::UpdateStatus().

◆ ToHSV()

void COLOR4D::ToHSV ( double &  aOutHue,
double &  aOutSaturation,
double &  aOutValue,
bool  aAlwaysDefineHue = false 
) const

Convert 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 useful 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 368 of file color4d.cpp.

References b, delta, g, and r.

Referenced by DIALOG_COLOR_PICKER::buttColorClick(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), DIALOG_COLOR_PICKER::OnColorValueText(), DIALOG_COLOR_PICKER::OnResetButton(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), Saturate(), and DIALOG_COLOR_PICKER::SetEditVals().

◆ WithAlpha()

Member Data Documentation

◆ a

double KIGFX::COLOR4D::a

Alpha component.

Definition at line 379 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), BOOST_AUTO_TEST_CASE(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), Compare(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), KIGFX::PCB_PAINTER::draw(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), KIGFX::CAIRO_GAL_BASE::flushPath(), DS_DATA_MODEL_IO::format(), formatFill(), FromCSSRGBA(), BOARD_ADAPTER::GetColor(), BOARD_ADAPTER::GetLayerColors(), KI_TEST::IsColorNear(), KI_TEST::IsColorNearHex(), PCB_CONTROL::LayerAlphaDec(), PCB_CONTROL::LayerAlphaInc(), LegacyMix(), KIGFX::GERBVIEW_RENDER_SETTINGS::LoadColors(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), DIALOG_COLOR_PICKER::OnChangeAlpha(), DIALOG_COLOR_PICKER::OnResetButton(), std::operator()(), KIGFX::operator<(), KIGFX::operator==(), DRAWING_SHEET_PARSER::parseText(), SCH_SHEET::Plot(), SCH_SHEET::Print(), SCH_SEXPR_PLUGIN::saveJunction(), SCH_SEXPR_PLUGIN::saveSheet(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), SetFromHexString(), SetFromWxString(), SCH_LINE::SetLineColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), SCINTILLA_TRICKS::setupStyles(), KIGFX::CAIRO_GAL_BASE::storePath(), ToColour(), ToHexString(), and ROUTER_PREVIEW_ITEM::Update().

◆ b

double KIGFX::COLOR4D::b

Blue component.

Definition at line 378 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), Compare(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Desaturate(), Distance(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), KIGFX::CAIRO_GAL_BASE::flushPath(), DS_DATA_MODEL_IO::format(), formatFill(), FromCSSRGBA(), FromHSL(), FromHSV(), BOARD_ADAPTER::GetColor(), FAB_LAYER_COLOR::GetColorAsString(), getDXFColorName(), TRANSLINE::Init(), KI_TEST::IsColorNear(), KI_TEST::IsColorNearHex(), LegacyMix(), Mix(), DIALOG_COLOR_PICKER::OnChangeEditBlue(), DIALOG_COLOR_PICKER::OnResetButton(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), std::operator()(), KIGFX::operator<(), KIGFX::operator==(), DRAWING_SHEET_PARSER::parseText(), Saturate(), SCH_SEXPR_PLUGIN::saveJunction(), SCH_SEXPR_PLUGIN::saveSheet(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), SetFromHexString(), SetFromWxString(), PANEL_TRANSLINE::SetPrmBgColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToColour(), ToHexString(), ToHSL(), ToHSV(), and KIGFX::RENDER_SETTINGS::update().

◆ BLACK

◆ CLEAR

const COLOR4D COLOR4D::CLEAR
static

Definition at line 387 of file color4d.h.

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_RENDER_SETTINGS::GetColor().

◆ g

double KIGFX::COLOR4D::g

Green component.

Definition at line 377 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), Compare(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Desaturate(), Distance(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), KIGFX::CAIRO_GAL_BASE::flushPath(), DS_DATA_MODEL_IO::format(), formatFill(), FromCSSRGBA(), FromHSL(), FromHSV(), BOARD_ADAPTER::GetColor(), FAB_LAYER_COLOR::GetColorAsString(), getDXFColorName(), TRANSLINE::Init(), KI_TEST::IsColorNear(), KI_TEST::IsColorNearHex(), LegacyMix(), Mix(), DIALOG_COLOR_PICKER::OnChangeEditGreen(), DIALOG_COLOR_PICKER::OnResetButton(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), std::operator()(), KIGFX::operator<(), KIGFX::operator==(), DRAWING_SHEET_PARSER::parseText(), Saturate(), SCH_SEXPR_PLUGIN::saveJunction(), SCH_SEXPR_PLUGIN::saveSheet(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), SetFromHexString(), SetFromWxString(), PANEL_TRANSLINE::SetPrmBgColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToColour(), ToHexString(), ToHSL(), and ToHSV().

◆ r

double KIGFX::COLOR4D::r

Red component.

Definition at line 376 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), KIGFX::CAIRO_GAL_BASE::blitCursor(), BOOST_AUTO_TEST_CASE(), EXPORTER_STEP::buildBoard3DShapes(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), Compare(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Desaturate(), Distance(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL_BASE::drawAxes(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::drawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridCross(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::drawGridPoint(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::drawSegment(), KIGFX::OPENGL_GAL::drawSegmentChain(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), EXPORTER_PCB_VRML::EXPORTER_PCB_VRML(), KIGFX::CAIRO_GAL_BASE::flushPath(), DS_DATA_MODEL_IO::format(), formatFill(), FromCSSRGBA(), FromHSL(), FromHSV(), BOARD_ADAPTER::GetColor(), FAB_LAYER_COLOR::GetColorAsString(), getDXFColorName(), TRANSLINE::Init(), KI_TEST::IsColorNear(), KI_TEST::IsColorNearHex(), LegacyMix(), Mix(), DIALOG_COLOR_PICKER::OnChangeEditRed(), DIALOG_COLOR_PICKER::OnResetButton(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), std::operator()(), KIGFX::operator<(), KIGFX::operator==(), DRAWING_SHEET_PARSER::parseText(), Saturate(), SCH_SEXPR_PLUGIN::saveJunction(), SCH_SEXPR_PLUGIN::saveSheet(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), SetFromHexString(), SetFromWxString(), PANEL_TRANSLINE::SetPrmBgColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToColour(), ToHexString(), ToHSL(), and ToHSV().

◆ UNSPECIFIED

◆ WHITE

const COLOR4D COLOR4D::WHITE
static

Definition at line 385 of file color4d.h.

Referenced by PNS_DEBUG_SHAPE::PNS_DEBUG_SHAPE().


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