Pcbnew: fix a few plot issues (from master branch)

This commit is contained in:
jean-pierre charras 2017-08-01 12:39:06 +02:00
parent 6b1b6d4ff7
commit 9f35e384c1
13 changed files with 331 additions and 305 deletions

View File

@ -7,7 +7,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 Lorenzo Marcantonio, l.marcantonio@logossrl.com
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -766,7 +766,10 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
aMultilineAllowed = false; // the text has only one line.
// Emit native PDF text (if requested)
if( m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed )
// Currently: does not work: disable it
bool use_native = false; // = m_textMode != PLOTTEXTMODE_STROKE && !aMultilineAllowed;
if( use_native )
{
const char *fontname = aItalic ? (aBold ? "/KicadFontBI" : "/KicadFontI")
: (aBold ? "/KicadFontB" : "/KicadFont");
@ -822,7 +825,7 @@ void PDF_PLOTTER::Text( const wxPoint& aPos,
}
// Plot the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( !use_native )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );

View File

@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2017 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -873,7 +873,10 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
aMultilineAllowed = false; // the text has only one line.
// Draw the native postscript text (if requested)
if( m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed )
// Currently: does not work: disable it
bool use_native = false; // = m_textMode == PLOTTEXTMODE_NATIVE && !aMultilineAllowed;
if( use_native )
{
const char *fontname = aItalic ? (aBold ? "/KicadFont-BoldOblique"
: "/KicadFont-Oblique")
@ -926,7 +929,7 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
}
// Draw the stroked text (if requested)
if( m_textMode != PLOTTEXTMODE_NATIVE || aMultilineAllowed )
if( !use_native )
{
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aMultilineAllowed );

View File

@ -337,11 +337,6 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName, bool aOnlyO
plot_opts.SetMirror( m_printMirror );
plot_opts.SetFormat( PLOT_FORMAT_SVG );
EDA_COLOR_T color = UNSPECIFIED_COLOR; // Used layer color to plot ref and value
plot_opts.SetReferenceColor( color );
plot_opts.SetValueColor( color );
PAGE_INFO pageInfo = m_board->GetPageSettings();
wxPoint axisorigin = m_board->GetAuxOrigin();

View File

@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -46,14 +46,14 @@ DIALOG_PLOT::DIALOG_PLOT( PCB_EDIT_FRAME* aParent ) :
m_plotOpts( aParent->GetPlotSettings() )
{
m_config = Kiface().KifaceSettings();
Init_Dialog();
init_Dialog();
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
void DIALOG_PLOT::Init_Dialog()
void DIALOG_PLOT::init_Dialog()
{
wxString msg;
wxFileName fileName;
@ -195,10 +195,10 @@ void DIALOG_PLOT::Init_Dialog()
setPlotModeChoiceSelection( m_plotOpts.GetPlotMode() );
// Plot outline mode
m_plotOutlineModeOpt->SetValue( m_plotOpts.GetPlotOutlineMode() );
m_DXF_plotModeOpt->SetValue( m_plotOpts.GetDXFPlotPolygonMode() );
// Plot text mode
m_plotTextAsLineOpt->SetValue( m_plotOpts.GetTextMode() == PLOTTEXTMODE_DEFAULT );
m_DXF_plotTextStrokeFontOpt->SetValue( m_plotOpts.GetTextMode() == PLOTTEXTMODE_DEFAULT );
// Plot mirror option
m_plotMirrorOpt->SetValue( m_plotOpts.GetMirror() );
@ -294,11 +294,16 @@ void DIALOG_PLOT::CreateDrillFile( wxCommandEvent& event )
}
void DIALOG_PLOT::OnChangeOutlineMode( wxCommandEvent& event )
void DIALOG_PLOT::OnChangeDXFPlotMode( wxCommandEvent& event )
{
m_plotTextAsLineOpt->Enable( !m_plotOutlineModeOpt->GetValue() );
if( !m_plotTextAsLineOpt->IsEnabled() )
m_plotTextAsLineOpt->SetValue( true );
// m_DXF_plotTextStrokeFontOpt is disabled if m_DXF_plotModeOpt
// is checked (plot in DXF polygon mode)
m_DXF_plotTextStrokeFontOpt->Enable( !m_DXF_plotModeOpt->GetValue() );
// if m_DXF_plotTextStrokeFontOpt option is disabled (plot DXF in polygon mode),
// force m_DXF_plotTextStrokeFontOpt to true to use Pcbnew stroke font
if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() )
m_DXF_plotTextStrokeFontOpt->SetValue( true );
}
@ -369,6 +374,9 @@ PlotFormat DIALOG_PLOT::getPlotFormat()
// and clear also some optional values
void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
{
// this option exist only in DXF format:
m_DXF_plotModeOpt->Enable( getPlotFormat() == PLOT_FORMAT_DXF );
switch( getPlotFormat() )
{
case PLOT_FORMAT_PDF:
@ -376,8 +384,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_drillShapeOpt->Enable( true );
m_plotModeOpt->Enable( false );
setPlotModeChoiceSelection( FILLED );
m_plotOutlineModeOpt->Enable( false );
m_plotOutlineModeOpt->SetValue( false );
m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false );
@ -399,19 +405,16 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotPSNegativeOpt->Enable( true );
m_forcePSA4OutputOpt->Enable( false );
m_forcePSA4OutputOpt->SetValue( false );
m_plotTextAsLineOpt->Enable( false );
m_plotTextAsLineOpt->SetValue( false );
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_POST:
m_drillShapeOpt->Enable( true );
m_plotModeOpt->Enable( true );
m_plotOutlineModeOpt->Enable( false );
m_plotOutlineModeOpt->SetValue( false );
m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false );
@ -431,12 +434,11 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PSFineAdjustWidthOpt->Enable( true );
m_plotPSNegativeOpt->Enable( true );
m_forcePSA4OutputOpt->Enable( true );
m_plotTextAsLineOpt->Enable( false );
m_plotTextAsLineOpt->SetValue( true );
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Show( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_GERBER:
@ -444,8 +446,6 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_drillShapeOpt->SetSelection( 0 );
m_plotModeOpt->Enable( false );
setPlotModeChoiceSelection( FILLED );
m_plotOutlineModeOpt->Enable( false );
m_plotOutlineModeOpt->SetValue( false );
m_plotMirrorOpt->Enable( false );
m_plotMirrorOpt->SetValue( false );
m_useAuxOriginCheckBox->Enable( true );
@ -465,19 +465,16 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotPSNegativeOpt->SetValue( false );
m_forcePSA4OutputOpt->Enable( false );
m_forcePSA4OutputOpt->SetValue( false );
m_plotTextAsLineOpt->Enable( false );
m_plotTextAsLineOpt->SetValue( true );
m_PlotOptionsSizer->Show( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_HPGL:
m_drillShapeOpt->Enable( true );
m_plotModeOpt->Enable( true );
m_plotOutlineModeOpt->Enable( false );
m_plotOutlineModeOpt->SetValue( false );
m_plotMirrorOpt->Enable( true );
m_useAuxOriginCheckBox->Enable( false );
m_useAuxOriginCheckBox->SetValue( false );
@ -498,19 +495,17 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_plotPSNegativeOpt->SetValue( false );
m_plotPSNegativeOpt->Enable( false );
m_forcePSA4OutputOpt->Enable( true );
m_plotTextAsLineOpt->Enable( false );
m_plotTextAsLineOpt->SetValue( true );
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Show( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Hide( m_SizerDXF_options );
break;
case PLOT_FORMAT_DXF:
m_drillShapeOpt->Enable( true );
m_plotModeOpt->Enable( false );
setPlotModeChoiceSelection( FILLED );
m_plotOutlineModeOpt->Enable( true );
m_plotMirrorOpt->Enable( false );
m_plotMirrorOpt->SetValue( false );
m_useAuxOriginCheckBox->Enable( true );
@ -537,8 +532,9 @@ void DIALOG_PLOT::SetPlotFormat( wxCommandEvent& event )
m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
m_PlotOptionsSizer->Hide( m_PSOptionsSizer );
m_PlotOptionsSizer->Show( m_SizerDXF_options );
OnChangeOutlineMode( event );
OnChangeDXFPlotMode( event );
break;
default:
@ -612,10 +608,14 @@ void DIALOG_PLOT::applyPlotSettings()
( m_drillShapeOpt->GetSelection() ) );
tempOptions.SetMirror( m_plotMirrorOpt->GetValue() );
tempOptions.SetPlotMode( m_plotModeOpt->GetSelection() == 1 ? SKETCH : FILLED );
tempOptions.SetPlotOutlineMode( m_plotOutlineModeOpt->GetValue() );
tempOptions.SetDXFPlotPolygonMode( m_DXF_plotModeOpt->GetValue() );
tempOptions.SetPlotViaOnMaskLayer( m_plotNoViaOnMaskOpt->GetValue() );
tempOptions.SetTextMode( m_plotTextAsLineOpt->GetValue() ?
PLOTTEXTMODE_DEFAULT : PLOTTEXTMODE_NATIVE );
if( !m_DXF_plotTextStrokeFontOpt->IsEnabled() ) // Currently, only DXF supports this option
tempOptions.SetTextMode( PLOTTEXTMODE_DEFAULT );
else
tempOptions.SetTextMode( m_DXF_plotTextStrokeFontOpt->GetValue() ?
PLOTTEXTMODE_DEFAULT : PLOTTEXTMODE_NATIVE );
// Update settings from text fields. Rewrite values back to the fields,
// since the values may have been constrained by the setters.
@ -731,11 +731,15 @@ void DIALOG_PLOT::applyPlotSettings()
dirStr.Replace( wxT( "\\" ), wxT( "/" ) );
tempOptions.SetOutputDirectory( dirStr );
if( m_plotOpts != tempOptions )
if( !m_plotOpts.IsSameAs( tempOptions, false ) )
{
// First, mark board as modified only for parameters saved in file
if( !m_plotOpts.IsSameAs( tempOptions, true ) )
m_parent->OnModify();
// Now, save any change, for the session
m_parent->SetPlotSettings( tempOptions );
m_plotOpts = tempOptions;
m_parent->OnModify();
}
}

View File

@ -5,7 +5,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -31,8 +31,8 @@
#include <pcb_plot_params.h>
/**
* Class DIALOG_PLOT
*
* Class DIALOG_PLOT is the dialog to set the plot options, and create plot files
* in various formats.
*/
class DIALOG_PLOT : public DIALOG_PLOT_BASE
{
@ -58,7 +58,6 @@ private:
PCB_PLOT_PARAMS m_plotOpts;
// Event called functions
void Init_Dialog();
void Plot( wxCommandEvent& event ) override;
void OnQuit( wxCommandEvent& event ) override;
void OnClose( wxCloseEvent& event ) override;
@ -66,11 +65,12 @@ private:
void OnRightClick( wxMouseEvent& event ) override;
void OnPopUpLayers( wxCommandEvent& event ) override;
void SetPlotFormat( wxCommandEvent& event ) override;
void OnChangeOutlineMode( wxCommandEvent& event ) override;
void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
void OnSetScaleOpt( wxCommandEvent& event ) override;
void CreateDrillFile( wxCommandEvent& event ) override;
// orther functions
void init_Dialog(); // main initialization
void applyPlotSettings();
PlotFormat getPlotFormat();

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 21 2016)
// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -127,18 +127,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
bSizerPlotItems->Add( m_useAuxOriginCheckBox, 0, wxALL, 2 );
m_plotOutlineModeOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot lines in outline mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotOutlineModeOpt->SetValue(true);
m_plotOutlineModeOpt->SetToolTip( _("Otherwise plot with sketch lines in layers that don't support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab) and plot in outline mode in other layers (*.Cu, *.Adhes, *.Paste, *.Mask)") );
bSizerPlotItems->Add( m_plotOutlineModeOpt, 0, wxALL, 2 );
m_plotTextAsLineOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Plot all text as lines"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotTextAsLineOpt->SetValue(true);
m_plotTextAsLineOpt->SetToolTip( _("Otherwise plot oneline ASCII text as editable text") );
bSizerPlotItems->Add( m_plotTextAsLineOpt, 0, wxALL, 2 );
bSizer192->Add( bSizerPlotItems, 0, wxEXPAND, 5 );
@ -361,6 +349,23 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
m_SizerDXF_options = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF options") ), wxVERTICAL );
m_DXF_plotModeOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Plot all layers in outline (polygon) mode"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotModeOpt->SetValue(true);
m_DXF_plotModeOpt->SetToolTip( _("DXF only:\nCheck to plot all layers in polygon mode.\nUncheck to plot in sketch mode layers that don't support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)\nand plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)") );
m_SizerDXF_options->Add( m_DXF_plotModeOpt, 0, wxALL, 2 );
m_DXF_plotTextStrokeFontOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Use Pcbnew font to plot texts"), wxDefaultPosition, wxDefaultSize, 0 );
m_DXF_plotTextStrokeFontOpt->SetValue(true);
m_DXF_plotTextStrokeFontOpt->SetToolTip( _("Check to use Pcbnew stroke font\nUncheck to plot oneline ASCII texts as editable text (using DXF font)") );
m_SizerDXF_options->Add( m_DXF_plotTextStrokeFontOpt, 0, wxALL, 2 );
m_PlotOptionsSizer->Add( m_SizerDXF_options, 0, wxEXPAND, 5 );
bmiddleSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
@ -430,8 +435,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_layerCheckListBox->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
m_plotOutlineModeOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeOutlineMode ), NULL, this );
m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_DXF_plotModeOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );
@ -451,8 +456,8 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE()
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
m_layerCheckListBox->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this );
m_plotOutlineModeOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeOutlineMode ), NULL, this );
m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this );
m_DXF_plotModeOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnChangeDXFPlotMode ), NULL, this );
m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this );
m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnQuit ), NULL, this );

View File

@ -88,7 +88,7 @@
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="0">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">m_MainSizer</property>
<property name="orient">wxVERTICAL</property>
@ -106,7 +106,7 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizerPlotFmt</property>
<property name="orient">wxVERTICAL</property>
@ -1603,182 +1603,6 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot lines in outline mode</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotOutlineModeOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Otherwise plot with sketch lines in layers that don&apos;t support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab) and plot in outline mode in other layers (*.Cu, *.Adhes, *.Paste, *.Mask)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox">OnChangeOutlineMode</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot all text as lines</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotTextAsLineOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Otherwise plot oneline ASCII text as editable text</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
@ -4293,6 +4117,197 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">DXF options</property>
<property name="minimum_size"></property>
<property name="name">m_SizerDXF_options</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot all layers in outline (polygon) mode</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_DXF_plotModeOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">DXF only:&#x0A;Check to plot all layers in polygon mode.&#x0A;Uncheck to plot in sketch mode layers that don&apos;t support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)&#x0A;and plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox">OnChangeDXFPlotMode</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use Pcbnew font to plot texts</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_DXF_plotTextStrokeFontOpt</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Check to use Pcbnew stroke font&#x0A;Uncheck to plot oneline ASCII texts as editable text (using DXF font)</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 21 2016)
// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -78,8 +78,6 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxCheckBox* m_plotMirrorOpt;
wxCheckBox* m_plotPSNegativeOpt;
wxCheckBox* m_useAuxOriginCheckBox;
wxCheckBox* m_plotOutlineModeOpt;
wxCheckBox* m_plotTextAsLineOpt;
wxStaticText* m_staticText11;
wxChoice* m_drillShapeOpt;
wxStaticText* m_staticText12;
@ -110,6 +108,9 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxStaticText* m_textPSFineAdjustWidth;
wxTextCtrl* m_PSFineAdjustWidthOpt;
wxCheckBox* m_forcePSA4OutputOpt;
wxStaticBoxSizer* m_SizerDXF_options;
wxCheckBox* m_DXF_plotModeOpt;
wxCheckBox* m_DXF_plotTextStrokeFontOpt;
WX_HTML_REPORT_PANEL* m_messagesPanel;
wxButton* m_plotButton;
wxButton* m_buttonDrill;
@ -122,8 +123,8 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
virtual void OnRightClick( wxMouseEvent& event ) { event.Skip(); }
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnChangeOutlineMode( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSetScaleOpt( wxCommandEvent& event ) { event.Skip(); }
virtual void OnChangeDXFPlotMode( wxCommandEvent& event ) { event.Skip(); }
virtual void Plot( wxCommandEvent& event ) { event.Skip(); }
virtual void CreateDrillFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); }

