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

Constructor & Destructor Documentation

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

Definition at line 742 of file view.cpp.

742  :
743  layer( aLayer ), painter( aPainter ), gal( aGal )
744  {
745  }

Member Function Documentation

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

Definition at line 747 of file view.cpp.

References color, KIGFX::VIEW_ITEM_DATA::getGroup(), and KIGFX::VIEW_ITEM::viewPrivData().

748  {
749  // Obtain the color that should be used for coloring the item
750  const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer );
751  int group = aItem->viewPrivData()->getGroup( layer );
752 
753  if( group >= 0 )
754  gal->ChangeGroupColor( group, color );
755 
756  return true;
757  }
int color
Definition: DXF_plotter.cpp:62
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 761 of file view.cpp.

int KIGFX::VIEW::updateItemsColor::layer

Definition at line 759 of file view.cpp.

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

Definition at line 760 of file view.cpp.


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