2009-11-20 14:55:20 +00:00
|
|
|
/********************************/
|
|
|
|
/* Routines for plotting traces */
|
|
|
|
/********************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "pcbnew.h"
|
|
|
|
#include "trigo.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
/**
|
|
|
|
* Draw a list of trace segmants.
|
2009-11-20 14:55:20 +00:00
|
|
|
*
|
|
|
|
* Parameters:
|
2011-09-07 19:41:04 +00:00
|
|
|
* Pt_start_trace = first segment in the list
|
2009-11-20 14:55:20 +00:00
|
|
|
* Nbsegment = number of segments traced
|
|
|
|
* Draw_mode = mode (GR_XOR, GR_OR ..)
|
|
|
|
* CAUTION:
|
|
|
|
* The starting point of a track following MUST exist: may be
|
|
|
|
* then put a 0 before calling a routine if the track is the last drawn.
|
|
|
|
*/
|
2011-09-07 19:41:04 +00:00
|
|
|
void DrawTraces( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment, int draw_mode )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2008-12-04 04:28:11 +00:00
|
|
|
// preserve the start of the list for debugging.
|
2011-09-07 19:41:04 +00:00
|
|
|
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
|
|
|
}
|