KiCad PCB EDA Suite
pcb_legacy_draw_utils.cpp File Reference

functions (and helper functions) to redraw the current board in legacy canvas. More...

#include <fctsys.h>
#include <class_drawpanel.h>
#include <pcb_edit_frame.h>
#include <base_units.h>
#include <class_board.h>
#include <class_module.h>
#include <class_track.h>
#include <class_zone.h>
#include <class_marker_pcb.h>
#include <pcbnew.h>
#include <footprint_edit_frame.h>
#include <pcbplot.h>
#include <wx/overlay.h>

Go to the source code of this file.

Functions

static void Trace_Pads_Only (EDA_DRAW_PANEL *panel, wxDC *DC, MODULE *Module, int ox, int oy, LSET LayerMask, GR_DRAWMODE draw_mode)
 

Detailed Description

functions (and helper functions) to redraw the current board in legacy canvas.

Definition in file pcb_legacy_draw_utils.cpp.

Function Documentation

static void Trace_Pads_Only ( EDA_DRAW_PANEL panel,
wxDC *  DC,
MODULE Module,
int  ox,
int  oy,
LSET  LayerMask,
GR_DRAWMODE  draw_mode 
)
static

Definition at line 295 of file pcb_legacy_draw_utils.cpp.

References EDA_DRAW_PANEL::GetDisplayOptions(), D_PAD::Next(), and MODULE::PadsList().

Referenced by BOARD::Draw().

297 {
298  auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
299 
300  int tmp = displ_opts->m_DisplayPadFill;
301 
302  displ_opts->m_DisplayPadFill = false;
303 
304  // Draw pads.
305  for( D_PAD* pad = aModule->PadsList(); pad; pad = pad->Next() )
306  {
307  if( (pad->GetLayerSet() & aLayerMask) == 0 )
308  continue;
309 
310  pad->Draw( panel, DC, draw_mode, wxPoint( ox, oy ) );
311  }
312 
313  displ_opts->m_DisplayPadFill = tmp;
314 }
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings...
D_PAD * Next() const
Definition: class_pad.h:160
virtual void * GetDisplayOptions()
Function GetDisplayOptions A way to pass info to draw functions.