View File

@ -2,7 +2,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -90,7 +90,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_plotFrameRef = false;
m_plotViaOnMaskLayer = false;
m_plotMode = FILLED;
m_plotOutlineMode = true;
m_DXFplotPolygonMode = true;
m_useAuxOrigin = false;
m_HPGLPenNum = 1;
m_HPGLPenSpeed = 20; // this param is always in cm/s
@ -114,8 +114,6 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_widthAdjust = 0.;
m_outputDirectory.clear();
m_color = BLACK;
m_referenceColor = BLACK;
m_valueColor = BLACK;
m_textMode = PLOTTEXTMODE_DEFAULT;
// This parameter controls if the NPTH pads will be plotted or not
@ -220,7 +218,7 @@ void PCB_PLOT_PARAMS::Parse( PCB_PLOT_PARAMS_PARSER* aParser )
}
bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms ) const
{
if( m_layerSelection != aPcbPlotParams.m_layerSelection )
return false;
@ -240,8 +238,13 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
return false;
if( m_plotMode != aPcbPlotParams.m_plotMode )
return false;
if( m_plotOutlineMode != aPcbPlotParams.m_plotOutlineMode )
if( !aCompareOnlySavedPrms )
{
if( m_DXFplotPolygonMode != aPcbPlotParams.m_DXFplotPolygonMode )
return false;
}
if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
return false;
if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
@ -284,12 +287,13 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
return false;
if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
return false;
if( m_color != aPcbPlotParams.m_color )
return false;
if( m_referenceColor != aPcbPlotParams.m_referenceColor )
return false;
if( m_valueColor != aPcbPlotParams.m_valueColor )
return false;
if( !aCompareOnlySavedPrms )
{
if( m_color != aPcbPlotParams.m_color )
return false;
}
if( m_textMode != aPcbPlotParams.m_textMode )
return false;
if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
@ -298,12 +302,6 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
}
bool PCB_PLOT_PARAMS::operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
{
return !( *this == aPcbPlotParams );
}
bool PCB_PLOT_PARAMS::SetHPGLPenDiameter( int aValue )
{
return setInt( &m_HPGLPenDiam, aValue, HPGL_PEN_DIAMETER_MIN, HPGL_PEN_DIAMETER_MAX );

View File

@ -54,8 +54,11 @@ private:
*/
EDA_DRAW_MODE_T m_plotMode;
/// Plot lines in outline mode
bool m_plotOutlineMode;
/** DXF format: Plot items in outline (polygon) mode
* In polygon mode, each item to plot is converted to a polygon, and all
* polygons are merged.
*/
bool m_DXFplotPolygonMode;
/// Plot format type (chooses the driver to be used)
PlotFormat m_format;
@ -66,7 +69,7 @@ private:
/// Choose how represent text with PS, PDF and DXF drivers
PlotTextMode m_textMode;
/// The default line width (used for the frame and in LINE mode)
/// The default line width (used to draw items having no defined width)
int m_lineWidth;
/// When true set the scale to fit the board in the page
@ -93,8 +96,10 @@ private:
/// Set of layers to plot
LSET m_layerSelection;
/** When plotting gerbers use a conventional set of Protel extensions
* instead of appending a suffix to the board name */
/** When plotting gerber files, use a conventional set of Protel extensions
* instead of .gbr, that is now the offical gerber file extension
* this is a deprecated feature
*/
bool m_useGerberProtelExtensions;
/// Include attributes from the Gerber X2 format (chapter 5 in revision J2)
@ -106,7 +111,7 @@ private:
/// 5 is the minimal value for professional boards.
int m_gerberPrecision;
/// Plot gerbers using auxiliary (drill) origin instead of page coordinates
/// Plot gerbers using auxiliary (drill) origin instead of absolute coordinates
bool m_useAuxOrigin;
/// On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
@ -139,8 +144,8 @@ private:
* near 1.0; only X and Y dimensions are adjusted: circles are plotted as
* circles, even if X and Y fine scale differ; because of this it is mostly
* useful for printers: postscript plots would be best adjusted using
* the prologue (that would change the whole output matrix */
* the prologue (that would change the whole output matrix
*/
double m_fineScaleAdjustX; ///< fine scale adjust X axis
double m_fineScaleAdjustY; ///< fine scale adjust Y axis
@ -154,8 +159,6 @@ private:
int m_HPGLPenDiam; ///< HPGL only: pen diameter in MILS, useful to fill areas
int m_HPGLPenOvr; ///< HPGL only: pen overlay in MILS, useful only to fill areas
EDA_COLOR_T m_color; ///< Color for plotting the current layer
EDA_COLOR_T m_referenceColor; ///< Color for plotting references
EDA_COLOR_T m_valueColor; ///< Color for plotting values
public:
PCB_PLOT_PARAMS();
@ -167,26 +170,26 @@ public:
const throw( IO_ERROR );
void Parse( PCB_PLOT_PARAMS_PARSER* aParser ) throw( PARSE_ERROR, IO_ERROR );
bool operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
bool operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
/**
* Compare current settings to aPcbPlotParams, including not saved parameters in brd file
* @param aPcbPlotParams = the PCB_PLOT_PARAMS to compare
* @param aCompareOnlySavedPrms = true to compare only saved in file parameters,
* and false to compare the full set of parameters.
* @return true is parameters are same, false if one (or more) parameter does not match
*/
bool IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams, bool aCompareOnlySavedPrms ) const;
void SetColor( EDA_COLOR_T aVal ) { m_color = aVal; }
EDA_COLOR_T GetColor() const { return m_color; }
void SetReferenceColor( EDA_COLOR_T aVal ) { m_referenceColor = aVal; }
EDA_COLOR_T GetReferenceColor() const { return m_referenceColor; }
void SetValueColor( EDA_COLOR_T aVal ) { m_valueColor = aVal; }
EDA_COLOR_T GetValueColor() const { return m_valueColor; }
void SetTextMode( PlotTextMode aVal ) { m_textMode = aVal; }
PlotTextMode GetTextMode() const { return m_textMode; }
void SetPlotMode( EDA_DRAW_MODE_T aPlotMode ) { m_plotMode = aPlotMode; }
EDA_DRAW_MODE_T GetPlotMode() const { return m_plotMode; }
void SetPlotOutlineMode( bool aFlag ) { m_plotOutlineMode = aFlag; }
bool GetPlotOutlineMode() const { return m_plotOutlineMode; }
void SetDXFPlotPolygonMode( bool aFlag ) { m_DXFplotPolygonMode = aFlag; }
bool GetDXFPlotPolygonMode() const { return m_DXFplotPolygonMode; }
void SetDrillMarksType( DrillMarksType aVal ) { m_drillMarks = aVal; }
DrillMarksType GetDrillMarksType() const { return m_drillMarks; }

View File

@ -962,16 +962,20 @@ void PCB_EDIT_FRAME::OnModify( )
void PCB_EDIT_FRAME::SVG_Print( wxCommandEvent& event )
{
PCB_PLOT_PARAMS tmp = GetPlotSettings();
PCB_PLOT_PARAMS plot_prms = GetPlotSettings();
// we don't want dialogs knowing about complex wxFrame functions so
// pass everything the dialog needs without reference to *this frame's class.
if( InvokeSVGPrint( this, GetBoard(), &tmp ) )
if( InvokeSVGPrint( this, GetBoard(), &plot_prms ) )
{
if( tmp != GetPlotSettings() )
if( !plot_prms.IsSameAs( GetPlotSettings(), false ) )
{
SetPlotSettings( tmp );
OnModify();
// First, mark board as modified only for parameters saved in file
if( !plot_prms.IsSameAs( GetPlotSettings(), true ) )
OnModify();
// Now, save any change, for the session
SetPlotSettings( plot_prms );
}
}
}

View File

@ -214,7 +214,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
case F_SilkS:
case B_SilkS:
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
@ -257,7 +257,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
plotOpt.SetSkipPlotNPTH_Pads( false );
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
@ -269,7 +269,7 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
plotOpt.SetSkipPlotNPTH_Pads( false );
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetPlotOutlineMode() )
if ( plotOpt.GetFormat() == PLOT_FORMAT_DXF && plotOpt.GetDXFPlotPolygonMode() )
// PlotLayerOutlines() is designed only for DXF plotters.
// and must not be used for other plot formats
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );

