Commit 6e6098a0 authored by charras's avatar charras

cleanup

parent 96c80df7
...@@ -89,7 +89,7 @@ set(PCBNEW_SRCS ...@@ -89,7 +89,7 @@ set(PCBNEW_SRCS
hotkeys.cpp hotkeys.cpp
initpcb.cpp initpcb.cpp
ioascii.cpp ioascii.cpp
lay2plot.cpp print_board_functions.cpp
librairi.cpp librairi.cpp
loadcmp.cpp loadcmp.cpp
locate.cpp locate.cpp
......
...@@ -24,7 +24,7 @@ SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o specctra_import.o ...@@ -24,7 +24,7 @@ SPECCTRA_TOOLS = specctra.o specctra_export.o dsn.o specctra_import.o
OBJECTS= $(TARGET).o classpcb.o\ OBJECTS= $(TARGET).o classpcb.o\
$(ZONE_FILES)\ $(ZONE_FILES)\
$(SPECCTRA_TOOLS)\ $(SPECCTRA_TOOLS)\
lay2plot.o\ print_board_functions.o\
dialog_freeroute_exchange.o\ dialog_freeroute_exchange.o\
modedit_undo_redo.o\ modedit_undo_redo.o\
block_module_editor.o\ block_module_editor.o\
...@@ -160,7 +160,7 @@ export_gencad.o: export_gencad.cpp ...@@ -160,7 +160,7 @@ export_gencad.o: export_gencad.cpp
wxprint.o: ../share/wxprint.cpp ../share/dialog_print.cpp ../share/dialog_print.h wxprint.o: ../share/wxprint.cpp ../share/dialog_print.cpp ../share/dialog_print.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp $(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
lay2plot.o: lay2plot.cpp print_board_functions.o: print_board_functions.cpp
classpcb.o: classpcb.cpp classpcb.o: classpcb.cpp
......
/**********************************************/ /**********************************************/
/* Routine de selection de couches pour trace */ /*lay2plot.cpp: some functions to plot boards */
/**********************************************/ /**********************************************/
#include "fctsys.h" #include "fctsys.h"
...@@ -11,11 +11,8 @@ ...@@ -11,11 +11,8 @@
#include "protos.h" #include "protos.h"
/* Local functions */
/* Variables locales : */ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
/* Routines Locales */
static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
int draw_mode, int masklayer ); int draw_mode, int masklayer );
...@@ -24,7 +21,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -24,7 +21,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
/************************************************************************************************************/ /************************************************************************************************************/
/* Used to print the board. /* Used to print the board.
* Draw the board, but only layers allowed by printmasklayer * Print the board, but only layers allowed by printmasklayer
* ( printmasklayer is a 32 bits mask: bit n = 1 -> layer n is printed) * ( printmasklayer is a 32 bits mask: bit n = 1 -> layer n is printed)
*/ */
{ {
...@@ -41,19 +38,19 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -41,19 +38,19 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
else else
DisplayOpt.DisplayPadFill = SKETCH; DisplayOpt.DisplayPadFill = SKETCH;
frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill; frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum = FALSE; frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum = false;
DisplayOpt.DisplayPadNoConn = FALSE; DisplayOpt.DisplayPadNoConn = false;
DisplayOpt.DisplayPadIsol = FALSE; DisplayOpt.DisplayPadIsol = false;
DisplayOpt.DisplayModEdge = FILLED; DisplayOpt.DisplayModEdge = FILLED;
DisplayOpt.DisplayModText = FILLED; DisplayOpt.DisplayModText = FILLED;
frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = FILLED; frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = FILLED;
DisplayOpt.DisplayTrackIsol = FALSE; DisplayOpt.DisplayTrackIsol = false;
DisplayOpt.DisplayDrawItems = FILLED; DisplayOpt.DisplayDrawItems = FILLED;
DisplayOpt.DisplayZonesMode = 0; DisplayOpt.DisplayZonesMode = 0;
m_PrintIsMirrored = aPrintMirrorMode; m_PrintIsMirrored = aPrintMirrorMode;
/* Draw the pcb graphic items (texts, ...) */ /* Print the pcb graphic items (texts, ...) */
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() ) switch( item->Type() )
...@@ -74,7 +71,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -74,7 +71,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
} }
} }
/* Draw the tracks */ /* Print tracks */
pt_piste = Pcb->m_Track; pt_piste = Pcb->m_Track;
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() ) for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{ {
...@@ -105,15 +102,15 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -105,15 +102,15 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
Module = (MODULE*) Pcb->m_Modules; Module = (MODULE*) Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() ) for( ; Module != NULL; Module = Module->Next() )
{ {
Plot_Module( this, DC, Module, drawmode, printmasklayer ); Print_Module( this, DC, Module, drawmode, printmasklayer );
} }
/* draw the via holes in white color*/ /* Print via holes in white color*/
pt_piste = Pcb->m_Track; pt_piste = Pcb->m_Track;
int rayon = g_DesignSettings.m_ViaDrill / 2; int rayon = g_DesignSettings.m_ViaDrill / 2;
int color = WHITE; int color = WHITE;
bool blackpenstate = GetGRForceBlackPenState( ); bool blackpenstate = GetGRForceBlackPenState( );
GRForceBlackPen( FALSE ); GRForceBlackPen( false );
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() ) for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{ {
if( ( printmasklayer & pt_piste->ReturnMaskLayer() ) == 0 ) if( ( printmasklayer & pt_piste->ReturnMaskLayer() ) == 0 )
...@@ -127,7 +124,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -127,7 +124,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
} }
GRForceBlackPen( blackpenstate ); GRForceBlackPen( blackpenstate );
/* Draw areas (i.e. zones) */ /* Draw filled areas (i.e. zones) */
for( int ii = 0; ii < Pcb->GetAreaCount(); ii++ ) for( int ii = 0; ii < Pcb->GetAreaCount(); ii++ )
{ {
ZONE_CONTAINER* zone = Pcb->GetArea(ii); ZONE_CONTAINER* zone = Pcb->GetArea(ii);
...@@ -150,7 +147,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -150,7 +147,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
/***********************************************************/ /***********************************************************/
static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
MODULE* Module, int draw_mode, int masklayer ) MODULE* Module, int draw_mode, int masklayer )
/***********************************************************/ /***********************************************************/
{ {
...@@ -159,7 +156,7 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -159,7 +156,7 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC,
TEXTE_MODULE* TextMod; TEXTE_MODULE* TextMod;
int mlayer; int mlayer;
/* Draw pads */ /* Print pads */
pt_pad = Module->m_Pads; pt_pad = Module->m_Pads;
for( ; pt_pad != NULL; pt_pad = pt_pad->Next() ) for( ; pt_pad != NULL; pt_pad = pt_pad->Next() )
{ {
...@@ -178,7 +175,7 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -178,7 +175,7 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC,
pt_pad->Draw( panel, DC, draw_mode ); pt_pad->Draw( panel, DC, draw_mode );
} }
/* draw footprint graphic shapes */ /* Print footprint graphic shapes */
PtStruct = Module->m_Drawings; PtStruct = Module->m_Drawings;
mlayer = g_TabOneLayerMask[Module->GetLayer()]; mlayer = g_TabOneLayerMask[Module->GetLayer()];
if( Module->GetLayer() == COPPER_LAYER_N ) if( Module->GetLayer() == COPPER_LAYER_N )
...@@ -188,17 +185,9 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -188,17 +185,9 @@ static void Plot_Module( WinEDA_DrawPanel* panel, wxDC* DC,
if( mlayer & masklayer ) if( mlayer & masklayer )
{ {
/* Analyse des autorisations de trace pour les textes VALEUR et REF */ if( ! Module->m_Reference->m_NoShow )
bool trace_val, trace_ref;
trace_val = trace_ref = TRUE; // les 2 autorisations de tracer sont donnees
if( Module->m_Reference->m_NoShow )
trace_ref = FALSE;
if( Module->m_Value->m_NoShow )
trace_val = FALSE;
if( trace_ref )
Module->m_Reference->Draw( panel, DC, draw_mode ); Module->m_Reference->Draw( panel, DC, draw_mode );
if( trace_val ) if( ! Module->m_Value->m_NoShow )
Module->m_Value->Draw( panel, DC, draw_mode ); Module->m_Value->Draw( panel, DC, draw_mode );
} }
......
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