Commit de442033 authored by stambaughw's avatar stambaughw

Comment translation and capitalization fixes.

* Complete comment translation of PCBNew source.
* Some tooltip capitalization fixes in PCBNew toolbars.
parent de62fa09
......@@ -14,12 +14,12 @@
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
#define OPTKEY_PRINT_MODULE_SCALE wxT( "PrintModuleScale" )
#define OPTKEY_PRINT_PAGE_FRAME wxT( "PrintPageFrame" )
#define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )
#define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )
/* Constantes de conversion d'unites */
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
/* Conversion unit constants. */
/* Convert pcb dimension of 0.1 mil to PS units of inches. */
#define SCALE_PS .0001
/* coeff de conversion dim en 0,1 mil -> dim en unite HPGL: */
/* Convert dimension 0.1 mil -> HPGL units: */
#define SCALE_HPGL 0.102041
/* Plot Options : */
......@@ -29,7 +29,8 @@ public:
bool Exclude_Edges_Pcb;
int PlotLine_Width;
bool Plot_Frame_Ref; // True to plot/print frame references
bool DrawViaOnMaskLayer; // True if vias are drawn on Mask layer (ie protected by mask)
bool DrawViaOnMaskLayer; // True if vias are drawn on Mask layer
// (ie protected by mask)
GRTraceMode Trace_Mode;
bool Plot_Set_MIROIR;
int HPGL_Pen_Num;
......@@ -39,14 +40,14 @@ public:
int PlotPSColorOpt; // True for color Postscript output
bool Plot_PS_Negative; // True to create a negative board ps plot
/* Autorisation de trace des divers items en serigraphie */
/* Flags to enable or disable ploting of various PCB elements. */
bool Sel_Texte_Reference;
bool Sel_Texte_Valeur;
bool Sel_Texte_Divers;
bool Sel_Texte_Invisible;
bool PlotPadsOnSilkLayer;
bool Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
* couche ( utile pour serigraphie) */
bool Plot_Pads_All_Layers; /* Plot pads even outside the
* Layer (useful for silkscreen) */
/* id for plot format (see enum PlotFormat in plot_common.h) */
int PlotFormat;
......@@ -68,17 +69,12 @@ public:
extern PCB_Plot_Options g_pcb_plot_options;
/*************************************/
/* Constantes utiles en trace GERBER */
/*************************************/
/* PLOT_RTN.CC */
void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer,
GRTraceMode trace_mode );
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules,
* prepare les parametres de trace de texte */
/* Plat PCB text type, ie other than text on modules
* prepare the plot settings of text */
void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer,
GRTraceMode trace_mode );
......
This diff is collapsed.
/*******************************/
/**** Routine de trace HPGL ****/
/*******************************/
/******************/
/**** Plot DXF ****/
/******************/
#include "fctsys.h"
#include "common.h"
......@@ -12,10 +12,8 @@
#include "protos.h"
/*****************************************************************************/
void WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
GRTraceMode trace_mode )
/*****************************************************************************/
GRTraceMode trace_mode )
{
Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc;
......@@ -34,7 +32,7 @@ void WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
DXF_PLOTTER* plotter = new DXF_PLOTTER();
plotter->set_paper_size( currentsheet );
plotter->set_viewport( wxPoint(0,0), 1, 0 );
plotter->set_viewport( wxPoint( 0, 0 ), 1, 0 );
plotter->set_creator( wxT( "PCBNEW-DXF" ) );
plotter->set_filename( FullFileName );
plotter->start_plot( output_file );
......
/*******************************/
/**** Routine de trace HPGL ****/
/*******************************/
/*******************/
/**** Plot HPGL ****/
/*******************/
#include "fctsys.h"
#include "common.h"
......@@ -12,10 +12,9 @@
#include "protos.h"
/*****************************************************************************/
void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
GRTraceMode trace_mode )
/*****************************************************************************/
{
wxSize SheetSize;
wxSize BoardSize;
......@@ -28,7 +27,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
ClearMsgPanel();
// Compute pen_dim (from g_HPGL_Pen_Diam in mils) in pcb units,
// with plot scale (if Scale is 2, pen diametre is always g_HPGL_Pen_Diam
// with plot scale (if Scale is 2, pen diameter is always g_HPGL_Pen_Diam
// so apparent pen diam is real pen diam / Scale
int pen_diam = wxRound( (g_pcb_plot_options.HPGL_Pen_Diam * U_PCB) / g_pcb_plot_options.Scale );
......@@ -53,14 +52,14 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
if( g_pcb_plot_options.PlotScaleOpt != 1 )
Center = TRUE; // Echelle != 1 donc trace centree du PCB
Center = TRUE; // Scale != 1 so center PCB plot.
// calcul en unites internes des dimensions des feuilles ( connues en 1/1000 pouce )
// Scale units from 0.0001" to HPGL plot units.
SheetSize.x = currentsheet->m_Size.x * U_PCB;
SheetSize.y = currentsheet->m_Size.y * U_PCB;
/* calcul des dimensions et centre du PCB */
/* Calculate the center of the PCB. */
m_Pcb->ComputeBoundaryBox();
BoardSize = m_Pcb->m_BoundaryBox.GetSize();
BoardCenter = m_Pcb->m_BoundaryBox.Centre();
......@@ -70,18 +69,18 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer,
double Xscale, Yscale;
// Fit to 80% of the page
Xscale = ( (SheetSize.x * 0.8) / BoardSize.x );
Yscale = ( (SheetSize.y * 0.8) / BoardSize.y );
Xscale = ( ( SheetSize.x * 0.8 ) / BoardSize.x );
Yscale = ( ( SheetSize.y * 0.8 ) / BoardSize.y );
scale = MIN( Xscale, Yscale );
}
else
scale = g_pcb_plot_options.Scale;
// Calcul du cadrage (echelle != 1 donc recadrage du trace)
// Calculate the page size offset.
if( Center )
{
offset.x = BoardCenter.x - (SheetSize.x / 2) / scale;
offset.y = BoardCenter.y - (SheetSize.y / 2) / scale;
offset.x = BoardCenter.x - ( SheetSize.x / 2 ) / scale;
offset.y = BoardCenter.y - ( SheetSize.y / 2 ) / scale;
}
else
{
......
/*************************************/
/**** Pcbnew: Routine de trace PS ****/
/*************************************/
/*************************/
/**** Plot Postscript ****/
/*************************/
#include "fctsys.h"
#include "common.h"
......@@ -12,14 +12,12 @@
#include "protos.h"
/****************************************************************************/
void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
bool useA4, GRTraceMode trace_mode )
/****************************************************************************/
/* Genere un fichier POSTSCRIPT (*.ps) de trace du circuit, couche layer
* if layer < 0: all layers
/* Generate a PostScript file (*. ps) of the circuit layer.
* If layer < 0: all layers are plotted.
*/
void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
bool useA4, GRTraceMode trace_mode )
{
wxSize SheetSize;
wxSize PaperSize;
......@@ -45,13 +43,12 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
AppendMsgPanel( _( "File" ), FullFileName, CYAN );
if( g_pcb_plot_options.PlotScaleOpt != 1 )
Center = TRUE; // Echelle != 1 donc trace centree du PCB
Center = TRUE; // Scale != 1 so center plot.
// Set default line width
if( g_pcb_plot_options.PlotLine_Width < 1 )
g_pcb_plot_options.PlotLine_Width = 1;
// calcul en unites internes des dimensions des feuilles ( connues en 1/1000 pouce )
SheetSize.x = currentsheet->m_Size.x * U_PCB;
SheetSize.y = currentsheet->m_Size.y * U_PCB;
......@@ -69,7 +66,6 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
paperscale = 1;
}
/* calcul des dimensions et centre du PCB */
m_Pcb->ComputeBoundaryBox();
BoardSize = m_Pcb->m_BoundaryBox.GetSize();
BoardCenter = m_Pcb->m_BoundaryBox.Centre();
......@@ -86,11 +82,10 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
else
scale = g_pcb_plot_options.Scale * paperscale;
// Calcul du cadrage (echelle != 1 donc recadrage du trace)
if( Center )
{
offset.x = BoardCenter.x - (PaperSize.x / 2) / scale;
offset.y = BoardCenter.y - (PaperSize.y / 2) / scale;
offset.x = BoardCenter.x - ( PaperSize.x / 2 ) / scale;
offset.y = BoardCenter.y - ( PaperSize.y / 2 ) / scale;
}
else
{
......@@ -119,9 +114,9 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer,
// and switch the current color to WHITE
if( g_pcb_plot_options.Plot_PS_Negative )
{
int margin = 500; // Add a 0.5 inch margin around the board
int margin = 500; // Add a 0.5 inch margin around the board
plotter->set_negative( true );
plotter->set_color( WHITE ); // Which will be plotted as black
plotter->set_color( WHITE ); // Which will be plotted as black
plotter->rect( wxPoint( m_Pcb->m_BoundaryBox.GetX() - margin,
m_Pcb->m_BoundaryBox.GetY() - margin ),
wxPoint( m_Pcb->m_BoundaryBox.GetRight() + margin,
......
......@@ -12,23 +12,23 @@
#include "pcbplot.h"
#include "protos.h"
/* Local functions */
static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int draw_mode, int masklayer );
static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int draw_mode, int masklayer );
/************************************************************************************************************/
void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMaskLayer, bool aPrintMirrorMode )
/************************************************************************************************************/
/** Function PrintPage
* Used to print the board (on printer, or when creating SVF files).
* Print the board, but only layers allowed by aPrintMaskLayer
* ( printmasklayer is a 32 bits mask: bit n = 1 -> layer n is printed)
*/
void WinEDA_DrawPanel::PrintPage( wxDC* aDC,
bool aPrint_Sheet_Ref,
int aPrintMaskLayer,
bool aPrintMirrorMode )
{
MODULE* Module;
int drawmode = GR_COPY;
MODULE* Module;
int drawmode = GR_COPY;
DISPLAY_OPTIONS save_opt;
TRACK* pt_piste;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) m_Parent;
......@@ -46,32 +46,31 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
DisplayOpt.DisplayViaFill = false;
}
frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum = false;
frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum = false;
DisplayOpt.DisplayPadNoConn = false;
DisplayOpt.DisplayPadIsol = false;
DisplayOpt.DisplayModEdge = FILLED;
DisplayOpt.DisplayModText = FILLED;
frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = FILLED;
DisplayOpt.ShowTrackClearanceMode = DO_NOT_SHOW_CLEARANCE;
DisplayOpt.DisplayDrawItems = FILLED;
DisplayOpt.DisplayZonesMode = 0;
DisplayOpt.DisplayNetNamesMode = 0;
DisplayOpt.DisplayDrawItems = FILLED;
DisplayOpt.DisplayZonesMode = 0;
DisplayOpt.DisplayNetNamesMode = 0;
m_PrintIsMirrored = aPrintMirrorMode;
// The OR mode is used in color mode, but be aware the backgroud *must be BLACK.
// In print page dialog, we first plrint in BLACK, and after reprint in color,
// on the black "local" backgroud, in OR mode
// the black print is not made before, only a white page is printed
if( GetGRForceBlackPenState( ) == false )
// The OR mode is used in color mode, but be aware the backgroud *must be
// BLACK. In the print page dialog, we first plrint in BLACK, and after
// reprint in color, on the black "local" backgroud, in OR mode the black
// print is not made before, only a white page is printed
if( GetGRForceBlackPenState() == false )
drawmode = GR_OR;
/* Print the pcb graphic items (texts, ...) */
GRSetDrawMode( aDC, drawmode );
for( BOARD_ITEM* item = Pcb->m_Drawings; item; item = item->Next() )
for( BOARD_ITEM* item = Pcb->m_Drawings; item; item = item->Next() )
{
switch( item->Type() )
{
......@@ -79,13 +78,13 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
case TYPE_COTATION:
case TYPE_TEXTE:
case TYPE_MIRE:
if( ((1<<item->GetLayer()) & aPrintMaskLayer) == 0 )
if( ( ( 1 << item->GetLayer() ) & aPrintMaskLayer ) == 0 )
break;
item->Draw( this, aDC, drawmode );
break;
case TYPE_MARKER_PCB: /* Trace des marqueurs */
case TYPE_MARKER_PCB:
default:
break;
}
......@@ -97,13 +96,19 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
{
if( ( aPrintMaskLayer & pt_piste->ReturnMaskLayer() ) == 0 )
continue;
if( pt_piste->Type() == TYPE_VIA ) /* VIA rencontree */
if( pt_piste->Type() == TYPE_VIA ) /* VIA encountered. */
{
int rayon = pt_piste->m_Width >> 1;
int color = g_DesignSettings.m_ViaColor[pt_piste->m_Shape];
GRSetDrawMode( aDC, drawmode );
GRFilledCircle( &m_ClipBox, aDC, pt_piste->m_Start.x, pt_piste->m_Start.y,
rayon, 0, color, color );
GRFilledCircle( &m_ClipBox,
aDC,
pt_piste->m_Start.x,
pt_piste->m_Start.y,
rayon,
0,
color,
color );
}
else
pt_piste->Draw( this, aDC, drawmode );
......@@ -121,38 +126,46 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
/* Draw filled areas (i.e. zones) */
for( int ii = 0; ii < Pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = Pcb->GetArea(ii);
if( ( aPrintMaskLayer & (1 << zone->GetLayer()) ) == 0 )
ZONE_CONTAINER* zone = Pcb->GetArea( ii );
if( ( aPrintMaskLayer & ( 1 << zone->GetLayer() ) ) == 0 )
continue;
zone->DrawFilledArea( this, aDC, drawmode );
}
// Draw footprints, this is done at last in order to print the pad holes in white (or g_DrawBgColor)
// after the tracks and zones
// Draw footprints, this is done at last in order to print the pad holes in
// white (or g_DrawBgColor) after the tracks and zones
Module = (MODULE*) Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
Print_Module( this, aDC, Module, drawmode, aPrintMaskLayer );
}
/* Print via holes in bg color: Not sure it is good for buried or blind vias */
/* Print via holes in bg color: Not sure it is good for buried or blind
* vias */
pt_piste = Pcb->m_Track;
int color = g_DrawBgColor;
bool blackpenstate = GetGRForceBlackPenState( );
int color = g_DrawBgColor;
bool blackpenstate = GetGRForceBlackPenState();
GRForceBlackPen( false );
GRSetDrawMode( aDC, GR_COPY );
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{
if( ( aPrintMaskLayer & pt_piste->ReturnMaskLayer() ) == 0 )
continue;
if( pt_piste->Type() == TYPE_VIA ) /* VIA rencontree */
if( pt_piste->Type() == TYPE_VIA ) /* VIA encountered. */
{
int rayon = pt_piste->GetDrillValue() / 2;
GRFilledCircle( &m_ClipBox, aDC, pt_piste->m_Start.x, pt_piste->m_Start.y,
rayon, 0, color, color );
GRFilledCircle( &m_ClipBox,
aDC,
pt_piste->m_Start.x,
pt_piste->m_Start.y,
rayon,
0,
color,
color );
}
}
GRForceBlackPen( blackpenstate );
if( aPrint_Sheet_Ref )
......@@ -168,10 +181,8 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
}
/***********************************************************/
static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
MODULE* Module, int draw_mode, int masklayer )
/***********************************************************/
MODULE* Module, int draw_mode, int masklayer )
{
D_PAD* pt_pad;
EDA_BaseStruct* PtStruct;
......@@ -184,16 +195,20 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
{
if( (pt_pad->m_Masque_Layer & masklayer ) == 0 )
continue;
// Usually we draw pads in sketch mode on non copper layers:
if ( (masklayer & ALL_CU_LAYERS) == 0 )
if( (masklayer & ALL_CU_LAYERS) == 0 )
{
int tmp_fill = ((WinEDA_BasePcbFrame*)panel->m_Parent)->m_DisplayPadFill;
int tmp_fill =
( (WinEDA_BasePcbFrame*) panel->m_Parent )->m_DisplayPadFill;
// Switch in sketch mode
((WinEDA_BasePcbFrame*)panel->m_Parent)->m_DisplayPadFill = 0;
( (WinEDA_BasePcbFrame*) panel->m_Parent )->m_DisplayPadFill = 0;
pt_pad->Draw( panel, DC, draw_mode );
((WinEDA_BasePcbFrame*)panel->m_Parent)->m_DisplayPadFill = tmp_fill;
( (WinEDA_BasePcbFrame*) panel->m_Parent )->m_DisplayPadFill =
tmp_fill;
}
else // on copper layer, draw pads according to current options
else // on copper layer, draw pads according to current options
pt_pad->Draw( panel, DC, draw_mode );
}
......@@ -207,9 +222,9 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
if( mlayer & masklayer )
{
if( ! Module->m_Reference->m_NoShow )
if( !Module->m_Reference->m_NoShow )
Module->m_Reference->Draw( panel, DC, draw_mode );
if( ! Module->m_Value->m_NoShow )
if( !Module->m_Value->m_NoShow )
Module->m_Value->Draw( panel, DC, draw_mode );
}
......@@ -228,7 +243,7 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
case TYPE_EDGE_MODULE:
{
EDGE_MODULE* edge = (EDGE_MODULE*) PtStruct;
if( (g_TabOneLayerMask[edge->GetLayer()] & masklayer ) == 0 )
if( ( g_TabOneLayerMask[edge->GetLayer()] & masklayer ) == 0 )
break;
edge->Draw( panel, DC, draw_mode );
break;
......
This diff is collapsed.
/*******************************************/
/* EDITEUR de PCB: routines d'AUTOROUTAGE: */
/*******************************************/
/*************/
/* queue.cpp */
/*************/
#include "fctsys.h"
#include "gr_basic.h"
......@@ -15,167 +15,168 @@
struct PcbQueue /* search queue structure */
{
struct PcbQueue *Next;
int Row; /* current row */
int Col; /* current column */
int Side; /* 0=top, 1=bottom */
int Dist; /* path distance to this cell so far */
int ApxDist; /* approximate distance to target from here */
struct PcbQueue* Next;
int Row; /* current row */
int Col; /* current column */
int Side; /* 0=top, 1=bottom */
int Dist; /* path distance to this cell so far */
int ApxDist; /* approximate distance to target from here */
};
static long qlen = 0; /* current queue length */
static struct PcbQueue *Head = NULL;
static struct PcbQueue *Tail = NULL;
static struct PcbQueue *Save = NULL; /* hold empty queue structs */
static long qlen = 0; /* current queue length */
static struct PcbQueue* Head = NULL;
static struct PcbQueue* Tail = NULL;
static struct PcbQueue* Save = NULL; /* hold empty queue structs */
/* Routines definies ici : */
void InitQueue();
void GetQueue( int *, int *, int *, int *, int * );
int SetQueue( int, int, int, int, int, int, int );
void GetQueue( int*, int*, int*, int*, int* );
int SetQueue( int, int, int, int, int, int, int );
void ReSetQueue( int, int, int, int, int, int, int );
/************************/
void FreeQueue()
/************************/
/* Free the memory used for storing all the queue */
void FreeQueue()
{
struct PcbQueue *p;
struct PcbQueue* p;
InitQueue();
while( (p = Save) != NULL )
{
Save = p->Next; MyFree(p);
}
InitQueue();
while( (p = Save) != NULL )
{
Save = p->Next; MyFree( p );
}
}
/************************/
/* void InitQueue() */
/************************/
/* initialize the search queue */
void InitQueue()
{
struct PcbQueue *p;
while( (p = Head) != NULL )
{
Head = p->Next;
p->Next = Save; Save = p;
}
Tail = NULL;
OpenNodes = ClosNodes = MoveNodes = MaxNodes = qlen = 0;
}
struct PcbQueue* p;
while( (p = Head) != NULL )
{
Head = p->Next;
p->Next = Save; Save = p;
}
Tail = NULL;
OpenNodes = ClosNodes = MoveNodes = MaxNodes = qlen = 0;
}
/*********************************************************/
/* void GetQueue(int *r, int *c, int *s, int *d, int *a) */
/*********************************************************/
/* get search queue item from list */
void GetQueue(int *r, int *c, int *s, int *d, int *a)
void GetQueue( int* r, int* c, int* s, int* d, int* a )
{
struct PcbQueue *p;
if( (p = Head) != NULL ) /* return first item in list */
{
*r = p->Row; *c = p->Col;
*s = p->Side;
*d = p->Dist; *a = p->ApxDist;
if ((Head = p->Next) == NULL) Tail = NULL;
/* put node on free list */
p->Next = Save; Save = p;
ClosNodes++; qlen--;
}
else /* empty list */
{
*r = *c = *s = *d = *a = ILLEGAL;
}
struct PcbQueue* p;
if( (p = Head) != NULL ) /* return first item in list */
{
*r = p->Row; *c = p->Col;
*s = p->Side;
*d = p->Dist; *a = p->ApxDist;
if( (Head = p->Next) == NULL )
Tail = NULL;
/* put node on free list */
p->Next = Save; Save = p;
ClosNodes++; qlen--;
}
else /* empty list */
{
*r = *c = *s = *d = *a = ILLEGAL;
}
}
/****************************************************************/
int SetQueue (int r,int c,int side,int d,int a,int r2,int c2 )
/****************************************************************/
/* add a search node to the list
Return:
1 si OK
0 si defaut allocation Memoire
*/
* Return:
* 1 - OK
* 0 - Failed to allocate memory.
*/
int SetQueue( int r, int c, int side, int d, int a, int r2, int c2 )
{
struct PcbQueue *p, *q, *t;
struct PcbQueue* p, * q, * t;
int i, j;
j = 0; // gcc warning fix
if( (p = Save) != NULL ) /* try free list first */
{
Save = p->Next;
}
else if ((p = (struct PcbQueue *) MyMalloc(sizeof(PcbQueue))) == NULL)
return(0);
p->Row = r;
p->Col = c;
p->Side = side;
i = (p->Dist = d) + (p->ApxDist = a);
p->Next = NULL;
if( (q = Head) != NULL)
{ /* insert in proper position in list */
if (q->Dist + q->ApxDist > i)
{ /* insert at head */
p->Next = q; Head = p;
}
else { /* search for proper position */
for (t = q, q = q->Next; q && i > (j = q->Dist + q->ApxDist);
t = q, q = q->Next)
;
if (q && i == j && q->Row == r2 && q->Col == c2)
{
/* insert after q, which is a goal node */
if ( (p->Next = q->Next) == NULL) Tail = p;
q->Next = p;
}
else
{ /* insert in front of q */
if ((p->Next = q) == NULL) Tail = p;
t->Next = p;
}
}
}
else /* empty search list */
Head = Tail = p;
OpenNodes++;
if (++qlen > MaxNodes) MaxNodes = qlen;
return(1);
j = 0; // gcc warning fix
if( (p = Save) != NULL ) /* try free list first */
{
Save = p->Next;
}
else if( ( p = (struct PcbQueue*) MyMalloc( sizeof(PcbQueue) ) ) == NULL )
return 0;
p->Row = r;
p->Col = c;
p->Side = side;
i = (p->Dist = d) + (p->ApxDist = a);
p->Next = NULL;
if( (q = Head) != NULL ) /* insert in proper position in list */
{
if( q->Dist + q->ApxDist > i ) /* insert at head */
{
p->Next = q; Head = p;
}
else /* search for proper position */
{
for( t = q, q = q->Next; q && i > ( j = q->Dist + q->ApxDist );
t = q, q = q->Next )
;
if( q && i == j && q->Row == r2 && q->Col == c2 )
{
/* insert after q, which is a goal node */
if( ( p->Next = q->Next ) == NULL )
Tail = p;
q->Next = p;
}
else /* insert in front of q */
{
if( ( p->Next = q ) == NULL )
Tail = p;
t->Next = p;
}
}
}
else /* empty search list */
Head = Tail = p;
OpenNodes++;
if( ++qlen > MaxNodes )
MaxNodes = qlen;
return 1;
}
/******************************************************************/
void ReSetQueue (int r,int c,int s,int d,int a,int r2,int c2 )
/******************************************************************/
/* reposition node in list */
void ReSetQueue( int r, int c, int s, int d, int a, int r2, int c2 )
{
struct PcbQueue *p, *q;
/* first, see if it is already in the list */
for (q = NULL, p = Head; p; q = p, p = p->Next) {
if (p->Row == r && p->Col == c && p->Side == s) {
/* old one to remove */
if (q)
{
if ( (q->Next = p->Next) == NULL) Tail = q;
}
else if ((Head = p->Next) == NULL) Tail = NULL;
p->Next = Save; Save = p;
OpenNodes--; MoveNodes++;
qlen--;
break;
}
}
if (!p) /* not found, it has already been closed once */
ClosNodes--; /* we will close it again, but just count once */
/* if it was there, it's gone now; insert it at the proper position */
SetQueue( r, c, s, d, a, r2, c2 );
struct PcbQueue* p, * q;
/* first, see if it is already in the list */
for( q = NULL, p = Head; p; q = p, p = p->Next )
{
if( p->Row == r && p->Col == c && p->Side == s )
{
/* old one to remove */
if( q )
{
if( ( q->Next = p->Next ) == NULL )
Tail = q;
}
else if( ( Head = p->Next ) == NULL )
Tail = NULL;
p->Next = Save;
Save = p;
OpenNodes--;
MoveNodes++;
qlen--;
break;
}
}
if( !p ) /* not found, it has already been closed once */
ClosNodes--; /* we will close it again, but just count once */
/* if it was there, it's gone now; insert it at the proper position */
SetQueue( r, c, s, d, a, r2, c2 );
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/****************************/
/* affichage des empreintes */
/****************************/
/*******************/
/* Highlight nets. */
/*******************/
#include "fctsys.h"
#include "gr_basic.h"
......@@ -16,22 +16,20 @@
#define Pad_fill (Pad_Fill_Item.State == RUN)
/*********************************************************/
void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
/*********************************************************/
/** Function ListNetsAndSelect
* called by a command event
* displays the sorted list of nets in a dialog frame
* If a net is selected, it is hightlighted
* If a net is selected, it is highlighted
*/
void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
{
NETINFO_ITEM* net;
wxString netFilter;
int selection;
netFilter = wxT( "*" );
Get_Message( _( "Filter for net names:" ), _( "Net Filter" ), netFilter, this );
Get_Message( _( "Filter for net names:" ), _( "Net Filter" ),
netFilter, this );
if( netFilter.IsEmpty() )
return;
......@@ -45,7 +43,7 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
continue;
Line.Printf( wxT( "net_code = %3.3d [%.16s] " ), net->GetNet(),
GetChars( net->GetNetname() ) );
GetChars( net->GetNetname() ) );
List.Append( Line );
}
......@@ -87,12 +85,10 @@ void WinEDA_PcbFrame::ListNetsAndSelect( wxCommandEvent& event )
}
/**************************************************/
/* Locate track or pad and highlight the corresponding net
* Returns the Netcode, or -1 if no net located.
*/
int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
/**************************************************/
/* Localise track ou pad et met en surbrillance le net correspondant
* Retourne le netcode, ou -1 si pas de net localis�*/
{
if( g_HightLigt_Status )
Hight_Light( DC );
......@@ -145,14 +141,12 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )
}
/*******************************************/
void WinEDA_PcbFrame::Hight_Light( wxDC* DC )
/*******************************************/
/*
* fonction d'appel de Surbrillance a partir du menu
* Met ou supprime la surbrillance d'un net pointe par la souris
* Highlight command.
*
* Show or removes the net at the current cursor position.
*/
void WinEDA_PcbFrame::Hight_Light( wxDC* DC )
{
g_HightLigt_Status = !g_HightLigt_Status;
......
......@@ -15,11 +15,12 @@
#include "wx/statline.h"
/* Variables locales */
#define LAYER_NO_CHANGE NB_LAYERS
static int New_Layer[NB_LAYERS];
wxStaticText* layer_list[NB_LAYERS];
enum swap_layer_id {
ID_WINEDA_SWAPLAYERFRAME = 1800,
ID_BUTTON_0,
......@@ -27,10 +28,6 @@ enum swap_layer_id {
};
/***********************************************/
/* classe pour la frame de selection de layers */
/***********************************************/
class WinEDA_SwapLayerFrame : public wxDialog
{
private:
......@@ -46,7 +43,6 @@ private:
public:
// Constructor and destructor
WinEDA_SwapLayerFrame( WinEDA_BasePcbFrame* parent );
~WinEDA_SwapLayerFrame() { };
......@@ -58,7 +54,7 @@ private:
DECLARE_EVENT_TABLE()
};
/* Table des evenements pour WinEDA_SwapLayerFrame */
BEGIN_EVENT_TABLE( WinEDA_SwapLayerFrame, wxDialog )
EVT_COMMAND_RANGE( ID_BUTTON_0, ID_BUTTON_0 + NB_LAYERS - 1,
wxEVT_COMMAND_BUTTON_CLICKED,
......@@ -72,7 +68,6 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_BasePcbFrame* parent ) :
wxDialog( parent, -1, _( "Swap Layers:" ), wxPoint( -1, -1 ),
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER )
{
/*************************************************************************/
BOARD* board = parent->GetBoard();
OuterBoxSizer = NULL;
......@@ -357,7 +352,7 @@ void WinEDA_PcbFrame::Swap_Layers( wxCommandEvent& event )
if( ii != 1 )
return; // (Canceled dialog box returns -1 instead)
/* Modifications des pistes */
/* Change traces. */
pt_segm = GetBoard()->m_Track;
for( ; pt_segm != NULL; pt_segm = pt_segm->Next() )
{
......@@ -385,7 +380,7 @@ void WinEDA_PcbFrame::Swap_Layers( wxCommandEvent& event )
}
}
/* Modifications des zones */
/* Change zones. */
for( pt_segm = GetBoard()->m_Zone; pt_segm; pt_segm = pt_segm->Next() )
{
GetScreen()->SetModify();
......@@ -394,7 +389,7 @@ void WinEDA_PcbFrame::Swap_Layers( wxCommandEvent& event )
pt_segm->SetLayer( New_Layer[jj] );
}
/* Modifications des autres segments */
/* Change other segments. */
PtStruct = GetBoard()->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
{
......
/*****************************************************************/
/* tool_modeit.cpp: construction du menu de l'editeur de modules */
/*****************************************************************/
/***********************************************/
/* tool_modeit.cpp: footprint editor toolbars. */
/***********************************************/
#include "fctsys.h"
......@@ -22,10 +22,9 @@
#define LISTBOX_WIDTH 120
#endif
/***************************************************/
void WinEDA_ModuleEditFrame::ReCreateHToolbar()
/***************************************************/
/* Create the main horizontal toolbar for the footprint editor */
void WinEDA_ModuleEditFrame::ReCreateHToolbar()
{
if( m_HToolBar != NULL )
return;
......@@ -140,9 +139,7 @@ void WinEDA_ModuleEditFrame::ReCreateHToolbar()
}
/********************************************************/
void WinEDA_ModuleEditFrame::ReCreateVToolbar()
/********************************************************/
{
if( m_VToolBar )
return;
......@@ -192,14 +189,12 @@ void WinEDA_ModuleEditFrame::ReCreateVToolbar()
}
/*********************************************************/
void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
/*********************************************************/
{
if( m_OptionsToolBar )
return;
// creation du tool bar options
// Create options tool bar.
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
ID_OPT_TOOLBAR, FALSE );
......@@ -245,9 +240,7 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
}
/*********************************************************/
void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
/*********************************************************/
{
size_t i;
wxString msg;
......@@ -260,14 +253,14 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
// Set up toolbar
m_AuxiliaryToolBar->AddSeparator();
// Boite de selection du pas de grille
// Grid selection choice box.
m_SelGridBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
ID_ON_GRID_SELECT,
wxPoint( -1, -1 ),
wxSize( LISTBOX_WIDTH, -1 ) );
m_AuxiliaryToolBar->AddControl( m_SelGridBox );
// Boite de selection du Zoom
// Zoom selection choice box.
m_AuxiliaryToolBar->AddSeparator();
m_SelZoomBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
ID_ON_ZOOM_SELECT,
......@@ -298,7 +291,7 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
m_AuxiliaryToolBar->Realize();
}
// mise a jour des affichages
// Update tool bar to reflect setting.
m_SelGridBox->Clear();
for( i = 0; i < GetScreen()->m_GridList.GetCount(); i++ )
{
......
/********************************************************************************/
/* tool_onrightclick.cpp: fonctions appel�s par le bouton droit sur un TOOL */
/********************************************************************************/
/*************************/
/* tool_onrightclick.cpp */
/*************************/
#include "fctsys.h"
#include "common.h"
......@@ -12,9 +12,7 @@
#include "pcbnew_id.h"
/*****************************************************************/
void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
/*****************************************************************/
{
wxPoint pos;
int id = event.GetSelection();
......@@ -49,9 +47,7 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
}
/************************************************************************/
void WinEDA_ModuleEditFrame::ToolOnRightClick( wxCommandEvent& event )
/************************************************************************/
{
wxPoint pos;
int id = event.GetSelection();
......
This diff is collapsed.
/****************************************************************
* toolbars_update_user_interface.cpp
****************************************************************/
* toolbars_update_user_interface.cpp
****************************************************************/
/*
* function to update toolbars UI after changing parameters
......@@ -144,14 +144,15 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI()
}
/***************************************/
void WinEDA_PcbFrame::SetToolbars()
/***************************************/
/*
* Active ou desactive les tools des toolbars, en fonction des commandes
* en cours
* Enable or disable the toolbar's controls, depending on the current
* state.
*
* @todo: All of this should be perform in appropriate wxUpdateUIEvent
* handles. This is not how it how updating user interface controls
* is handle in wxWidgets.
*/
void WinEDA_PcbFrame::SetToolbars()
{
bool state;
......@@ -186,11 +187,9 @@ void WinEDA_PcbFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_DRC_OFF,
!Drc_On );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF,
Drc_On ?
_(
"DRC Off (Disable !!!), Currently: DRC is active" )
:
_( "DRC On (Currently: DRC is inactive !!!)" ) );
Drc_On ?
_( "Disable design rule checking" ) :
_( "Enable design rule checking" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM,
g_UnitMetric == MILLIMETRE ? TRUE : false );
......@@ -200,14 +199,16 @@ void WinEDA_PcbFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_POLAR_COORD,
DisplayOpt.DisplayPolarCood );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_POLAR_COORD,
DisplayOpt.DisplayPolarCood ?
_( "Polar coords not show" ) :
_( "Display polar coords" ) );
DisplayOpt.DisplayPolarCood ?
_( "Display rectangular coordinates" ) :
_( "Display polar coordinates" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GRID,
m_Draw_Grid );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_GRID,
m_Draw_Grid ? _( "Grid not show" ) : _( "Show grid" ) );
m_Draw_Grid ?
_( "Hide grid" ) :
_( "Show grid" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_CURSOR,
m_CursorShape );
......@@ -215,62 +216,62 @@ void WinEDA_PcbFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_RATSNEST,
g_Show_Ratsnest );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_RATSNEST,
g_Show_Ratsnest ?
_( "Hide general ratsnest" ) :
_( "Show general ratsnest" ) );
g_Show_Ratsnest ?
_( "Hide board ratsnest" ) :
_( "Show board ratsnest" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
g_Show_Module_Ratsnest );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
g_Show_Module_Ratsnest ?
_( "Hide module ratsnest" ) :
_( "Show module ratsnest" ) );
g_Show_Module_Ratsnest ?
_( "Hide module ratsnest" ) :
_( "Show module ratsnest" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_AUTO_DEL_TRACK,
g_AutoDeleteOldTrack );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_AUTO_DEL_TRACK,
g_AutoDeleteOldTrack ?
_( "Disable auto delete old track" ) :
_( "Enable auto delete old track" ) );
g_AutoDeleteOldTrack ?
_( "Disable auto delete old track" ) :
_( "Enable auto delete old track" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
m_DisplayPadFill ?
_( "Show pads sketch mode" ) :
_( "Show pads filled mode" ) );
m_DisplayPadFill ?
_( "Show pads in outline mode" ) :
_( "Show pads in fill mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
m_DisplayViaFill ?
_( "Show vias sketch mode" ) :
_( "Show vias filled mode" ) );
m_DisplayViaFill ?
_( "Show vias in outline mode" ) :
_( "Show vias in fill mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
!m_DisplayPcbTrackFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
m_DisplayPcbTrackFill ?
_( "Show tracks sketch mode" ) :
_( "Show tracks filled mode" ) );
m_DisplayPcbTrackFill ?
_( "Show tracks in outline mode" ) :
_( "Show tracks in fill mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay ?
_( "Normal contrast mode display" ) :
_( "High contrast mode display" ) );
DisplayOpt.ContrastModeDisplay ?
_( "Normal contrast display mode" ) :
_( "High contrast display mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) ?
_( "Hide invisible text" ) :
_( "Show invisible text" ) );
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) ?
_( "Hide invisible text" ) :
_( "Show invisible text" ) );
#if !defined(KICAD_AUIMANAGER)
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
......
This diff is collapsed.
/*************************/
/* affichage des modules */
/*************************/
/*******************/
/* Display modules */
/*******************/
#include "fctsys.h"
#include "gr_basic.h"
......@@ -11,29 +11,22 @@
#include "pcbnew.h"
#include "drag.h"
/* Police des caracteres de la routine de trace des textes */
/* Font of characters for the trace text routine. */
extern char* graphic_fonte_shape[];
#include "protos.h"
#define L_MIN_DESSIN 1 /* seuil de largeur des segments pour trace autre que filaire */
#define L_MIN_DESSIN 1 /* line width for segments other than traces. */
/* fonctions locales : */
/******************************************************************/
void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int ox, int oy,
int MasqueLayer, int draw_mode )
/******************************************************************/
/* Trace les pads d'un module en mode SKETCH.
* Utilisee pour afficher les pastilles d'un module lorsque celui ci n'est
* pas affiche par les options d'affichage des Modules
/* 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.
*
* Les pads affiches doivent apparaitre sur les couches donnees par
* MasqueLayer
* The pads posters must appear on the data layers by MasqueLayer
*/
void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int ox, int oy, int MasqueLayer, int draw_mode )
{
int tmp;
PCB_SCREEN* screen;
......@@ -45,7 +38,7 @@ void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
tmp = frame->m_DisplayPadFill;
frame->m_DisplayPadFill = FALSE;
/* trace des pastilles */
/* Draw pads. */
for( D_PAD* pad = Module->m_Pads; pad; pad = pad->Next() )
{
if( (pad->m_Masque_Layer & MasqueLayer) == 0 )
......
/*****************************************/
/* Routines generales d'affichage du PCB */
/*****************************************/
/* fichier tracepcb.cpp */
/****************/
/* tracepcb.cpp */
/****************/
/*
* Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
* Routines to display grid box coordinates, cursors, markers ...
*/
#include <vector>
......@@ -21,13 +19,9 @@
#include "protos.h"
/**********************************************************************/
void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/**********************************************************************/
/* Draw the footprint editor BOARD, and others elements : axis, grid ..
*/
void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
{
PCB_SCREEN* screen = (PCB_SCREEN*)GetScreen();
......@@ -59,12 +53,9 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
}
/****************************************************************/
void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/****************************************************************/
/* Draw the BOARD, and others elements : axis, grid ..
*/
void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
{
PCB_SCREEN* screen = GetScreen();
......@@ -95,25 +86,24 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
}
/********************************************************************/
/* Redraw the BOARD items but not cursors, axis or grid */
void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
int aDrawMode, const wxPoint& offset )
/********************************************************************/
/* Redraw the BOARD items but not cursors, axis or grid */
{
/* The order of drawing is flexible on some systems and not on others. For
* OSes which use OR to draw, the order is not important except for the
* effect of the highlight and its relationship to markers. See comment below.
* This order indepence comes from the fact that a binary OR operation is
* effect of the highlight and its relationship to markers. See comment
* below.
* This order independence comes from the fact that a binary OR operation is
* commutative in nature.
* However on the OSX, the OR operation is not used, and so this sequence
* below is chosen to give MODULEs the highest visible priority.
*/
/* Draw all tracks and zones. As long as dark colors are used for the tracks,
* Then the OR draw mode should show tracks underneath other tracks. But a white
* track will cover any other color since it has more bits to OR in.
/* Draw all tracks and zones. As long as dark colors are used for the
* tracks, Then the OR draw mode should show tracks underneath other
* tracks. But a white track will cover any other color since it has
* more bits to OR in.
*/
for( TRACK* track = m_Track; track; track = track->Next() )
{
......@@ -191,7 +181,8 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
if( g_HightLigt_Status )
DrawHighLight( aPanel, DC, g_HightLigth_NetCode );
// draw the BOARD's markers last, otherwise the high light will erase any marker on a pad
// draw the BOARD's markers last, otherwise the high light will erase
// any marker on a pad
for( unsigned i=0; i < m_markers.size(); ++i )
{
m_markers[i]->Draw( aPanel, DC, aDrawMode );
......@@ -199,9 +190,7 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
}
/******************************************************************************/
void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode )
/******************************************************************************/
{
int draw_mode;
......@@ -252,4 +241,3 @@ void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment