KiCad PCB EDA Suite
KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR Struct Reference
Inheritance diagram for KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR:
KIGFX::VIEW_OVERLAY::COMMAND

Public Member Functions

 COMMAND_SET_COLOR (bool aIsStroke, const COLOR4D &aColor)
 
virtual void Execute (VIEW *aView) const override
 

Public Attributes

bool m_isStroke
 
COLOR4D m_color
 

Detailed Description

Definition at line 235 of file view_overlay.cpp.

Constructor & Destructor Documentation

◆ COMMAND_SET_COLOR()

KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::COMMAND_SET_COLOR ( bool  aIsStroke,
const COLOR4D aColor 
)
inline

Definition at line 237 of file view_overlay.cpp.

237  :
238  m_isStroke( aIsStroke ),
239  m_color( aColor ) {}

Member Function Documentation

◆ Execute()

virtual void KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute ( VIEW aView) const
inlineoverridevirtual

Implements KIGFX::VIEW_OVERLAY::COMMAND.

Definition at line 241 of file view_overlay.cpp.

References KIGFX::VIEW::GetGAL(), m_color, m_isStroke, KIGFX::GAL::SetFillColor(), and KIGFX::GAL::SetStrokeColor().

242  {
243  if( m_isStroke )
244  aView->GetGAL()->SetStrokeColor( m_color );
245  else
246  aView->GetGAL()->SetFillColor( m_color );
247  }

Member Data Documentation

◆ m_color

COLOR4D KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::m_color

Definition at line 250 of file view_overlay.cpp.

Referenced by Execute().

◆ m_isStroke

bool KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::m_isStroke

Definition at line 249 of file view_overlay.cpp.

Referenced by Execute().


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