KiCad PCB EDA Suite
KIGFX::VIEW::updateItemsColor Struct Reference

Public Member Functions

 updateItemsColor (int aLayer, PAINTER *aPainter, GAL *aGal)
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

int layer
 
PAINTERpainter
 
GALgal
 

Detailed Description

Definition at line 631 of file view.cpp.

Constructor & Destructor Documentation

KIGFX::VIEW::updateItemsColor::updateItemsColor ( int  aLayer,
PAINTER aPainter,
GAL aGal 
)
inline

Definition at line 633 of file view.cpp.

633  :
634  layer( aLayer ), painter( aPainter ), gal( aGal )
635  {
636  }

Member Function Documentation

bool KIGFX::VIEW::updateItemsColor::operator() ( VIEW_ITEM aItem)
inline

Definition at line 638 of file view.cpp.

References KIGFX::GAL::ChangeGroupColor(), color, gal, KIGFX::RENDER_SETTINGS::GetColor(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::PAINTER::GetSettings(), layer, painter, and KIGFX::VIEW_ITEM::viewPrivData().

639  {
640  // Obtain the color that should be used for coloring the item
641  const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer );
642  int group = aItem->viewPrivData()->getGroup( layer );
643 
644  if( group >= 0 )
645  gal->ChangeGroupColor( group, color );
646 
647  return true;
648  }
virtual const COLOR4D & GetColor(const VIEW_ITEM *aItem, int aLayer) const =0
Function GetColor Returns the color that should be used to draw the specific VIEW_ITEM on the specifi...
virtual void ChangeGroupColor(int aGroupNumber, const COLOR4D &aNewColor)
Changes the color used to draw the group.
virtual RENDER_SETTINGS * GetSettings()=0
Function GetSettings Returns pointer to current settings that are going to be used when drawing items...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39

Member Data Documentation

GAL* KIGFX::VIEW::updateItemsColor::gal

Definition at line 652 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::updateItemsColor::layer

Definition at line 650 of file view.cpp.

Referenced by operator()().

PAINTER* KIGFX::VIEW::updateItemsColor::painter

Definition at line 651 of file view.cpp.

Referenced by operator()().


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