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

Detailed Description

Definition at line 750 of file view.cpp.

Constructor & Destructor Documentation

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

Definition at line 752 of file view.cpp.

752  :
753  layer( aLayer ), painter( aPainter ), gal( aGal )
754  {
755  }

Member Function Documentation

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

Definition at line 757 of file view.cpp.

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

758  {
759  // Obtain the color that should be used for coloring the item
760  const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer );
761  int group = aItem->viewPrivData()->getGroup( layer );
763  if( group >= 0 )
764  gal->ChangeGroupColor( group, color );
766  return true;
767  }
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 771 of file view.cpp.

int KIGFX::VIEW::updateItemsColor::layer

Definition at line 769 of file view.cpp.

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

Definition at line 770 of file view.cpp.

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