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

Constructor & Destructor Documentation

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

Definition at line 702 of file view.cpp.

702  :
703  layer( aLayer ), painter( aPainter ), gal( aGal )
704  {
705  }

Member Function Documentation

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

Definition at line 707 of file view.cpp.

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

708  {
709  // Obtain the color that should be used for coloring the item
710  const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer );
711  int group = aItem->viewPrivData()->getGroup( layer );
713  if( group >= 0 )
714  gal->ChangeGroupColor( group, color );
716  return true;
717  }
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 721 of file view.cpp.

int KIGFX::VIEW::updateItemsColor::layer

Definition at line 719 of file view.cpp.

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

Definition at line 720 of file view.cpp.

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