Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
de471744
Commit
de471744
authored
Jun 09, 2012
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some minor bugs in plot functions
parent
7f07b48e
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
4400 additions
and
4371 deletions
+4400
-4371
base_screen.cpp
common/base_screen.cpp
+5
-4
common_plot_functions.cpp
common/common_plot_functions.cpp
+3
-2
drawtxt.cpp
common/drawtxt.cpp
+39
-7
dialog_plot_schematic_DXF.cpp
eeschema/dialogs/dialog_plot_schematic_DXF.cpp
+1
-1
dialog_plot_schematic_HPGL.cpp
eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
+1
-1
dialog_plot_schematic_PDF.cpp
eeschema/dialogs/dialog_plot_schematic_PDF.cpp
+4
-4
dialog_plot_schematic_PS.cpp
eeschema/dialogs/dialog_plot_schematic_PS.cpp
+1
-1
wxstruct.h
include/wxstruct.h
+1
-1
dialog_edit_module_for_BoardEditor.cpp
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
+26
-0
dialog_plot_base.fbp
pcbnew/dialogs/dialog_plot_base.fbp
+4219
-4301
pcb_plot_params.cpp
pcbnew/pcb_plot_params.cpp
+14
-13
pcb_plot_params.h
pcbnew/pcb_plot_params.h
+4
-4
pcbplot.cpp
pcbnew/pcbplot.cpp
+43
-14
plotdxf.cpp
pcbnew/plotdxf.cpp
+1
-1
plotgerb.cpp
pcbnew/plotgerb.cpp
+1
-1
plothpgl.cpp
pcbnew/plothpgl.cpp
+35
-14
plotps.cpp
pcbnew/plotps.cpp
+2
-2
No files found.
common/base_screen.cpp
View file @
de471744
/*
/*
* This program source code file is part of KiCad, a free EDA CAD application.
* This program source code file is part of KiCad, a free EDA CAD application.
*
*
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* modify it under the terms of the GNU General Public License
...
...
common/common_plot_functions.cpp
View file @
de471744
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
/* Plot sheet references
/* Plot sheet references
* margin is in mils (1/1000 inch)
* margin is in mils (1/1000 inch)
*/
*/
void
EDA_DRAW_FRAME
::
PlotWorkSheet
(
PLOTTER
*
plotter
,
BASE_SCREEN
*
screen
)
void
EDA_DRAW_FRAME
::
PlotWorkSheet
(
PLOTTER
*
plotter
,
BASE_SCREEN
*
screen
,
int
aLineWidth
)
{
{
#define WSTEXTSIZE 50 // Text size in mils
#define WSTEXTSIZE 50 // Text size in mils
...
@@ -46,10 +46,11 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
...
@@ -46,10 +46,11 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
#endif
#endif
bool
italic
=
false
;
bool
italic
=
false
;
bool
thickness
=
0
;
//@todo : use current pen
int
thickness
=
aLineWidth
;
color
=
BLACK
;
color
=
BLACK
;
plotter
->
SetColor
(
color
);
plotter
->
SetColor
(
color
);
plotter
->
SetCurrentLineWidth
(
thickness
);
// Plot edge.
// Plot edge.
ref
.
x
=
pageInfo
.
GetLeftMarginMils
()
*
iusPerMil
;
ref
.
x
=
pageInfo
.
GetLeftMarginMils
()
*
iusPerMil
;
...
...
common/drawtxt.cpp
View file @
de471744
...
@@ -2,6 +2,33 @@
...
@@ -2,6 +2,33 @@
* Functions to draw and plot text on screen
* Functions to draw and plot text on screen
* @file drawtxt.cpp
* @file drawtxt.cpp
*/
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 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
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <fctsys.h>
#include <gr_basic.h>
#include <gr_basic.h>
#include <common.h>
#include <common.h>
...
@@ -526,15 +553,17 @@ void PLOTTER::Text( const wxPoint& aPos,
...
@@ -526,15 +553,17 @@ void PLOTTER::Text( const wxPoint& aPos,
bool
aItalic
,
bool
aItalic
,
bool
aBold
)
bool
aBold
)
{
{
if
(
aWidth
==
0
&&
aBold
)
// Use default values if aWidth == 0
int
textPensize
=
aWidth
;
aWidth
=
GetPenSizeForBold
(
MIN
(
aSize
.
x
,
aSize
.
y
)
);
if
(
aWidth
>=
0
)
if
(
textPensize
==
0
&&
aBold
)
// Use default values if aWidth == 0
aWidth
=
Clamp_Text_PenSize
(
aWidth
,
aSize
,
aBold
);
textPensize
=
GetPenSizeForBold
(
MIN
(
aSize
.
x
,
aSize
.
y
)
);
if
(
textPensize
>=
0
)
textPensize
=
Clamp_Text_PenSize
(
aWidth
,
aSize
,
aBold
);
else
else
aWidth
=
-
Clamp_Text_PenSize
(
-
aWidth
,
aSize
,
aBold
);
textPensize
=
-
Clamp_Text_PenSize
(
-
aWidth
,
aSize
,
aBold
);
SetCurrentLineWidth
(
aWidth
);
SetCurrentLineWidth
(
textPensize
);
if
(
aColor
>=
0
)
if
(
aColor
>=
0
)
...
@@ -543,8 +572,11 @@ void PLOTTER::Text( const wxPoint& aPos,
...
@@ -543,8 +572,11 @@ void PLOTTER::Text( const wxPoint& aPos,
DrawGraphicText
(
NULL
,
NULL
,
aPos
,
aColor
,
aText
,
DrawGraphicText
(
NULL
,
NULL
,
aPos
,
aColor
,
aText
,
aOrient
,
aSize
,
aOrient
,
aSize
,
aH_justify
,
aV_justify
,
aH_justify
,
aV_justify
,
aWidth
,
aItalic
,
textPensize
,
aItalic
,
aBold
,
aBold
,
NULL
,
NULL
,
this
);
this
);
if
(
aWidth
!=
textPensize
)
SetCurrentLineWidth
(
aWidth
);
}
}
eeschema/dialogs/dialog_plot_schematic_DXF.cpp
View file @
de471744
...
@@ -241,7 +241,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
...
@@ -241,7 +241,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
if
(
m_plot_Sheet_Ref
)
if
(
m_plot_Sheet_Ref
)
{
{
plotter
->
SetColor
(
BLACK
);
plotter
->
SetColor
(
BLACK
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
,
g_DrawDefaultLineThickness
);
}
}
screen
->
Plot
(
plotter
);
screen
->
Plot
(
plotter
);
...
...
eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
View file @
de471744
...
@@ -395,7 +395,7 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_1_Page_HPGL( const wxString& FileName,
...
@@ -395,7 +395,7 @@ void DIALOG_PLOT_SCHEMATIC_HPGL::Plot_1_Page_HPGL( const wxString& FileName,
plotter
->
SetColor
(
BLACK
);
plotter
->
SetColor
(
BLACK
);
if
(
s_plot_Sheet_Ref
)
if
(
s_plot_Sheet_Ref
)
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
,
g_DrawDefaultLineThickness
);
screen
->
Plot
(
plotter
);
screen
->
Plot
(
plotter
);
...
...
eeschema/dialogs/dialog_plot_schematic_PDF.cpp
View file @
de471744
...
@@ -301,7 +301,7 @@ void DIALOG_PLOT_SCHEMATIC_PDF::plotOneSheet( PDF_PLOTTER* plotter,
...
@@ -301,7 +301,7 @@ void DIALOG_PLOT_SCHEMATIC_PDF::plotOneSheet( PDF_PLOTTER* plotter,
if
(
m_plot_Sheet_Ref
)
if
(
m_plot_Sheet_Ref
)
{
{
plotter
->
SetColor
(
BLACK
);
plotter
->
SetColor
(
BLACK
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
,
g_DrawDefaultLineThickness
);
}
}
screen
->
Plot
(
plotter
);
screen
->
Plot
(
plotter
);
...
...
eeschema/dialogs/dialog_plot_schematic_PS.cpp
View file @
de471744
...
@@ -294,7 +294,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
...
@@ -294,7 +294,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
if
(
m_plot_Sheet_Ref
)
if
(
m_plot_Sheet_Ref
)
{
{
plotter
->
SetColor
(
BLACK
);
plotter
->
SetColor
(
BLACK
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
);
m_Parent
->
PlotWorkSheet
(
plotter
,
screen
,
g_DrawDefaultLineThickness
);
}
}
screen
->
Plot
(
plotter
);
screen
->
Plot
(
plotter
);
...
...
include/wxstruct.h
View file @
de471744
...
@@ -686,7 +686,7 @@ public:
...
@@ -686,7 +686,7 @@ public:
int
aNScr
,
int
aScr
,
int
aLnW
,
double
aScalar
,
int
aNScr
,
int
aScr
,
int
aLnW
,
double
aScalar
,
EDA_COLOR_T
aClr1
=
RED
,
EDA_COLOR_T
aClr2
=
RED
);
EDA_COLOR_T
aClr1
=
RED
,
EDA_COLOR_T
aClr2
=
RED
);
void
PlotWorkSheet
(
PLOTTER
*
aPlotter
,
BASE_SCREEN
*
aScreen
);
void
PlotWorkSheet
(
PLOTTER
*
aPlotter
,
BASE_SCREEN
*
aScreen
,
int
aLineWidth
);
/**
/**
* Function GetXYSheetReferences
* Function GetXYSheetReferences
...
...
pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
View file @
de471744
...
@@ -2,6 +2,32 @@
...
@@ -2,6 +2,32 @@
* Module editor: Dialog box for editing module properties in the pcb editor. *
* Module editor: Dialog box for editing module properties in the pcb editor. *
******************************************************************************/
******************************************************************************/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2012 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2004-2011 KiCad Developers, see change_log.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
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <fctsys.h>
#include <gr_basic.h>
#include <gr_basic.h>
#include <class_drawpanel.h>
#include <class_drawpanel.h>
...
...
pcbnew/dialogs/dialog_plot_base.fbp
View file @
de471744
...
@@ -25,62 +25,28 @@
...
@@ -25,62 +25,28 @@
<property
name=
"use_enum"
>
1
</property>
<property
name=
"use_enum"
>
1
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
<object
class=
"Dialog"
expanded=
"1"
>
<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_managed"
>
0
</property>
<property
name=
"aui_managed"
>
0
</property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_manager_style"
>
wxAUI_MGR_DEFAULT
</property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center"
>
wxBOTH
</property>
<property
name=
"center"
>
wxBOTH
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</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=
"enabled"
>
1
</property>
<property
name=
"event_handler"
>
impl_virtual
</property>
<property
name=
"event_handler"
>
impl_virtual
</property>
<property
name=
"extra_style"
></property>
<property
name=
"extra_style"
></property>
<property
name=
"fg"
></property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"maximum_size"
></property>
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
>
-1,-1
</property>
<property
name=
"minimum_size"
>
-1,-1
</property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
DIALOG_PLOT_BASE
</property>
<property
name=
"name"
>
DIALOG_PLOT_BASE
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
Plot
</property>
<property
name=
"title"
>
Plot
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -206,10 +172,6 @@
...
@@ -206,10 +172,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -392,10 +354,6 @@
...
@@ -392,10 +354,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -1539,10 +1497,6 @@
...
@@ -1539,10 +1497,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -1714,10 +1668,6 @@
...
@@ -1714,10 +1668,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -1889,10 +1839,6 @@
...
@@ -1889,10 +1839,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -2064,10 +2010,6 @@
...
@@ -2064,10 +2010,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
>
Pen size used to draw items that have no pen size specified.


Used mainly to draw items in sketch mode.
</property>
<property
name=
"tooltip"
>
Pen size used to draw items that have no pen size specified.


Used mainly to draw items in sketch mode.
</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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -2644,10 +2586,6 @@
...
@@ -2644,10 +2586,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -2822,10 +2760,6 @@
...
@@ -2822,10 +2760,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -3011,10 +2945,6 @@
...
@@ -3011,10 +2945,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -3225,10 +3155,6 @@
...
@@ -3225,10 +3155,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -3414,10 +3340,6 @@
...
@@ -3414,10 +3340,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
@@ -3603,10 +3525,6 @@
...
@@ -3603,10 +3525,6 @@
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></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_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
></property>
...
...
pcbnew/pcb_plot_params.cpp
View file @
de471744
...
@@ -28,18 +28,19 @@
...
@@ -28,18 +28,19 @@
#include <layers_id_colors_and_visibility.h>
#include <layers_id_colors_and_visibility.h>
#include <plot_common.h>
#include <plot_common.h>
#include <macros.h>
#include <macros.h>
#include <convert_to_biu.h>
#define PLOT_LINEWIDTH_MIN 0
#define PLOT_LINEWIDTH_MIN 0
#define PLOT_LINEWIDTH_MAX (200*IU_PER_
DECI
MILS)
#define PLOT_LINEWIDTH_MAX (200*IU_PER_MILS)
#define HPGL_PEN_DIAMETER_MIN 0
#define HPGL_PEN_DIAMETER_MIN 0
#define HPGL_PEN_DIAMETER_MAX
(100*IU_PER_DECIMILS)
#define HPGL_PEN_DIAMETER_MAX
100 // Unit = mil
#define HPGL_PEN_SPEED_MIN
0
#define HPGL_PEN_SPEED_MIN
1 // this param is always in cm/s
#define HPGL_PEN_SPEED_MAX
1000
#define HPGL_PEN_SPEED_MAX
99 // this param is always in cm/s
#define HPGL_PEN_NUMBER_MIN 1
#define HPGL_PEN_NUMBER_MIN 1
#define HPGL_PEN_NUMBER_MAX 16
#define HPGL_PEN_NUMBER_MAX 16
#define HPGL_PEN_OVERLA
Y
_MIN 0
#define HPGL_PEN_OVERLA
P
_MIN 0
#define HPGL_PEN_OVERLA
Y_MAX 0x100
#define HPGL_PEN_OVERLA
P_MAX 50 // Unit = mil
/**
/**
...
@@ -47,7 +48,7 @@
...
@@ -47,7 +48,7 @@
* default thickness line value (Frame references) (i.e. = 0 ).
* default thickness line value (Frame references) (i.e. = 0 ).
* 0 = single pixel line width.
* 0 = single pixel line width.
*/
*/
int
g_DrawDefaultLineThickness
=
6
0
;
int
g_DrawDefaultLineThickness
=
6
*
IU_PER_MILS
;
using
namespace
PCBPLOTPARAMS_T
;
using
namespace
PCBPLOTPARAMS_T
;
...
@@ -88,9 +89,9 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
...
@@ -88,9 +89,9 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
m_PlotMode
=
FILLED
;
m_PlotMode
=
FILLED
;
useAuxOrigin
=
false
;
useAuxOrigin
=
false
;
m_HPGLPenNum
=
1
;
m_HPGLPenNum
=
1
;
m_HPGLPenSpeed
=
20
;
m_HPGLPenSpeed
=
20
;
// this param is always in cm/s
m_HPGLPenDiam
=
15
;
m_HPGLPenDiam
=
15
;
// in mils
m_HPGLPenOvr
=
2
;
m_HPGLPenOvr
=
2
;
// in mils
m_PlotPSColorOpt
=
true
;
m_PlotPSColorOpt
=
true
;
m_PlotPSNegative
=
false
;
m_PlotPSNegative
=
false
;
psA4Output
=
false
;
psA4Output
=
false
;
...
@@ -260,7 +261,7 @@ bool PCB_PLOT_PARAMS::SetHpglPenSpeed( int aValue )
...
@@ -260,7 +261,7 @@ bool PCB_PLOT_PARAMS::SetHpglPenSpeed( int aValue )
bool
PCB_PLOT_PARAMS
::
SetHpglPenOverlay
(
int
aValue
)
bool
PCB_PLOT_PARAMS
::
SetHpglPenOverlay
(
int
aValue
)
{
{
return
setInt
(
&
m_HPGLPenOvr
,
aValue
,
HPGL_PEN_OVERLA
Y_MIN
,
HPGL_PEN_OVERLAY
_MAX
);
return
setInt
(
&
m_HPGLPenOvr
,
aValue
,
HPGL_PEN_OVERLA
P_MIN
,
HPGL_PEN_OVERLAP
_MAX
);
}
}
...
@@ -344,8 +345,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
...
@@ -344,8 +345,8 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
HPGL_PEN_DIAMETER_MAX
);
HPGL_PEN_DIAMETER_MAX
);
break
;
break
;
case
T_hpglpenoverlay
:
case
T_hpglpenoverlay
:
aPcbPlotParams
->
m_HPGLPenOvr
=
ParseInt
(
HPGL_PEN_OVERLA
Y
_MIN
,
aPcbPlotParams
->
m_HPGLPenOvr
=
ParseInt
(
HPGL_PEN_OVERLA
P
_MIN
,
HPGL_PEN_OVERLA
Y_MIN
);
HPGL_PEN_OVERLA
P_MAX
);
break
;
break
;
case
T_pscolor
:
case
T_pscolor
:
aPcbPlotParams
->
m_PlotPSColorOpt
=
ParseBool
();
aPcbPlotParams
->
m_PlotPSColorOpt
=
ParseBool
();
...
...
pcbnew/pcb_plot_params.h
View file @
de471744
...
@@ -47,10 +47,10 @@ public:
...
@@ -47,10 +47,10 @@ public:
///< (ie protected by mask)
///< (ie protected by mask)
EDA_DRAW_MODE_T
m_PlotMode
;
///< LINE, FILLED or SKETCH: select how to plot filled objects.
EDA_DRAW_MODE_T
m_PlotMode
;
///< LINE, FILLED or SKETCH: select how to plot filled objects.
///< depending on plot format or layers, all options are not always allowed
///< depending on plot format or layers, all options are not always allowed
int
m_HPGLPenNum
;
int
m_HPGLPenNum
;
///< HPGL only: pen number selection(1 to 9)
int
m_HPGLPenSpeed
;
int
m_HPGLPenSpeed
;
///< HPGL only: pen speed, always in cm/s (1 to 99 cm/s)
int
m_HPGLPenDiam
;
int
m_HPGLPenDiam
;
///< HPGL only: pen diameter in MILS, usefull to fill areas
int
m_HPGLPenOvr
;
int
m_HPGLPenOvr
;
///< HPGL only: pen overlay in MILS, usefull only to fill areas
int
m_PlotPSColorOpt
;
///< True for color Postscript output
int
m_PlotPSColorOpt
;
///< True for color Postscript output
bool
m_PlotPSNegative
;
///< True to create a negative board ps plot
bool
m_PlotPSNegative
;
///< True to create a negative board ps plot
...
...
pcbnew/pcbplot.cpp
View file @
de471744
...
@@ -2,6 +2,31 @@
...
@@ -2,6 +2,31 @@
* @file pcbnew/pcbplot.cpp
* @file pcbnew/pcbplot.cpp
*/
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2012 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
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <appl_wxstruct.h>
#include <plot_common.h>
#include <plot_common.h>
...
@@ -119,18 +144,20 @@ void DIALOG_PLOT::Init_Dialog()
...
@@ -119,18 +144,20 @@ void DIALOG_PLOT::Init_Dialog()
m_plotFormatOpt
->
SetSelection
(
m_plotOpts
.
GetPlotFormat
()
);
m_plotFormatOpt
->
SetSelection
(
m_plotOpts
.
GetPlotFormat
()
);
// Set units and value for HPGL pen size.
// Set units and value for HPGL pen size
(this param in in mils)
.
AddUnitSymbol
(
*
m_textPenSize
,
g_UserUnit
);
AddUnitSymbol
(
*
m_textPenSize
,
g_UserUnit
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
m_plotOpts
.
GetHpglPenDiameter
()
*
10
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
m_plotOpts
.
GetHpglPenDiameter
()
*
IU_PER_MILS
);
m_HPGLPenSizeOpt
->
AppendText
(
msg
);
m_HPGLPenSizeOpt
->
AppendText
(
msg
);
//
Set units to cm/s for standard HPGL pen speed
.
//
Units are *always* cm/s for HPGL pen speed, from 1 to 99
.
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
m_plotOpts
.
GetHpglPenSpeed
()
*
10000
);
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
m_plotOpts
.
GetHpglPenSpeed
()
);
m_HPGLPenSpeedOpt
->
AppendText
(
msg
);
m_HPGLPenSpeedOpt
->
AppendText
(
msg
);
// Set units and value for HPGL pen overlay.
// Set units and value for HPGL pen overlay
(this param in in mils)
.
AddUnitSymbol
(
*
m_textPenOvr
,
g_UserUnit
);
AddUnitSymbol
(
*
m_textPenOvr
,
g_UserUnit
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
m_plotOpts
.
GetHpglPenOverlay
()
*
10
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
m_plotOpts
.
GetHpglPenOverlay
()
*
IU_PER_MILS
);
m_HPGLPenOverlayOpt
->
AppendText
(
msg
);
m_HPGLPenOverlayOpt
->
AppendText
(
msg
);
AddUnitSymbol
(
*
m_textDefaultPenSize
,
g_UserUnit
);
AddUnitSymbol
(
*
m_textDefaultPenSize
,
g_UserUnit
);
...
@@ -448,37 +475,39 @@ void DIALOG_PLOT::applyPlotSettings()
...
@@ -448,37 +475,39 @@ void DIALOG_PLOT::applyPlotSettings()
// Update settings from text fields. Rewrite values back to the fields,
// Update settings from text fields. Rewrite values back to the fields,
// since the values may have been constrained by the setters.
// since the values may have been constrained by the setters.
// HPLG pen size
// read HPLG pen size (this param is stored in mils)
wxString
msg
=
m_HPGLPenSizeOpt
->
GetValue
();
wxString
msg
=
m_HPGLPenSizeOpt
->
GetValue
();
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
);
int
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
)
/
IU_PER_MILS
;
if
(
!
tempOptions
.
SetHpglPenDiameter
(
tmp
)
)
if
(
!
tempOptions
.
SetHpglPenDiameter
(
tmp
)
)
{
{
msg
=
ReturnStringFromValue
(
g_UserUnit
,
tempOptions
.
GetHpglPenDiameter
()
*
10
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
tempOptions
.
GetHpglPenDiameter
()
*
IU_PER_MILS
);
m_HPGLPenSizeOpt
->
SetValue
(
msg
);
m_HPGLPenSizeOpt
->
SetValue
(
msg
);
msg
.
Printf
(
_
(
"HPGL pen size constrained!
\n
"
)
);
msg
.
Printf
(
_
(
"HPGL pen size constrained!
\n
"
)
);
m_messagesBox
->
AppendText
(
msg
);
m_messagesBox
->
AppendText
(
msg
);
}
}
//
HPGL pen speed
//
read HPGL pen speed (this param is stored in cm/s)
msg
=
m_HPGLPenSpeedOpt
->
GetValue
();
msg
=
m_HPGLPenSpeedOpt
->
GetValue
();
tmp
=
ReturnValueFromString
(
UNSCALED_UNITS
,
msg
);
tmp
=
ReturnValueFromString
(
UNSCALED_UNITS
,
msg
);
if
(
!
tempOptions
.
SetHpglPenSpeed
(
tmp
)
)
if
(
!
tempOptions
.
SetHpglPenSpeed
(
tmp
)
)
{
{
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
tempOptions
.
GetHpglPenSpeed
()
*
1000
);
msg
=
ReturnStringFromValue
(
UNSCALED_UNITS
,
tempOptions
.
GetHpglPenSpeed
()
);
m_HPGLPenSpeedOpt
->
SetValue
(
msg
);
m_HPGLPenSpeedOpt
->
SetValue
(
msg
);
msg
.
Printf
(
_
(
"HPGL pen speed constrained!
\n
"
)
);
msg
.
Printf
(
_
(
"HPGL pen speed constrained!
\n
"
)
);
m_messagesBox
->
AppendText
(
msg
);
m_messagesBox
->
AppendText
(
msg
);
}
}
//
HPGL pen overlay
//
Read HPGL pen overlay (this param is stored in mils)
msg
=
m_HPGLPenOverlayOpt
->
GetValue
();
msg
=
m_HPGLPenOverlayOpt
->
GetValue
();
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
);
tmp
=
ReturnValueFromString
(
g_UserUnit
,
msg
)
/
IU_PER_MILS
;
if
(
!
tempOptions
.
SetHpglPenOverlay
(
tmp
)
)
if
(
!
tempOptions
.
SetHpglPenOverlay
(
tmp
)
)
{
{
msg
=
ReturnStringFromValue
(
g_UserUnit
,
tempOptions
.
GetHpglPenOverlay
()
*
10
);
msg
=
ReturnStringFromValue
(
g_UserUnit
,
tempOptions
.
GetHpglPenOverlay
()
*
IU_PER_MILS
);
m_HPGLPenOverlayOpt
->
SetValue
(
msg
);
m_HPGLPenOverlayOpt
->
SetValue
(
msg
);
msg
.
Printf
(
_
(
"HPGL pen overlay constrained!
\n
"
)
);
msg
.
Printf
(
_
(
"HPGL pen overlay constrained!
\n
"
)
);
m_messagesBox
->
AppendText
(
msg
);
m_messagesBox
->
AppendText
(
msg
);
...
...
pcbnew/plotdxf.cpp
View file @
de471744
...
@@ -37,7 +37,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer,
...
@@ -37,7 +37,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer,
plotter
->
StartPlot
(
output_file
);
plotter
->
StartPlot
(
output_file
);
if
(
plot_opts
.
m_PlotFrameRef
)
if
(
plot_opts
.
m_PlotFrameRef
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
,
plot_opts
.
GetPlotLineWidth
()
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
plotter
->
EndPlot
();
plotter
->
EndPlot
();
...
...
pcbnew/plotgerb.cpp
View file @
de471744
...
@@ -70,7 +70,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay
...
@@ -70,7 +70,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLay
// Sheet refs on gerber CAN be useful... and they're always 1:1
// Sheet refs on gerber CAN be useful... and they're always 1:1
if
(
plot_opts
.
m_PlotFrameRef
)
if
(
plot_opts
.
m_PlotFrameRef
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
,
plot_opts
.
GetPlotLineWidth
()
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
...
...
pcbnew/plothpgl.cpp
View file @
de471744
...
@@ -2,19 +2,39 @@
...
@@ -2,19 +2,39 @@
* @file plothpgl.cpp
* @file plothpgl.cpp
*/
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012 Dick Hollenbeck, dick@softplc.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <fctsys.h>
#include <common.h>
#include <common.h>
#include <plot_common.h>
#include <plot_common.h>
#include <confirm.h>
#include <trigo.h>
#include <wxBasePcbFrame.h>
#include <wxBasePcbFrame.h>
#include <macros.h>
#include <class_board.h>
#include <class_board.h>
#include <pcbnew.h>
#include <pcbnew.h>
#include <protos.h>
#include <pcbplot.h>
#include <pcbplot.h>
#include <convert_to_biu.h>
bool
PCB_BASE_FRAME
::
ExportToHpglFile
(
const
wxString
&
aFullFileName
,
int
aLayer
,
bool
PCB_BASE_FRAME
::
ExportToHpglFile
(
const
wxString
&
aFullFileName
,
int
aLayer
,
...
@@ -35,20 +55,21 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
...
@@ -35,20 +55,21 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
PCB_PLOT_PARAMS
plot_opts
=
GetPlotSettings
();
PCB_PLOT_PARAMS
plot_opts
=
GetPlotSettings
();
// Compute pen_dim (from
g_
m_HPGLPenDiam in mils) in pcb units,
// Compute pen_dim (from m_HPGLPenDiam in mils) in pcb units,
// with plot scale (if Scale is 2, pen diameter
is always g_
m_HPGLPenDiam
// with plot scale (if Scale is 2, pen diameter
value is always
m_HPGLPenDiam
// so apparent pen diam is real pen diam / Scale
// so apparent pen diam is real pen diam / Scale
int
pen_diam
=
KiROUND
(
plot_opts
.
m_HPGLPenDiam
/
int
pen_diam
=
KiROUND
(
plot_opts
.
m_HPGLPenDiam
*
IU_PER_MILS
/
plot_opts
.
m_PlotScale
);
plot_opts
.
m_PlotScale
);
// compute pen_overlay (from g_m_HPGLPenOvr in mils) with plot scale
// compute pen_overlay (from m_HPGLPenOvr in mils) in pcb units
// with plot scale
if
(
plot_opts
.
m_HPGLPenOvr
<
0
)
if
(
plot_opts
.
m_HPGLPenOvr
<
0
)
plot_opts
.
m_HPGLPenOvr
=
0
;
plot_opts
.
m_HPGLPenOvr
=
0
;
if
(
plot_opts
.
m_HPGLPenOvr
>=
plot_opts
.
m_HPGLPenDiam
)
if
(
plot_opts
.
m_HPGLPenOvr
>=
plot_opts
.
m_HPGLPenDiam
)
plot_opts
.
m_HPGLPenOvr
=
plot_opts
.
m_HPGLPenDiam
-
1
;
plot_opts
.
m_HPGLPenOvr
=
plot_opts
.
m_HPGLPenDiam
-
1
;
int
pen_overlay
=
KiROUND
(
plot_opts
.
m_HPGLPenOvr
*
10.0
/
int
pen_overlay
=
KiROUND
(
plot_opts
.
m_HPGLPenOvr
*
IU_PER_MILS
/
plot_opts
.
m_PlotScale
);
plot_opts
.
m_PlotScale
);
...
@@ -72,7 +93,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
...
@@ -72,7 +93,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
// Fit to 80% of the page
// Fit to 80% of the page
double
Xscale
=
(
(
pageSizeIU
.
x
*
0.8
)
/
boardSize
.
x
);
double
Xscale
=
(
(
pageSizeIU
.
x
*
0.8
)
/
boardSize
.
x
);
double
Yscale
=
(
(
pageSizeIU
.
y
*
0.8
)
/
boardSize
.
y
);
double
Yscale
=
(
(
pageSizeIU
.
y
*
0.8
)
/
boardSize
.
y
);
scale
=
MIN
(
Xscale
,
Yscale
);
scale
=
std
::
min
(
Xscale
,
Yscale
);
}
}
else
else
{
{
...
@@ -113,7 +134,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
...
@@ -113,7 +134,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer
// The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway
// The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway
if
(
plot_opts
.
m_PlotFrameRef
&&
!
center
)
if
(
plot_opts
.
m_PlotFrameRef
&&
!
center
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
,
plot_opts
.
GetPlotLineWidth
()
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
Plot_Layer
(
plotter
,
aLayer
,
aTraceMode
);
plotter
->
EndPlot
();
plotter
->
EndPlot
();
...
...
pcbnew/plotps.cpp
View file @
de471744
...
@@ -121,7 +121,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
...
@@ -121,7 +121,7 @@ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int
/* The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway */
/* The worksheet is not significant with scale!=1... It is with paperscale!=1, anyway */
if
(
plotOpts
.
m_PlotFrameRef
&&
!
center
)
if
(
plotOpts
.
m_PlotFrameRef
&&
!
center
)
PlotWorkSheet
(
plotter
,
GetScreen
()
);
PlotWorkSheet
(
plotter
,
GetScreen
()
,
plotOpts
.
GetPlotLineWidth
()
);
// If plot a negative board:
// If plot a negative board:
// Draw a black rectangle (background for plot board in white)
// Draw a black rectangle (background for plot board in white)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment