2007-12-12 15:22:49 +00:00
|
|
|
/*************************/
|
|
|
|
/* affichage des modules */
|
|
|
|
/*************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "pcbnew.h"
|
|
|
|
#include "trigo.h"
|
|
|
|
|
|
|
|
#ifdef PCBNEW
|
|
|
|
#include "drag.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CVPCB
|
|
|
|
#include "cvpcb.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Police des caracteres de la routine de trace des textes */
|
2007-12-12 15:22:49 +00:00
|
|
|
extern char* graphic_fonte_shape[];
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
#define L_MIN_DESSIN 1 /* seuil de largeur des segments pour trace autre que filaire */
|
|
|
|
|
|
|
|
/* fonctions locales : */
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************/
|
2007-12-12 15:22:49 +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
|
|
|
/******************************************************************/
|
|
|
|
|
|
|
|
/* Trace les pads d'un module en mode SKETCH.
|
2007-12-12 15:22:49 +00:00
|
|
|
* Utilisee pour afficher les pastilles d'un module lorsque celui ci n'est
|
|
|
|
* pas affiche par les options d'affichage des Modules
|
2008-04-01 05:21:50 +00:00
|
|
|
*
|
2007-12-12 15:22:49 +00:00
|
|
|
* Les pads affiches doivent apparaitre sur les couches donnees par
|
|
|
|
* MasqueLayer
|
|
|
|
*/
|
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();
|
|
|
|
frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
|
|
|
|
|
|
|
|
tmp = frame->m_DisplayPadFill;
|
|
|
|
frame->m_DisplayPadFill = FALSE;
|
|
|
|
|
|
|
|
/* trace des pastilles */
|
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
|
|
|
}
|