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 188 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 190 of file view_overlay.cpp.

190  :
191  m_isStroke( aIsStroke ),
192  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 194 of file view_overlay.cpp.

195  {
196  if( m_isStroke )
197  aView->GetGAL()->SetStrokeColor( m_color );
198  else
199  aView->GetGAL()->SetFillColor( m_color );
200  }

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

Member Data Documentation

◆ m_color

COLOR4D KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::m_color

Definition at line 203 of file view_overlay.cpp.

Referenced by Execute().

◆ m_isStroke

bool KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::m_isStroke

Definition at line 202 of file view_overlay.cpp.

Referenced by Execute().


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