2009-11-20 14:55:20 +00:00
|
|
|
/*******************/
|
|
|
|
/* Display modules */
|
|
|
|
/*******************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
#include "common.h"
|
|
|
|
#include "trigo.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "class_drawpanel.h"
|
|
|
|
|
|
|
|
#include "pcbnew.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "drag.h"
|
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Font of characters for the trace text routine. */
|
2007-12-12 15:22:49 +00:00
|
|
|
extern char* graphic_fonte_shape[];
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
#define L_MIN_DESSIN 1 /* line width for segments other than traces. */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Trace the pads of a module in sketch mode.
|
|
|
|
* Used to display a module pads when it is not displayed by the display
|
|
|
|
* options Module setting.
|
2008-04-01 05:21:50 +00:00
|
|
|
*
|
2009-11-20 14:55:20 +00:00
|
|
|
* The pads posters must appear on the data layers by MasqueLayer
|
2007-12-12 15:22:49 +00:00
|
|
|
*/
|
2009-11-20 14:55:20 +00:00
|
|
|
void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
|
|
|
|
int ox, int oy, int MasqueLayer, int draw_mode )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2007-12-12 15:22:49 +00:00
|
|
|
int tmp;
|
|
|
|
PCB_SCREEN* screen;
|
|
|
|
WinEDA_BasePcbFrame* frame;
|
|
|
|
|
|
|
|
screen = (PCB_SCREEN*) panel->GetScreen();
|
2009-12-21 12:05:36 +00:00
|
|
|
frame = (WinEDA_BasePcbFrame*) panel->GetParent();
|
2007-12-12 15:22:49 +00:00
|
|
|
|
|
|
|
tmp = frame->m_DisplayPadFill;
|
|
|
|
frame->m_DisplayPadFill = FALSE;
|
|
|
|
|
2009-11-20 14:55:20 +00:00
|
|
|
/* Draw pads. */
|
2008-11-24 06:53:43 +00:00
|
|
|
for( D_PAD* pad = Module->m_Pads; pad; pad = pad->Next() )
|
2007-12-12 15:22:49 +00:00
|
|
|
{
|
2008-11-24 06:53:43 +00:00
|
|
|
if( (pad->m_Masque_Layer & MasqueLayer) == 0 )
|
2007-12-12 15:22:49 +00:00
|
|
|
continue;
|
2008-11-24 06:53:43 +00:00
|
|
|
|
|
|
|
pad->Draw( panel, DC, draw_mode, wxPoint( ox, oy ) );
|
2007-12-12 15:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
frame->m_DisplayPadFill = tmp;
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|