View File

@ -133,18 +133,12 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
// Plot text fields, if allowed
if( trace_ref )
{
if( GetReferenceColor() == UNSPECIFIED_COLOR )
PlotTextModule( &aModule->Reference(), getColor( textLayer ) );
else
PlotTextModule( &aModule->Reference(), GetReferenceColor() );
PlotTextModule( &aModule->Reference(), getColor( textLayer ) );
}
if( trace_val )
{
if( GetValueColor() == UNSPECIFIED_COLOR )
PlotTextModule( &aModule->Value(), getColor( textLayer ) );
else
PlotTextModule( &aModule->Value(), GetValueColor() );
PlotTextModule( &aModule->Value(), getColor( textLayer ) );
}
for( BOARD_ITEM *item = aModule->GraphicalItems().GetFirst(); item; item = item->Next() )
@ -249,11 +243,11 @@ void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim )
draw.SetWidth( aDim->GetWidth() );
draw.SetLayer( aDim->GetLayer() );
EDA_COLOR_T color = aDim->GetBoard()->GetLayerColor( aDim->GetLayer() );
EDA_COLOR_T color = getColor( aDim->GetLayer() );
// Set plot color (change WHITE to LIGHTGRAY because
// the white items are not seen on a white paper or screen
m_plotter->SetColor( color != WHITE ? color : LIGHTGRAY);
m_plotter->SetColor( color );
PlotTextePcb( &aDim->Text() );
@ -447,7 +441,8 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
if( !m_layerMask[pt_texte->GetLayer()] )
return;
m_plotter->SetColor( getColor( pt_texte->GetLayer() ) );
EDA_COLOR_T color = getColor( pt_texte->GetLayer() );
m_plotter->SetColor( color );
size = pt_texte->GetSize();
pos = pt_texte->GetTextPosition();
@ -475,14 +470,14 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
{
wxString& txt = strings_list.Item( ii );
m_plotter->Text( positions[ii], UNSPECIFIED_COLOR, txt, orient, size,
m_plotter->Text( positions[ii], color, txt, orient, size,
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
thickness, pt_texte->IsItalic(), allow_bold );
}
}
else
{
m_plotter->Text( pos, UNSPECIFIED_COLOR, shownText, orient, size,
m_plotter->Text( pos, color, shownText, orient, size,
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
thickness, pt_texte->IsItalic(), allow_bold );
}