KiCad PCB EDA Suite
FAB_LAYER_COLOR Class Reference

#include <stackup_predefined_prms.h>

Public Member Functions

 FAB_LAYER_COLOR ()
 
 FAB_LAYER_COLOR (const wxString &aColorName, const wxColor &aColor)
 
const wxString & GetName () const
 
wxColor GetColor (BOARD_STACKUP_ITEM_TYPE aItemType) const
 

Private Attributes

wxString m_colorName
 
KIGFX::COLOR4D m_color
 

Detailed Description

Definition at line 72 of file stackup_predefined_prms.h.

Constructor & Destructor Documentation

◆ FAB_LAYER_COLOR() [1/2]

FAB_LAYER_COLOR::FAB_LAYER_COLOR ( )
inline

Definition at line 75 of file stackup_predefined_prms.h.

76  {}

◆ FAB_LAYER_COLOR() [2/2]

FAB_LAYER_COLOR::FAB_LAYER_COLOR ( const wxString &  aColorName,
const wxColor &  aColor 
)
inline

Definition at line 78 of file stackup_predefined_prms.h.

78  :
79  m_colorName( aColorName ),
80  m_color( aColor )
81  {}

Member Function Documentation

◆ GetColor()

wxColor FAB_LAYER_COLOR::GetColor ( BOARD_STACKUP_ITEM_TYPE  aItemType) const
inline

Definition at line 88 of file stackup_predefined_prms.h.

89  {
90  if( aItemType == BS_ITEM_TYPE_SOLDERMASK )
91  return m_color.WithAlpha( DEFAULT_SOLDERMASK_OPACITY ).ToColour();
92  else
93  return m_color.WithAlpha( 1.0 ).ToColour();
94  }
#define DEFAULT_SOLDERMASK_OPACITY
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
Definition: color4d.h:314

References BS_ITEM_TYPE_SOLDERMASK, DEFAULT_SOLDERMASK_OPACITY, m_color, and KIGFX::COLOR4D::WithAlpha().

Referenced by PANEL_SETUP_BOARD_STACKUP::createColorBox(), GetDefaultUserColor(), and PANEL_SETUP_BOARD_STACKUP::GetSelectedColor().

◆ GetName()

const wxString& FAB_LAYER_COLOR::GetName ( void  ) const
inline

Definition at line 83 of file stackup_predefined_prms.h.

84  {
85  return m_colorName;
86  }

References m_colorName.

Member Data Documentation

◆ m_color

KIGFX::COLOR4D FAB_LAYER_COLOR::m_color
private

Definition at line 99 of file stackup_predefined_prms.h.

Referenced by GetColor().

◆ m_colorName

wxString FAB_LAYER_COLOR::m_colorName
private

Definition at line 97 of file stackup_predefined_prms.h.

Referenced by GetName().


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