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 632 of file view.cpp.

Constructor & Destructor Documentation

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

Definition at line 634 of file view.cpp.

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

Member Function Documentation

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

Definition at line 639 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().

640  {
641  // Obtain the color that should be used for coloring the item
642  const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer );
643  int group = aItem->viewPrivData()->getGroup( layer );
644 
645  if( group >= 0 )
646  gal->ChangeGroupColor( group, color );
647 
648  return true;
649  }
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 653 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::updateItemsColor::layer

Definition at line 651 of file view.cpp.

Referenced by operator()().

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

Definition at line 652 of file view.cpp.

Referenced by operator()().


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