2007-06-05 12:10:51 +00:00
|
|
|
/*****************************************************************/
|
|
|
|
/* Routines de tracage des pistes ( Toutes, 1 piste, 1 segment ) */
|
|
|
|
/*****************************************************************/
|
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "pcbnew.h"
|
|
|
|
#include "trigo.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
/* variables locales : */
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************/
|
2008-12-04 04:28:11 +00:00
|
|
|
void Trace_Une_Piste( WinEDA_DrawPanel* panel, wxDC* DC, TRACK* aTrackList,
|
2007-08-23 04:28:46 +00:00
|
|
|
int nbsegment, int draw_mode )
|
2007-06-05 12:10:51 +00:00
|
|
|
/************************************************************************/
|
2007-08-23 04:28:46 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
/* routine de trace de n segments consecutifs en memoire.
|
2007-08-23 04:28:46 +00:00
|
|
|
* Utile pour monter une piste en cours de trace car les segments de cette
|
|
|
|
* piste sont alors contigus en memoire
|
|
|
|
* Parametres :
|
|
|
|
* pt_start_piste = adresse de depart de la liste des segments
|
|
|
|
* nbsegment = nombre de segments a tracer
|
|
|
|
* draw_mode = mode ( GR_XOR, GR_OR..)
|
|
|
|
* ATTENTION:
|
|
|
|
* le point de depart d'une piste suivante DOIT exister: peut etre
|
|
|
|
* donc mis a 0 avant appel a la routine si la piste a tracer est la derniere
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2008-12-04 04:28:11 +00:00
|
|
|
// preserve the start of the list for debugging.
|
|
|
|
for( TRACK* track = aTrackList; nbsegment > 0 && track; nbsegment--, track = track->Next() )
|
2007-08-23 04:28:46 +00:00
|
|
|
{
|
2008-12-04 04:28:11 +00:00
|
|
|
track->Draw( panel, DC, draw_mode );
|
2007-08-23 04:28:46 +00:00
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|