Commit b27bbe9c authored by charras's avatar charras

Eeschema+Pcbnew: code cleanup and refinements in plot SVG format

parent 19e5bc3b
......@@ -15,9 +15,9 @@
#include "dcsvg.h"
#include "program.h"
#include "general.h"
// Keys for configuration
#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth")
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
extern BASE_SCREEN* ActiveScreen;
......@@ -25,8 +25,6 @@ extern BASE_SCREEN* ActiveScreen;
#define WIDTH_MIN_VALUE 1
// Variables locales
static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
......@@ -88,13 +86,13 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
m_ImageXSize_mm = 270;
if( m_Config )
{
m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth );
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width );
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
}
AddUnitSymbol(* m_TextPenWidth, g_UnitMetric );
m_DialogPenWidth->SetValue(
ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
ReturnStringFromValue(g_UnitMetric, g_PlotLine_Width, m_Parent->m_InternalUnits ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
if (GetSizer())
{
......@@ -107,20 +105,20 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
void DIALOG_SVG_PRINT::SetPenWidth()
/********************************************/
{
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
g_PlotLine_Width = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
if( s_SVGPenMinWidth > WIDTH_MAX_VALUE )
if( g_PlotLine_Width > WIDTH_MAX_VALUE )
{
s_SVGPenMinWidth = WIDTH_MAX_VALUE;
g_PlotLine_Width = WIDTH_MAX_VALUE;
}
if( s_SVGPenMinWidth < WIDTH_MIN_VALUE )
if( g_PlotLine_Width < WIDTH_MIN_VALUE )
{
s_SVGPenMinWidth = WIDTH_MIN_VALUE;
g_PlotLine_Width = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue(g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
ReturnStringFromValue(g_UnitMetric, g_PlotLine_Width, m_Parent->m_InternalUnits ) );
}
......@@ -237,8 +235,8 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* scre
{
EDA_Rect tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc );
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
SetPenMinWidth( s_SVGPenMinWidth );
g_PlotLine_Width = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
SetPenMinWidth( g_PlotLine_Width );
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true );
......@@ -295,7 +293,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth );
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width );
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
}
EndModal( 0 );
......
......@@ -253,8 +253,8 @@ eda_global bool g_EditPinByPinIsOn /* bool: TRUE si edition des pin
;
eda_global int g_LibSymbolDefaultLineWidth; /* default line width (in EESCHEMA units) used when creating a new graphic item in libedit : 0 = default */
eda_global int g_DrawMinimunLineWidth; /* Minimum line (in EESCHEMA units) width used to draw items on screen; 0 = single pixel line width */
eda_global int g_PlotPSMinimunLineWidth; /* Minimum line (in EESCHEMA units) width used to Plot items , postscript format */
eda_global int g_DrawMinimunLineWidth; /* Minimum line (in EESCHEMA units) thickness used to draw items on screen; 0 = single pixel line width */
eda_global int g_PlotLine_Width; /* Minimum line (in EESCHEMA units) thickness used to Plot/Print items */
eda_global int g_ItemSelectetColor // Color to draw selected items
#ifdef MAIN
......@@ -270,6 +270,6 @@ eda_global int g_InvisibleItemColor // Color to draw items flagged invis
/* Config keys */
#define MINI_DRAW_LINE_WIDTH_KEY wxT( "MinimunDrawLineWidth" )
#define MINI_PLOTPS_LINE_WIDTH_KEY wxT( "MinimunPlotPSLineWidth" )
#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
#endif // _GENERAL_H_
......@@ -254,7 +254,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
SetCurrentLineWidth( -1 );
int thickness = Text->m_Width;
if( thickness == 0 ) //
thickness = MAX( g_PlotPSMinimunLineWidth, g_DrawMinimunLineWidth );
thickness = MAX( g_PlotLine_Width, g_DrawMinimunLineWidth );
PlotGraphicText( g_PlotFormat, pos, CharColor,
Text->m_Text,
t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT,
......@@ -468,7 +468,7 @@ static void PlotTextField( SCH_COMPONENT* DrawLibItem,
int thickness = field->m_Width;
if( thickness == 0 )
thickness = MAX( g_PlotPSMinimunLineWidth, g_DrawMinimunLineWidth );
thickness = MAX( g_PlotLine_Width, g_DrawMinimunLineWidth );
SetCurrentLineWidth( thickness );
//@todo not sure what to do here in terms of plotting components that may have multiple REFERENCE entries.
......@@ -675,7 +675,7 @@ void PlotTextStruct( EDA_BaseStruct* Struct )
}
if( thickness == 0 )
thickness = MAX( g_PlotPSMinimunLineWidth, g_DrawMinimunLineWidth );
thickness = MAX( g_PlotLine_Width, g_DrawMinimunLineWidth );
SetCurrentLineWidth( thickness );
switch( Orient )
......@@ -773,7 +773,7 @@ static void PlotSheetLabelStruct( Hierarchical_PIN_Sheet_Struct* Struct )
}
int thickness = Struct->m_Width;
if( thickness == 0 )
thickness = MAX( g_PlotPSMinimunLineWidth, g_DrawMinimunLineWidth );
thickness = MAX( g_PlotLine_Width, g_DrawMinimunLineWidth );
SetCurrentLineWidth( thickness );
bool italic = Struct->m_Italic;
......@@ -843,7 +843,7 @@ void PlotSheetStruct( DrawSheetStruct* Struct )
if( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
SetColorMapPS( ReturnLayerColor( Struct->m_Layer ) );
int thickness = MAX( g_PlotPSMinimunLineWidth, g_DrawMinimunLineWidth );
int thickness = MAX( g_PlotLine_Width, g_DrawMinimunLineWidth );
SetCurrentLineWidth( thickness );
Move_Plume( Struct->m_Pos, 'U' );
......
......@@ -271,7 +271,7 @@ void WinEDA_PlotPSFrame::CreateControls()
SetFocus(); // make the ESC work
m_DefaultLineSizeCtrl = new WinEDA_ValueCtrl( this, _(
"Default Line Width" ),
g_PlotPSMinimunLineWidth,
g_PlotLine_Width,
g_UnitMetric, m_DefaultLineSizeCtrlSizer,
EESCHEMA_INTERNAL_UNIT );
}
......@@ -363,9 +363,9 @@ void WinEDA_PlotPSFrame::InitOptVars()
Plot_Sheet_Ref = m_Plot_Sheet_Ref->GetValue();
g_PlotPSColorOpt = m_PlotPSColorOption->GetSelection();
PS_SizeSelect = m_SizeOption->GetSelection();
g_PlotPSMinimunLineWidth = m_DefaultLineSizeCtrl->GetValue();
if( g_PlotPSMinimunLineWidth < 1 )
g_PlotPSMinimunLineWidth = 1;
g_PlotLine_Width = m_DefaultLineSizeCtrl->GetValue();
if( g_PlotLine_Width < 1 )
g_PlotLine_Width = 1;
}
......@@ -479,7 +479,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
m_MsgBox->AppendText( Line );
InitPlotParametresPS( plot_offset, sheet, g_PlotScaleX, g_PlotScaleY );
SetDefaultLineWidthPS( g_PlotPSMinimunLineWidth );
SetDefaultLineWidthPS( g_PlotLine_Width );
/* Init : */
PrintHeaderPS( PlotOutput, wxT( "EESchema-PS" ), FileName, 1, BBox, wxLANDSCAPE );
......@@ -531,10 +531,10 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
case LAYER_BUS: /* Trait large */
{
fprintf( PlotOutput, "%d setlinewidth\n", g_PlotPSMinimunLineWidth * 3 );
fprintf( PlotOutput, "%d setlinewidth\n", g_PlotLine_Width * 3 );
Move_Plume( StartPos, 'U' );
Move_Plume( EndPos, 'D' );
fprintf( PlotOutput, "%d setlinewidth\n", g_PlotPSMinimunLineWidth );
fprintf( PlotOutput, "%d setlinewidth\n", g_PlotLine_Width );
}
break;
......
......@@ -163,7 +163,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
{
g_DrawMinimunLineWidth = config->Read( MINI_DRAW_LINE_WIDTH_KEY,
(long) 0 );
g_PlotPSMinimunLineWidth = config->Read( MINI_PLOTPS_LINE_WIDTH_KEY,
g_PlotLine_Width = config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE,
(long) 4 );
}
......@@ -368,8 +368,7 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
if( config )
{
config->Write( MINI_DRAW_LINE_WIDTH_KEY, (long) g_DrawMinimunLineWidth );
config->Write( MINI_PLOTPS_LINE_WIDTH_KEY,
(long) g_PlotPSMinimunLineWidth );
config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, (long) g_PlotLine_Width );
}
Destroy();
......
......@@ -6,7 +6,6 @@
#define INSETUP TRUE
static int Pcbdiv_grille; /* memorisation temporaire */
static wxSize TmpGrid; /* memorisation temporaire */
/* Liste des parametres */
......@@ -69,54 +68,6 @@ static PARAM_CFG_BOOL PadShowNumCfg // Affiche DCodes
TRUE /* Valeur par defaut */
);
static PARAM_CFG_INT AfficheTextePcbCfg
(
wxT("PcbAffT"), /* identification */
&DisplayOpt.DisplayDrawItems, /* Adresse du parametre */
FILAIRE, /* Valeur par defaut */
0, 2 /* Valeurs extremes */
);
static PARAM_CFG_INT PcbTextWidthCfg
(
wxT("TxtLar"), /* identification */
&g_DesignSettings.m_PcbTextWidth, /* Adresse du parametre */
120, /* Valeur par defaut */
0,0xFFFF /* Valeurs extremes */
);
static PARAM_CFG_INT TextePcbDimVCfg
(
wxT("TxtPcbV"), /* identification */
&g_DesignSettings.m_PcbTextSize.y, /* Adresse du parametre */
800, /* Valeur par defaut */
0, 0x7FFF /* Valeurs extremes */
);
static PARAM_CFG_INT TextePcbDimHCfg
(
wxT("TxtPcbH"), /* identification */
&g_DesignSettings.m_PcbTextSize.x, /* Adresse du parametre */
600, /* Valeur par defaut */
0, 0x7FFF /* Valeurs extremes */
);
static PARAM_CFG_INT ScreenPcbGrilleXCfg
(
wxT("PcbGridX"), /* identification */
&TmpGrid.x, /* Adresse du parametre */
500, /* Valeur par defaut */
1,10000 /* Valeurs extremes */
);
static PARAM_CFG_INT ScreenPcbGrilleYCfg
(
wxT("PcbGridY"), /* identification */
&TmpGrid.y, /* Adresse du parametre */
500, /* Valeur par defaut */
1,10000 /* Valeurs extremes */
);
static PARAM_CFG_SETCOLOR ColorLayer0Cfg
(
INSETUP,
......@@ -446,22 +397,6 @@ static PARAM_CFG_INT EdgeSegmLargeurCfg
0,10000 /* Valeurs extremes */
);
static PARAM_CFG_INT FormatPlotCfg
(
wxT("ForPlot"), /* identification */
&format_plot, /* Adresse du parametre */
1, /* Valeur par defaut */
0,3 /* Valeurs extremes */
);
static PARAM_CFG_INT WTraitSerigraphiePlotCfg // Epaiss Trait Serigraphie(mils)
(
wxT("WpenSer"), /* identification */
&W_Trait_Serigraphie, /* Adresse du parametre */
12, /* Valeur par defaut */
0,1000 /* Valeurs extremes */
);
static PARAM_CFG_DOUBLE UserGrilleXCfg
(
wxT("UserGrX"), /* identification */
......@@ -486,14 +421,6 @@ static PARAM_CFG_INT UserGrilleUnitCfg // USER Grid Unit (inches/mm)
0, 1 /* Valeurs extremes */
);
static PARAM_CFG_INT DivGrillePcbCfg
(
wxT("DivGrPc"), /* identification */
&Pcbdiv_grille, /* Adresse du parametre */
1, /* Valeur par defaut */
1,10 /* Valeurs extremes */
);
static PARAM_CFG_INT TimeOutCfg
(
wxT("TimeOut"), /* identification */
......@@ -529,12 +456,6 @@ static PARAM_CFG_BASE * ParamCfgList[] =
& SegmFillCfg,
& PadFillCfg,
& PadShowNumCfg,
& AfficheTextePcbCfg,
& TextePcbDimVCfg,
& PcbTextWidthCfg,
& TextePcbDimHCfg,
& ScreenPcbGrilleXCfg,
& ScreenPcbGrilleYCfg,
& ColorLayer0Cfg,
& ColorLayer1Cfg,
& ColorLayer2Cfg,
......@@ -569,19 +490,12 @@ static PARAM_CFG_BASE * ParamCfgList[] =
& ColorLayer31Cfg,
& ColorpcbGrilleCfg,
& ColorDCodesCfg,
& HPGLpenNumCfg,
& HPGLdiamCfg,
& HPGLspeedCfg,
& HPGLrecouvrementCfg,
& GERBERSpotMiniCfg,
& DrawSegmLargeurCfg,
& EdgeSegmLargeurCfg,
& FormatPlotCfg,
& WTraitSerigraphiePlotCfg,
& UserGrilleXCfg,
& UserGrilleYCfg,
& UserGrilleUnitCfg,
& DivGrillePcbCfg,
& TimeOutCfg,
& DisplPolairCfg,
& CursorShapeCfg,
......
/*******************************************************/
/* Menu General de Trace (PLOT): Fichier inclus PLOT.H */
/*******************************************************/
/******************/
/* file pcbplot.h */
/******************/
#ifndef PCBPLOT_H
#define PCBPLOT_H
......@@ -9,6 +9,13 @@
#define eda_global extern
#endif
/* Shared Config keys for plot and print */
#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
/* Gestion des plumes en plot format HPGL */
eda_global int HPGL_Pen_Num, /* num de plume a charger */
HPGL_Pen_Speed, /* vitesse en cm/s */
......@@ -17,10 +24,10 @@ eda_global int HPGL_Pen_Num, /* num de plume a charger */
eda_global float Scale_X, Scale_Y ; /* coeff d'agrandissement en X et Y demandes */
eda_global int W_Trait_Serigraphie; /* Largeur du trait utilise en serigraphie
pour trace de pads (traces en mode sketch) */
eda_global int format_plot; /* numero de code du format de sortie */
eda_global int PlotMarge;
eda_global int g_PlotLine_Width; /* Largeur du trait en mode filaire (utilise en serigraphie,
pour traces en mode sketch et filaire) */
#endif // ifndef PCBPLOT_H
/******************************************************************/
/* kicad_msvc.h : used to compile kicad with Microsoft Visual C++ */
/******************************************************************/
// __MSVC__ must be defined
//
// there are several issues
// 1 - the EXCHG macro uses the typeof keyword, this is unsupported in MSVC
// 2 - there is no round function in the msvc math library
// see ReadMe-MSVC. txt to view list of all changes to sources
//
#ifndef __KICAD_MSVC_ INC__
#define __KICAD_MSVC_ INC__
#ifdef __MSVC__
// the boost libs have a workaround for the typeof problem
#ifdef _MSC_VER
#if ( _MSC_VER <= 1310 ) // 6.5 7.0 and 7.1 use the msvc bug
#include <boost/typeof/ msvc/typeof_ impl.hpp>
#else // 8.0 or greater
#include <boost/typeof/ typeof.hpp>
// we have to register the types used with the typeof keyword with boost
BOOST_TYPEOF_ REGISTER_ TYPE(wxPoint) ;
BOOST_TYPEOF_ REGISTER_ TYPE(wxSize) ;
BOOST_TYPEOF_ REGISTER_ TYPE(wxString) ;
class DrawSheetLabelStruc t;
BOOST_TYPEOF_ REGISTER_ TYPE(DrawSheetLa belStruct *);
class EDA_BaseStruct;
BOOST_TYPEOF_ REGISTER_ TYPE(EDA_ BaseStruct *);
class D_PAD;
BOOST_TYPEOF_ REGISTER_ TYPE(D_PAD *);
BOOST_TYPEOF_ REGISTER_ TYPE(const D_PAD *);
class BOARD_ITEM;
BOOST_TYPEOF_ REGISTER_ TYPE(BOARD_ ITEM *);
#endif // _MSC_VER <= 1310
#define typeof(expr) BOOST_TYPEOF( expr)
#endif // def _MSC_VER
inline double round(double x)
{
return x >= 0.5 ? ceil(x) : floor(x);
}
#endif // def __MSVC__
#endif // ndef __KICAD_MSVC_ INC__
......@@ -15,18 +15,17 @@
#include "dcsvg.h"
#include "pcbnew.h"
#include "pcbplot.h"
// Keys for configuration
#define PLOTSVGPENWIDTH_KEY wxT( "PlotSVGPenWidth" )
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
#define WIDTH_MAX_VALUE 100
// reasonnable values for default pen width (in 1/10000 inch)
#define WIDTH_MAX_VALUE 500
#define WIDTH_MIN_VALUE 1
// Variables locales
static int s_SVGPenMinWidth; /* Minimum pen width (in internal units) for printing */
// Local variables:
static int s_PrintPenMinWidth = 1;
static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0;
static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
......@@ -53,8 +52,8 @@ private:
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Sheet_Ref );
void PrintSVGDoc( bool aPrintAll, bool aPrint_Framet_Ref );
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Framet_Ref );
};
/*******************************************************/
......@@ -92,14 +91,15 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
m_ImageXSize_mm = 270;
if( m_Config )
{
m_Config->Read( PLOTSVGPENWIDTH_KEY, &s_SVGPenMinWidth );
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_PrintPenMinWidth );
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
}
AddUnitSymbol( *m_TextPenWidth, g_UnitMetric );
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
ReturnStringFromValue( g_UnitMetric, s_PrintPenMinWidth, m_Parent->m_InternalUnits ) );
m_Print_Frame_Ref_Ctrl->SetValue( s_Print_Frame_Ref );
// Create layers list
BOARD* board = m_Parent->GetBoard();
......@@ -139,29 +139,29 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
}
/********************************************/
/***********************************/
void DIALOG_SVG_PRINT::SetPenWidth()
/********************************************/
/***********************************/
{
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
s_PrintPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
if( s_SVGPenMinWidth > WIDTH_MAX_VALUE )
if( s_PrintPenMinWidth > WIDTH_MAX_VALUE )
{
s_SVGPenMinWidth = WIDTH_MAX_VALUE;
s_PrintPenMinWidth = WIDTH_MAX_VALUE;
}
if( s_SVGPenMinWidth < WIDTH_MIN_VALUE )
if( s_PrintPenMinWidth < WIDTH_MIN_VALUE )
{
s_SVGPenMinWidth = WIDTH_MIN_VALUE;
s_PrintPenMinWidth = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_SVGPenMinWidth, m_Parent->m_InternalUnits ) );
ReturnStringFromValue( g_UnitMetric, s_PrintPenMinWidth, m_Parent->m_InternalUnits ) );
}
/***************************************************************************/
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Framet_Ref )
/***************************************************************************/
{
wxString msg;
......@@ -186,7 +186,9 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
ChangeFileNameExt( FullFileName, wxT( "" ) );
}
if( ! aPrintAll )
if( aPrintAll )
FullFileName += wxT("-brd");
else
{
FullFileName << wxT("-") << m_BoxSelectLayer[layer]->GetLabel( );
m_PrintMaskLayer = 1 << layer;
......@@ -197,7 +199,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
FullFileName += wxT( ".svg" );
bool success = DrawPage( FullFileName, screen, aPrint_Sheet_Ref );
bool success = DrawPage( FullFileName, screen, aPrint_Framet_Ref );
msg = _( "Create file " ) + FullFileName;
if( !success )
msg += _( " error" );
......@@ -210,10 +212,10 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
}
/*****************************************************************/
/**********************************************************************************/
bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* screen,
bool aPrint_Sheet_Ref )
/*****************************************************************/
bool aPrint_Framet_Ref )
/***********************************************************************************/
/*
* Routine effective d'impression
......@@ -252,8 +254,8 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* scre
{
EDA_Rect tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc );
s_SVGPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
SetPenMinWidth( s_SVGPenMinWidth );
s_PrintPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
SetPenMinWidth( s_PrintPenMinWidth );
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? FALSE : true );
......@@ -262,7 +264,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* scre
g_IsPrinting = true;
SetLocaleTo_C_standard(); // Switch the locale to standard C (needed to print floating point numbers like 1.3)
panel->PrintPage( &dc, aPrint_Sheet_Ref, m_PrintMaskLayer, false );
panel->PrintPage( &dc, aPrint_Framet_Ref, m_PrintMaskLayer, false );
SetLocaleTo_Default(); // revert to the current locale
g_IsPrinting = FALSE;
panel->m_ClipBox = tmp;
......@@ -284,8 +286,8 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, BASE_SCREEN* scre
void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event )
/********************************************************************/
{
s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( );
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
s_Print_Frame_Ref = m_Print_Frame_Ref_Ctrl->IsChecked( );
PrintSVGDoc( true, s_Print_Frame_Ref );
}
......@@ -293,8 +295,8 @@ void DIALOG_SVG_PRINT::OnButtonPrintBoardClick( wxCommandEvent& event )
void DIALOG_SVG_PRINT::OnButtonPrintSelectedClick( wxCommandEvent& event )
/********************************************************************/
{
s_Print_Frame_Ref = m_Print_Sheet_Ref->GetValue( );
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
s_Print_Frame_Ref = m_Print_Frame_Ref_Ctrl->IsChecked( );
PrintSVGDoc( false, s_Print_Frame_Ref );
}
......@@ -313,7 +315,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
m_Config->Write( PLOTSVGPENWIDTH_KEY, s_SVGPenMinWidth );
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_PrintPenMinWidth );
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
wxString layerKey;
for( int layer = 0; layer<NB_LAYERS; ++layer )
......
......@@ -52,12 +52,12 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
sbOptionsSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
m_Print_Sheet_Ref = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 );
m_Print_Sheet_Ref->SetValue(true);
m_Print_Frame_Ref_Ctrl = new wxCheckBox( this, wxID_ANY, _("Print Frame Ref"), wxDefaultPosition, wxDefaultSize, 0 );
m_Print_Frame_Ref_Ctrl->SetValue(true);
m_Print_Sheet_Ref->SetToolTip( _("Print (or not) the Frame references.") );
m_Print_Frame_Ref_Ctrl->SetToolTip( _("Print (or not) the Frame references.") );
sbOptionsSizer->Add( m_Print_Sheet_Ref, 0, wxALL, 5 );
sbOptionsSizer->Add( m_Print_Frame_Ref_Ctrl, 0, wxALL, 5 );
m_PrintBoardEdgesCtrl = new wxCheckBox( this, wxID_ANY, _("Print Board Edges"), wxDefaultPosition, wxDefaultSize, 0 );
m_PrintBoardEdgesCtrl->SetValue(true);
......
......@@ -314,7 +314,7 @@
<property name="label">Print Frame Ref</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Print_Sheet_Ref</property>
<property name="name">m_Print_Frame_Ref_Ctrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
......
......@@ -45,7 +45,7 @@ class DIALOG_SVG_PRINT_base : public wxDialog
wxStaticText* m_TextPenWidth;
wxTextCtrl* m_DialogPenWidth;
wxRadioBox* m_ModeColorOption;
wxCheckBox* m_Print_Sheet_Ref;
wxCheckBox* m_Print_Frame_Ref_Ctrl;
wxCheckBox* m_PrintBoardEdgesCtrl;
wxButton* m_buttonPrintSelected;
wxButton* m_buttonBoard;
......
......@@ -19,11 +19,9 @@
#define OPTKEY_EDGELAYER_GERBER wxT( "EdgeLayerGerberOpt" )
#define OPTKEY_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" )
#define OPTKEY_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" )
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
#define OPTKEY_PADS_ON_SILKSCREEN wxT( "PlotPadsOnSilkscreen" )
#define OPTKEY_ALWAYS_PRINT_PADS wxT( "PlotAlwaysPads" )
#define OPTKEY_OUTPUT_FORMAT wxT( "PlotOutputFormat" )
#define OPTKEY_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
......@@ -203,7 +201,7 @@ void WinEDA_PlotFrame::OnInitDialog( wxInitDialogEvent& event )
if( config )
{
config->Read( OPTKEY_OUTPUT_FORMAT, &g_PlotFormat );
config->Read( OPTKEY_LINEWIDTH_VALUE, &g_PlotLine_Width);
config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width);
}
m_PlotFormatOpt->SetSelection( g_PlotFormat );
......@@ -345,11 +343,11 @@ void WinEDA_PlotFrame::OnInitDialog( wxInitDialogEvent& event )
{
m_Plot_Sheet_Ref = new wxCheckBox( this, ID_PRINT_REF, _( "Print sheet ref" ) );
m_Plot_Sheet_Ref->SetValue( Plot_Sheet_Ref );
m_Plot_Sheet_Ref->SetValue( g_Plot_Frame_Ref );
LeftBoxSizer->Add( m_Plot_Sheet_Ref, 0, wxGROW | wxALL, 1 );
}
else
Plot_Sheet_Ref = false;
g_Plot_Frame_Ref = false;
// Option to plot pads on silkscreen layers or all layers
m_Plot_Pads_on_Silkscreen = new wxCheckBox( this, ID_PRINT_PAD_ON_SILKSCREEN,
......@@ -426,7 +424,7 @@ void WinEDA_PlotFrame::OnInitDialog( wxInitDialogEvent& event )
wxDefaultPosition, wxDefaultSize,
3, list_opt3, 1 );
m_PlotModeOpt->SetSelection( Plot_Mode );
m_PlotModeOpt->SetSelection( g_Plot_Mode );
MidLeftBoxSizer->Add( m_PlotModeOpt, 0, wxGROW | wxALL, 5 );
m_PlotMirorOpt = new wxCheckBox( this, ID_MIROR_OPT,
......@@ -575,7 +573,7 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
g_Exclude_Edges_Pcb = m_Exclude_Edges_Pcb->GetValue();
if( m_Plot_Sheet_Ref )
Plot_Sheet_Ref = m_Plot_Sheet_Ref->GetValue();
g_Plot_Frame_Ref = m_Plot_Sheet_Ref->GetValue();
PlotPadsOnSilkLayer = m_Plot_Pads_on_Silkscreen->GetValue();
Plot_Pads_All_Layers = m_Force_Plot_Pads->GetValue();
......@@ -594,7 +592,7 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
g_PlotOrient = PLOT_MIROIR;
else
g_PlotOrient = 0;
Plot_Mode = m_PlotModeOpt->GetSelection();
g_Plot_Mode = m_PlotModeOpt->GetSelection();
g_DrawViaOnMaskLayer = m_PlotNoViaOnMaskOpt->GetValue();
g_HPGL_Pen_Diam = m_HPGLPenSizeOpt->GetValue();
......@@ -619,7 +617,7 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
int formatNdx = m_PlotFormatOpt->GetSelection();
config->Write( OPTKEY_OUTPUT_FORMAT, formatNdx );
config->Write( OPTKEY_LINEWIDTH_VALUE, g_PlotLine_Width );
config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width );
wxString layerKey;
for( int layer = 0; layer<NB_LAYERS; ++layer )
......
......@@ -10,6 +10,12 @@
#define eda_global extern
#endif
/* Shared Config keys for plot and print */
#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
/* Constantes de conversion d'unites */
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
......@@ -23,9 +29,9 @@ eda_global bool g_Exclude_Edges_Pcb // True to exclude contents of Edges Pcb la
= FALSE
#endif
;
eda_global bool Plot_Sheet_Ref;
eda_global bool g_Plot_Frame_Ref; // True to plot/print frame references
eda_global bool g_DrawViaOnMaskLayer; // True if vias are drawn on Mask layer (ie protected by mask)
eda_global int Plot_Mode // = FILAIRE, FILL ou SKETCH
eda_global int g_Plot_Mode // = FILAIRE, FILL or SKETCH
#ifdef MAIN
= FILLED
#endif
......@@ -84,8 +90,6 @@ eda_global int g_HPGL_Pen_Recouvrement; /* recouvrement en mils ( pour remplis
eda_global float Scale_X, Scale_Y ; /* coeff d'agrandissement en X et Y demandes */
eda_global wxPoint g_PlotOffset; /* Offset de trace modifies par l'echelle */
eda_global int nb_plot_erreur ;
eda_global int nb_items; /* utilise pour decompter les objets traces */
eda_global int g_PlotLine_Width; /* Largeur du trait en mode filaire (utilise en serigraphie,
pour traces en mode sketch et filaire) */
......
......@@ -70,9 +70,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
/* Trace des MODULES : PADS */
if( PlotPadsOnSilkLayer || Plot_Pads_All_Layers )
{
nb_items = 0;
Affiche_1_Parametre( this, 56, wxT( "Pads" ), wxEmptyString, GREEN );
for( MODULE* Module = m_Pcb->m_Modules; Module; Module = Module->Next() )
{
pt_pad = (D_PAD*) Module->m_Pads;
......@@ -182,17 +179,11 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
}
break;
}
nb_items++; msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 56, wxEmptyString, msg, GREEN );
}
}
} /* Fin Sequence de trace des Pads */
/* Trace Textes MODULES */
nb_items = 0;
Affiche_1_Parametre( this, 64, wxT( "TxtMod" ), wxEmptyString, LIGHTBLUE );
for( MODULE* Module = m_Pcb->m_Modules; Module; Module = Module->Next() )
{
/* Analyse des autorisations de trace pour les textes VALEUR et REF */
......@@ -243,17 +234,11 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
if( trace_ref )
{
PlotTextModule( Module->m_Reference, format_plot );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, LIGHTBLUE );
}
if( trace_val )
{
PlotTextModule( Module->m_Value, format_plot );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, LIGHTBLUE );
}
pt_texte = (TEXTE_MODULE*) Module->m_Drawings.GetFirst();
......@@ -283,9 +268,6 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
continue;
PlotTextModule( pt_texte, format_plot );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, LIGHTBLUE );
}
}
......@@ -318,7 +300,7 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte, int format_plot )
orient = pt_texte->GetDrawRotation();
thickness = pt_texte->m_Width;
if( Plot_Mode == FILAIRE )
if( g_Plot_Mode == FILAIRE )
thickness = g_PlotLine_Width;
if( pt_texte->m_Mirror )
......@@ -475,7 +457,7 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
type_trace = PtEdge->m_Shape;
thickness = PtEdge->m_Width;
if( Plot_Mode == FILAIRE )
if( g_Plot_Mode == FILAIRE )
thickness = g_PlotLine_Width;
pos = PtEdge->m_Start;
......@@ -653,7 +635,7 @@ void PlotDrawSegment( DRAWSEGMENT* pt_segm, int Format, int masque_layer )
return;
thickness = pt_segm->m_Width;
if( Plot_Mode == FILAIRE )
if( g_Plot_Mode == FILAIRE )
thickness = g_PlotLine_Width;
start = pt_segm->m_Start;
......@@ -788,7 +770,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
int ox, oy, fx, fy;
int delta; /* increment (en 0.1 degres) angulaire pour trace de cercles */
if( Plot_Mode == FILAIRE )
if( g_Plot_Mode == FILAIRE )
thickness = g_PlotLine_Width;
if( IsPostScript( format_plot ) )
......
......@@ -112,8 +112,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
Write_Header_GERBER( g_Main_Title, g_Plot_PlotOutputFile );
nb_plot_erreur = 0;
int layer_mask = g_TabOneLayerMask[Layer];
// Specify that the contents of the "Edges Pcb" layer are also to be
......@@ -219,8 +217,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
}
/* Draw footprints shapes without pads (pads will plotted later) */
nb_items = 0;
Affiche_1_Parametre( this, 38, wxT( "DrawMod" ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
{
......@@ -241,8 +237,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
}
/* Plot footprint pads */
nb_items = 0;
Affiche_1_Parametre( this, 48, wxT( "Pads" ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
{
......@@ -262,8 +256,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
if( size.x <= 0 || size.y <= 0 )
continue;
nb_items++;
switch( PtPad->m_PadShape )
{
case PAD_CIRCLE:
......@@ -292,17 +284,12 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
PlotRectangularPad_GERBER( pos, size, PtPad->m_Orient );
break;
}
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 48, wxEmptyString, msg, GREEN );
}
}
/* Plot vias : */
if( tracevia )
{
nb_items = 0;
Affiche_1_Parametre( this, 56, wxT( "Vias" ), wxEmptyString, RED );
for( track = m_Pcb->m_Track; track != NULL; track = (TRACK*) track->Next() )
{
if( track->Type() != TYPE_VIA )
......@@ -326,15 +313,10 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
if( size.x <= 0 )
continue;
Plot_1_CIRCLE_pad_GERBER( pos, size.x );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 56, wxEmptyString, msg, RED );
}
}
/* Plot tracks (not vias) : */
nb_items = 0;
Affiche_1_Parametre( this, 64, wxT( "Tracks" ), wxEmptyString, YELLOW );
/* Plot tracks (not vias) : */
for( track = m_Pcb->m_Track; track != NULL; track = (TRACK*) track->Next() )
{
wxPoint end;
......@@ -350,17 +332,9 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
SelectD_CODE_For_LineDraw( size.x );
PlotGERBERLine( pos, end, size.x );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
/* Plot zones: */
nb_items = 0;
if( m_Pcb->m_Zone )
Affiche_1_Parametre( this, 72, wxT( "Zones " ), wxEmptyString, YELLOW );
for( track = m_Pcb->m_Zone; track != NULL; track = (TRACK*) track->Next() )
{
wxPoint end;
......@@ -374,10 +348,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_GERBER( FILE* File, int masque_layer,
SelectD_CODE_For_LineDraw( size.x );
PlotGERBERLine( pos, end, size.x );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 72, wxEmptyString, msg, YELLOW );
}
/* Plot filled ares */
......
......@@ -17,6 +17,7 @@
static int pen_rayon; /* Rayon de la plume en unites pcb */
static int pen_diam; /* Diametre de la plume en unites pcb */
static int pen_recouvrement; /* recouvrement en remplissage en unites pcb */
static int s_Nb_Plot_Errors; // Error count (errors when a line thichness is less than pen width
/* Routines Locales */
......@@ -32,7 +33,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
int marge = 0 * U_PCB; // Extra margin (set to 0)
bool Center = FALSE;
modetrace = Plot_Mode;
modetrace = g_Plot_Mode;
/* Calcul des echelles de conversion */
scale_x = Scale_X * SCALE_HPGL;
......@@ -51,7 +52,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
pen_diam = (int) round( (g_HPGL_Pen_Diam * U_PCB) / Scale_X ); // Assume Scale_X # Scale_Y
pen_rayon = pen_diam / 2;
nb_plot_erreur = 0;
s_Nb_Plot_Errors = 0;
// compute pen_recouvrement (from g_HPGL_Pen_Recouvrement in mils)
// with plot scale
......@@ -75,7 +76,7 @@ void WinEDA_BasePcbFrame::Genere_HPGL( const wxString& FullFileName, int Layer )
PrintHeaderHPGL( dest, g_HPGL_Pen_Speed, g_HPGL_Pen_Num );
if( Plot_Sheet_Ref && (g_PlotScaleOpt == 1) )
if( g_Plot_Frame_Ref && (g_PlotScaleOpt == 1) )
{
int tmp = g_PlotOrient; g_PlotOrient = 0;
InitPlotParametresHPGL( g_PlotOffset, scale_x, scale_y, g_PlotOrient );
......@@ -206,9 +207,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
BOARD_ITEM* PtStruct;
wxString msg;
// (Following command has been superceded by new command on line 135.)
// masque_layer |= EDGE_LAYER; /* Les elements de la couche EDGE sont tj traces */
/* trace des elements type Drawings Pcb : */
PtStruct = m_Pcb->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
......@@ -245,8 +243,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
}
/* Trace des Elements des modules autres que pads */
nb_items = 0;
Affiche_1_Parametre( this, 48, wxT( "DrawMod" ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
......@@ -268,8 +264,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
}
/* Trace des Elements des modules : Pastilles */
nb_items = 0;
Affiche_1_Parametre( this, 48, wxT( "Pads " ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
......@@ -285,8 +279,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
size = PtPad->m_Size;
size.x += garde * 2; size.y += garde * 2;
nb_items++;
switch( PtPad->m_PadShape & 0x7F )
{
case PAD_CIRCLE:
......@@ -314,9 +306,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
PtPad->m_Orient, modetrace );
break;
}
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 48, wxT( "Pads" ), msg, GREEN );
}
}
......@@ -324,10 +313,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
if( tracevia )
{
TRACK* pts;
nb_items = 0;
Affiche_1_Parametre( this, 56, wxT( "Vias" ), wxEmptyString, RED );
for( pts = m_Pcb->m_Track; pts != NULL; pts = pts->Next() )
{
if( pts->Type() != TYPE_VIA )
......@@ -350,16 +335,12 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
size.x = Via->m_Width + (garde * 2);
trace_1_pastille_RONDE_HPGL( start, size.x, modetrace );
nb_items++; msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 56, wxT( "Vias" ), msg, RED );
}
fputs( "PU;\n", dest );
}
/* trace des segments pistes */
nb_items = 0;
Affiche_1_Parametre( this, 64, wxT( "Tracks " ), wxEmptyString, YELLOW );
for( pts = m_Pcb->m_Track; pts != NULL; pts = pts->Next() )
{
if( pts->Type() == TYPE_VIA )
......@@ -378,7 +359,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
/* Trace d'un segment de piste */
trace_1_segment_HPGL( start.x, start.y, end.x, end.y, size.x );
/* Complement de Trace en mode Remplissage */
if( (Plot_Mode == FILLED) && (pen_diam <= size.x ) )
if( (g_Plot_Mode == FILLED) && (pen_diam <= size.x ) )
{
while( ( size.x -= (int) ( (pen_rayon - pen_recouvrement) * 2 ) ) > 0 )
{
......@@ -389,14 +370,9 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
if( size.x > pen_diam )
trace_1_pastille_RONDE_HPGL( end, size.x, modetrace );
nb_items++; msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
/* trace des segments pistes et zones */
nb_items = 0;
Affiche_1_Parametre( this, 64, wxT( "Zones " ), wxEmptyString, YELLOW );
for( pts = m_Pcb->m_Zone; pts != NULL; pts = pts->Next() )
{
if( g_TabOneLayerMask[pts->GetLayer()] & masque_layer )
......@@ -411,7 +387,7 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
/* Trace d'un segment de piste */
trace_1_segment_HPGL( start.x, start.y, end.x, end.y, size.x );
/* Complement de Trace en mode Remplissage */
if( (Plot_Mode == FILLED) && (pen_diam <= size.x ) )
if( (g_Plot_Mode == FILLED) && (pen_diam <= size.x ) )
{
while( ( size.x -= (int) ( (pen_rayon - pen_recouvrement) * 2 ) ) > 0 )
{
......@@ -422,9 +398,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_HPGL( FILE* File, int masque_layer,
if( size.x > pen_diam )
trace_1_pastille_RONDE_HPGL( end, size.x, modetrace );
nb_items++; msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
}
}
......@@ -513,7 +486,7 @@ void trace_1_pastille_RONDE_HPGL( wxPoint pos, int diametre, int modetrace )
if( rayon < 0 )
{
rayon = 0; nb_plot_erreur++;
rayon = 0; s_Nb_Plot_Errors++;
}
wxSize rsize( rayon, rayon );
......@@ -563,7 +536,7 @@ void PlotRectangularPad_HPGL( wxPoint padpos, wxSize padsize,
if( (size.x < 0 ) || (size.y < 0) )
{
nb_plot_erreur++;
s_Nb_Plot_Errors++;
}
if( size.x < 0 )
size.x = 0;if( size.y < 0 )
......@@ -810,10 +783,10 @@ void trace_1_segment_HPGL( int pos_X0, int pos_Y0, int pos_X1, int pos_Y1,
dh = (epaisseur - (int) pen_diam ) / 2;
if( dh < 0 )
{
dh = 0; nb_plot_erreur++;
dh = 0; s_Nb_Plot_Errors++;
}
if( (dh == 0) || (Plot_Mode == FILAIRE) ) /* Le trace se reduit a 1 trait */
if( (dh == 0) || (g_Plot_Mode == FILAIRE) ) /* Le trace se reduit a 1 trait */
{
Move_Plume_HPGL( wxPoint( pos_X0, pos_Y0 ), 'U' );
Move_Plume_HPGL( wxPoint( pos_X1, pos_Y1 ), 'D' );
......
......@@ -3,7 +3,6 @@
/*************************************/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "plot_common.h"
......@@ -11,10 +10,6 @@
#include "pcbplot.h"
#include "trigo.h"
#include "protos.h"
#include "wx/defs.h"
// Routines Locales
static void PrintDrillMark( BOARD* Pcb );
......@@ -60,7 +55,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
if( g_PlotScaleOpt != 1 )
Center = TRUE; // Echelle != 1 donc trace centree du PCB
modetrace = Plot_Mode;
modetrace = g_Plot_Mode;
scale_format = 1.0;
// Set default line width
......@@ -100,7 +95,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
SetDefaultLineWidthPS( g_PlotLine_Width );
PrintHeaderPS( dest, wxT( "PCBNEW-PS" ), FullFileName, 1, BBox, wxLANDSCAPE );
if( Plot_Sheet_Ref )
if( g_Plot_Frame_Ref )
{
int tmp = g_PlotOrient;
g_PlotOrient = 0;
......@@ -120,7 +115,7 @@ void WinEDA_BasePcbFrame::Genere_PS( const wxString& FullFileName, int Layer, bo
{
float Xscale, Yscale;
int noprint_size = 2 * PlotMarge_in_mils * U_PCB;
if( Plot_Sheet_Ref )
if( g_Plot_Frame_Ref )
noprint_size += 500 * U_PCB;
Xscale = (float) ( PaperSize.x - noprint_size ) / BoardSize.x;
Yscale = (float) ( PaperSize.y - noprint_size ) / BoardSize.y;
......@@ -286,8 +281,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
}
// Trace des Elements des modules autres que pads
nb_items = 0;
Affiche_1_Parametre( this, 48, wxT( "DrawMod" ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
......@@ -308,8 +301,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
}
// Trace des Elements des modules : Pastilles
nb_items = 0;
Affiche_1_Parametre( this, 48, wxT( "Pads " ), wxEmptyString, GREEN );
Module = m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
......@@ -324,8 +315,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
size.x = PtPad->m_Size.x + garde * 2;
size.y = PtPad->m_Size.y + garde * 2;
nb_items++;
switch( PtPad->m_PadShape )
{
case PAD_CIRCLE:
......@@ -350,17 +339,12 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
trace_1_pad_rectangulaire_POST( pos, size, PtPad->m_Orient, modetrace );
break;
}
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 48, wxT( "Pads" ), msg, GREEN );
}
}
// trace des VIAS :
if( tracevia )
{
nb_items = 0;
Affiche_1_Parametre( this, 56, _( "Vias" ), wxEmptyString, RED );
for( pts = m_Pcb->m_Track; pts != NULL; pts = pts->Next() )
{
if( pts->Type() != TYPE_VIA )
......@@ -381,16 +365,10 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
pos = Via->m_Start;
size.x = size.y = Via->m_Width + garde * 2;
trace_1_pastille_RONDE_POST( pos, size.x, modetrace );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 56, wxEmptyString, msg, RED );
}
}
// trace des pistes et zones:
nb_items = 0;
Affiche_1_Parametre( this, 64, _( "Tracks" ), wxEmptyString, YELLOW );
for( pts = m_Pcb->m_Track; pts != NULL; pts = pts->Next() )
{
if( pts->Type() == TYPE_VIA )
......@@ -403,15 +381,8 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
end = pts->m_End;
PlotFilledSegmentPS( pos, end, size.x );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
nb_items = 0;
Affiche_1_Parametre( this, 64, wxT( "Zones " ), wxEmptyString, YELLOW );
for( pts = m_Pcb->m_Zone; pts != NULL; pts = pts->Next() )
{
if( (g_TabOneLayerMask[pts->GetLayer()] & masque_layer) == 0 )
......@@ -420,9 +391,6 @@ void WinEDA_BasePcbFrame::Plot_Layer_PS( FILE* File, int masque_layer,
pos = pts->m_Start;
end = pts->m_End;
PlotFilledSegmentPS( pos, end, size.x );
nb_items++;
msg.Printf( wxT( "%d" ), nb_items );
Affiche_1_Parametre( this, 64, wxEmptyString, msg, YELLOW );
}
/* Plot filled ares */
......@@ -762,7 +730,7 @@ void trace_1_pad_TRAPEZE_POST( wxPoint centre, wxSize size, wxSize delta,
int l_pen; // diam spot (plume)
l_pen = 1;
if( modetrace == FILAIRE || Plot_Mode == FILAIRE )
if( modetrace == FILAIRE || g_Plot_Mode == FILAIRE )
{
wxSize lsize( g_PlotLine_Width, g_PlotLine_Width );
......
......@@ -17,11 +17,12 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module,
/************************************************************************************************************/
void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmasklayer, bool aPrintMirrorMode )
void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMaskLayer, bool aPrintMirrorMode )
/************************************************************************************************************/
/* Used to print the board.
* Print the board, but only layers allowed by printmasklayer
/** 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)
*/
{
......@@ -33,7 +34,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
BOARD* Pcb = frame->GetBoard();
save_opt = DisplayOpt;
if( printmasklayer & ALL_CU_LAYERS )
if( aPrintMaskLayer & ALL_CU_LAYERS )
DisplayOpt.DisplayPadFill = FILLED;
else
DisplayOpt.DisplayPadFill = SKETCH;
......@@ -59,10 +60,10 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
case TYPE_COTATION:
case TYPE_TEXTE:
case TYPE_MIRE:
if( ((1<<item->GetLayer()) & printmasklayer) == 0 )
if( ((1<<item->GetLayer()) & aPrintMaskLayer) == 0 )
break;
item->Draw( this, DC, drawmode );
item->Draw( this, aDC, drawmode );
break;
case TYPE_MARKER: /* Trace des marqueurs */
......@@ -75,26 +76,26 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
pt_piste = Pcb->m_Track;
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{
if( ( printmasklayer & pt_piste->ReturnMaskLayer() ) == 0 )
if( ( aPrintMaskLayer & pt_piste->ReturnMaskLayer() ) == 0 )
continue;
if( pt_piste->Type() == TYPE_VIA ) /* VIA rencontree */
{
int rayon = pt_piste->m_Width >> 1;
int color = g_DesignSettings.m_ViaColor[pt_piste->m_Shape];
GRSetDrawMode( DC, drawmode );
GRFilledCircle( &m_ClipBox, DC, pt_piste->m_Start.x, pt_piste->m_Start.y,
GRSetDrawMode( aDC, drawmode );
GRFilledCircle( &m_ClipBox, aDC, pt_piste->m_Start.x, pt_piste->m_Start.y,
rayon, 0, color, color );
}
else
pt_piste->Draw( this, DC, drawmode );
pt_piste->Draw( this, aDC, drawmode );
}
pt_piste = Pcb->m_Zone;
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{
if( ( printmasklayer & pt_piste->ReturnMaskLayer() ) == 0 )
if( ( aPrintMaskLayer & pt_piste->ReturnMaskLayer() ) == 0 )
continue;
pt_piste->Draw( this, DC, drawmode );
pt_piste->Draw( this, aDC, drawmode );
}
// Draw footprints, this is done at last in order to print the pad holes in while
......@@ -102,7 +103,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
Module = (MODULE*) Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
Print_Module( this, DC, Module, drawmode, printmasklayer );
Print_Module( this, aDC, Module, drawmode, aPrintMaskLayer );
}
/* Print via holes in white color*/
......@@ -113,12 +114,12 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
GRForceBlackPen( false );
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
{
if( ( printmasklayer & pt_piste->ReturnMaskLayer() ) == 0 )
if( ( aPrintMaskLayer & pt_piste->ReturnMaskLayer() ) == 0 )
continue;
if( pt_piste->Type() == TYPE_VIA ) /* VIA rencontree */
{
GRSetDrawMode( DC, drawmode );
GRFilledCircle( &m_ClipBox, DC, pt_piste->m_Start.x, pt_piste->m_Start.y,
GRSetDrawMode( aDC, drawmode );
GRFilledCircle( &m_ClipBox, aDC, pt_piste->m_Start.x, pt_piste->m_Start.y,
rayon, 0, color, color );
}
}
......@@ -128,14 +129,14 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
for( int ii = 0; ii < Pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = Pcb->GetArea(ii);
if( ( printmasklayer & (1 << zone->GetLayer()) ) == 0 )
if( ( aPrintMaskLayer & (1 << zone->GetLayer()) ) == 0 )
continue;
zone->DrawFilledArea( this, DC, drawmode );
zone->DrawFilledArea( this, aDC, drawmode );
}
if( Print_Sheet_Ref )
m_Parent->TraceWorkSheet( DC, ActiveScreen, 0 );
if( aPrint_Sheet_Ref )
m_Parent->TraceWorkSheet( aDC, GetScreen(), g_PlotLine_Width );
m_PrintIsMirrored = false;
......
......@@ -61,10 +61,10 @@ WinEDA_PrintFrame::WinEDA_PrintFrame( WinEDA_DrawFrame* parent, wxWindowID id, c
m_Parent = parent;
m_XScaleAdjust = m_YScaleAdjust = 1.0;
m_PagesOption = NULL;
wxConfig * Config = wxGetApp().m_EDA_Config;
if ( Config )
m_Config = wxGetApp().m_EDA_Config;
if ( m_Config )
{
Config->Read(wxT("PrintPenWidth"), &s_PrintPenMinWidth);
m_Config->Read(wxT("PrintPenWidth"), &g_PlotLine_Width);
}
......@@ -253,7 +253,7 @@ void WinEDA_PrintFrame::CreateControls()
SetFocus( ); // add this line to close dialog by the escape key
m_DialogPenWidth = new WinEDA_ValueCtrl(this, _("Pen width mini"), s_PrintPenMinWidth,
m_DialogPenWidth = new WinEDA_ValueCtrl(this, _("Pen width mini"), g_PlotLine_Width,
g_UnitMetric, m_DialogPenWidthSizer, m_Parent->m_InternalUnits);
SetOthersDatas();
......
......@@ -158,6 +158,7 @@ public:
WinEDA_ValueCtrl * m_DialogPenWidth;
wxCheckBox * m_BoxSelecLayer[32];
double m_XScaleAdjust, m_YScaleAdjust;
wxConfig * m_Config;
};
#endif
......
......@@ -2,28 +2,6 @@
/* File: wxprint.cpp */
/*********************/
#ifdef __GNUG__
#pragma implementation
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/spinctrl.h"
#if !wxUSE_PRINTING_ARCHITECTURE
#error You must set wxUSE_PRINTING_ARCHITECTURE to 1 in setup.h to compile this
#endif
// Set this to 1 if you want to test PostScript printing under MSW.
#define wxTEST_POSTSCRIPT_IN_MSW 1
......@@ -44,7 +22,6 @@
#ifdef EESCHEMA
#include "program.h"
#include "libcmp.h"
#include "general.h"
#endif
......@@ -54,10 +31,7 @@
#include "protos.h"
// For pcbnew:
#define OPTKEY_LAYERBASE wxT( "PrintLayer_%d" )
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
#include "pcbplot.h"
#endif
#define DEFAULT_ORIENTATION_PAPER wxLANDSCAPE // other option is wxPORTRAIT
......@@ -69,7 +43,6 @@
#define WIDTH_MIN_VALUE 1
#ifdef PCBNEW
extern float Scale_X, Scale_Y;
static long s_SelectedLayers;
static double s_ScaleList[] =
{ 0, 0.5, 0.7, 0.999, 1.0, 1.4, 2.0, 3.0, 4.0 };
......@@ -80,8 +53,6 @@ static double s_ScaleList[] =
static wxPrintData* g_PrintData;
// Variables locales
static int s_PrintPenMinWidth = 6; /* Minimum pen width (in internal units) for printing */
static int s_PrintMaskLayer;
static int s_OptionPrintPage = 0;
static int s_Print_Black_and_White = TRUE;
......@@ -89,11 +60,6 @@ static int s_Scale_Select = 3; // default selected scale = ScaleList[3]
static bool s_PrintMirror;
static bool s_Print_Sheet_Ref = TRUE;
/****************************************************************/
/* frame de Preparation de l'impression (options, selections... */
/****************************************************************/
#include "dialog_print.cpp"
/***************************/
......@@ -180,10 +146,6 @@ void WinEDA_PrintFrame::SetOthersDatas()
m_Print_Mirror->Enable( false );
#endif
#if defined (PCBNEW)
wxConfig* config = wxGetApp().m_EDA_Config; // Current config used by application
#endif
m_FineAdjustXscaleOpt->SetToolTip( _( "Set X scale adjust for exact scale plotting" ) );
m_FineAdjustYscaleOpt->SetToolTip( _( "Set Y scale adjust for exact scale plotting" ) );
if( s_Print_Black_and_White )
......@@ -221,11 +183,11 @@ void WinEDA_PrintFrame::SetOthersDatas()
#endif
// Read the scale adjust option
if( config )
if( m_Config )
{
config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &m_XScaleAdjust );
config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &m_YScaleAdjust );
config->Read( OPTKEY_PRINT_SCALE, &s_Scale_Select );
m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &m_XScaleAdjust );
m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &m_YScaleAdjust );
m_Config->Read( OPTKEY_PRINT_SCALE, &s_Scale_Select );
s_SelectedLayers = 0;
for( int layer = 0; layer<NB_LAYERS; ++layer )
......@@ -236,7 +198,7 @@ void WinEDA_PrintFrame::SetOthersDatas()
layerKey.Printf( OPTKEY_LAYERBASE, layer );
option = false;
if( config->Read( layerKey, &option ) )
if( m_Config->Read( layerKey, &option ) )
{
m_BoxSelecLayer[layer]->SetValue( option );
if( option )
......@@ -310,7 +272,7 @@ void WinEDA_PrintFrame::OnClosePrintDialog()
if( Config )
{
Config->Write( wxT( "PrintPenWidth" ), s_PrintPenMinWidth );
Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width );
}
if( m_FineAdjustXscaleOpt )
......@@ -375,19 +337,19 @@ void WinEDA_PrintFrame::SetPenWidth()
/****************************************/
/* Get the new pen width value, and verify min et max value
* NOTE: s_PrintPenMinWidth is in internal units
* NOTE: g_PlotLine_Width is in internal units
*/
{
s_PrintPenMinWidth = m_DialogPenWidth->GetValue();
if( s_PrintPenMinWidth > WIDTH_MAX_VALUE )
g_PlotLine_Width = m_DialogPenWidth->GetValue();
if( g_PlotLine_Width > WIDTH_MAX_VALUE )
{
s_PrintPenMinWidth = WIDTH_MAX_VALUE;
g_PlotLine_Width = WIDTH_MAX_VALUE;
}
if( s_PrintPenMinWidth < WIDTH_MIN_VALUE )
if( g_PlotLine_Width < WIDTH_MIN_VALUE )
{
s_PrintPenMinWidth = WIDTH_MIN_VALUE;
g_PlotLine_Width = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue( s_PrintPenMinWidth );
m_DialogPenWidth->SetValue( g_PlotLine_Width );
}
......@@ -783,8 +745,8 @@ void EDA_Printout::DrawPage()
/* set Pen min width */
double ftmp, xdcscale, ydcscale;
// s_PrintPenMinWidth is in internal units ( 1/1000 inch), and must be converted in pixels
ftmp = (float) s_PrintPenMinWidth * 25.4 / EESCHEMA_INTERNAL_UNIT; // ftmp est en mm
// g_PlotLine_Width is in internal units ( 1/1000 inch), and must be converted in pixels
ftmp = (float) g_PlotLine_Width * 25.4 / EESCHEMA_INTERNAL_UNIT; // ftmp est en mm
ftmp *= (float) PlotAreaSize.x / PageSize_in_mm.x; /* ftmp is in pixels */
/* because the pen size will be scaled by the dc scale, we modify the size
......
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