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
0a58e630
Commit
0a58e630
authored
Aug 28, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed postscript plot broken. Better default values for pcbnew plot dialog
parent
3806557f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1191 additions
and
1110 deletions
+1191
-1110
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+24
-19
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+1105
-1047
pcbplot.cpp
pcbnew/pcbplot.cpp
+13
-0
pcbplot.h
pcbnew/pcbplot.h
+49
-44
No files found.
common/common_plotPS_functions.cpp
View file @
0a58e630
...
@@ -27,7 +27,7 @@ void PS_Plotter::set_viewport( wxPoint offset,
...
@@ -27,7 +27,7 @@ void PS_Plotter::set_viewport( wxPoint offset,
}
}
/*************************************************************************************/
/*************************************************************************************/
void
PS_Plotter
::
set_default_line_width
(
int
width
)
void
PS_Plotter
::
set_default_line_width
(
int
width
)
/*************************************************************************************/
/*************************************************************************************/
/* Set the default line width (in 1/1000 inch) for the current plotting
/* Set the default line width (in 1/1000 inch) for the current plotting
...
@@ -38,7 +38,7 @@ void PS_Plotter::set_default_line_width( int width )
...
@@ -38,7 +38,7 @@ void PS_Plotter::set_default_line_width( int width )
}
}
/***************************************/
/***************************************/
void
PS_Plotter
::
set_current_line_width
(
int
width
)
void
PS_Plotter
::
set_current_line_width
(
int
width
)
/***************************************/
/***************************************/
/* Set the Current line width (in 1/1000 inch) for the next plot
/* Set the Current line width (in 1/1000 inch) for the next plot
...
@@ -53,7 +53,7 @@ void PS_Plotter::set_current_line_width( int width )
...
@@ -53,7 +53,7 @@ void PS_Plotter::set_current_line_width( int width )
pen_width
=
default_pen_width
;
pen_width
=
default_pen_width
;
if
(
pen_width
!=
current_pen_width
)
if
(
pen_width
!=
current_pen_width
)
fprintf
(
output_file
,
"%g setlinewidth
\n
"
,
fprintf
(
output_file
,
"%g setlinewidth
\n
"
,
user_to_device_size
(
pen_width
));
user_to_device_size
(
pen_width
));
current_pen_width
=
pen_width
;
current_pen_width
=
pen_width
;
...
@@ -93,23 +93,28 @@ void PS_Plotter::set_color( int color )
...
@@ -93,23 +93,28 @@ void PS_Plotter::set_color( int color )
(
double
)
ColorRefs
[
color
].
m_Blue
/
255
);
(
double
)
ColorRefs
[
color
].
m_Blue
/
255
);
}
}
}
}
else
/* B/W Mode - Use BLACK for all items */
else
/* B/W Mode - Use BLACK or WHITE for all items
* note the 2 colors are used in B&W mode, mainly by Pcbnew to draw holes in white on pads in black
*/
{
{
/* Why invert in this mode. Does anyway WHITE! */
int
bwcolor
=
WHITE
;
if
(
color
!=
WHITE
)
bwcolor
=
BLACK
;
if
(
negative_mode
)
if
(
negative_mode
)
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Red
/
255
,
(
double
)
1.0
-
ColorRefs
[
bwcolor
].
m_Red
/
255
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Green
/
255
,
(
double
)
1.0
-
ColorRefs
[
bwcolor
].
m_Green
/
255
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Blue
/
255
);
(
double
)
1.0
-
ColorRefs
[
bwcolor
].
m_Blue
/
255
);
else
else
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
(
double
)
ColorRefs
[
BLACK
].
m_Red
/
255
,
(
double
)
ColorRefs
[
bwcolor
].
m_Red
/
255
,
(
double
)
ColorRefs
[
BLACK
].
m_Green
/
255
,
(
double
)
ColorRefs
[
bwcolor
].
m_Green
/
255
,
(
double
)
ColorRefs
[
BLACK
].
m_Blue
/
255
);
(
double
)
ColorRefs
[
bwcolor
].
m_Blue
/
255
);
}
}
}
}
void
PS_Plotter
::
set_dash
(
bool
dashed
)
void
PS_Plotter
::
set_dash
(
bool
dashed
)
{
{
wxASSERT
(
output_file
);
wxASSERT
(
output_file
);
if
(
dashed
)
if
(
dashed
)
...
@@ -147,7 +152,7 @@ void PS_Plotter::circle( wxPoint pos, int diametre, FILL_T fill, int width )
...
@@ -147,7 +152,7 @@ void PS_Plotter::circle( wxPoint pos, int diametre, FILL_T fill, int width )
/**************************************************************************************/
/**************************************************************************************/
void
PS_Plotter
::
arc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
void
PS_Plotter
::
arc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
FILL_T
fill
,
int
width
)
FILL_T
fill
,
int
width
)
/**************************************************************************************/
/**************************************************************************************/
...
@@ -312,7 +317,7 @@ void PS_Plotter::start_plot( FILE *fout)
...
@@ -312,7 +317,7 @@ void PS_Plotter::start_plot( FILE *fout)
// box need to be "rounded down", but the coordinates of its
// box need to be "rounded down", but the coordinates of its
// upper right corner need to be "rounded up" instead.
// upper right corner need to be "rounded up" instead.
fprintf
(
output_file
,
"%%%%BoundingBox: 0 0 %d %d
\n
"
,
fprintf
(
output_file
,
"%%%%BoundingBox: 0 0 %d %d
\n
"
,
(
int
)
ceil
(
paper_size
.
y
*
CONV_SCALE
),
(
int
)
ceil
(
paper_size
.
y
*
CONV_SCALE
),
(
int
)
ceil
(
paper_size
.
x
*
CONV_SCALE
));
(
int
)
ceil
(
paper_size
.
x
*
CONV_SCALE
));
// Specify the size of the sheet and the name associated with that size.
// Specify the size of the sheet and the name associated with that size.
...
@@ -363,12 +368,12 @@ void PS_Plotter::start_plot( FILE *fout)
...
@@ -363,12 +368,12 @@ void PS_Plotter::start_plot( FILE *fout)
fprintf
(
output_file
,
"%d 0 translate 90 rotate
\n
"
,
paper_size
.
y
);
fprintf
(
output_file
,
"%d 0 translate 90 rotate
\n
"
,
paper_size
.
y
);
// Apply the scale adjustments
// Apply the scale adjustments
if
(
plot_scale_adjX
!=
1.0
||
plot_scale_adjY
!=
1.0
)
if
(
plot_scale_adjX
!=
1.0
||
plot_scale_adjY
!=
1.0
)
fprintf
(
output_file
,
"%g %g scale
\n
"
,
fprintf
(
output_file
,
"%g %g scale
\n
"
,
plot_scale_adjX
,
plot_scale_adjY
);
plot_scale_adjX
,
plot_scale_adjY
);
// Set default line width ( g_Plot_DefaultPenWidth is in user units )
// Set default line width ( g_Plot_DefaultPenWidth is in user units )
fprintf
(
output_file
,
"%g setlinewidth
\n
"
,
fprintf
(
output_file
,
"%g setlinewidth
\n
"
,
user_to_device_size
(
default_pen_width
)
);
user_to_device_size
(
default_pen_width
)
);
}
}
...
@@ -383,7 +388,7 @@ void PS_Plotter::end_plot()
...
@@ -383,7 +388,7 @@ void PS_Plotter::end_plot()
}
}
/***********************************************************************************/
/***********************************************************************************/
void
PS_Plotter
::
flash_pad_oval
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
void
PS_Plotter
::
flash_pad_oval
(
wxPoint
pos
,
wxSize
size
,
int
orient
,
GRTraceMode
modetrace
)
GRTraceMode
modetrace
)
/************************************************************************************/
/************************************************************************************/
...
@@ -421,7 +426,7 @@ void PS_Plotter::flash_pad_oval( wxPoint pos, wxSize size, int orient,
...
@@ -421,7 +426,7 @@ void PS_Plotter::flash_pad_oval( wxPoint pos, wxSize size, int orient,
}
}
/*******************************************************************************/
/*******************************************************************************/
void
PS_Plotter
::
flash_pad_circle
(
wxPoint
pos
,
int
diametre
,
void
PS_Plotter
::
flash_pad_circle
(
wxPoint
pos
,
int
diametre
,
GRTraceMode
modetrace
)
GRTraceMode
modetrace
)
/*******************************************************************************/
/*******************************************************************************/
/* Trace 1 pastille RONDE (via,pad rond) en position pos_X,Y
/* Trace 1 pastille RONDE (via,pad rond) en position pos_X,Y
...
@@ -539,7 +544,7 @@ void PS_Plotter::flash_pad_trapez( wxPoint centre, wxSize size, wxSize delta,
...
@@ -539,7 +544,7 @@ void PS_Plotter::flash_pad_trapez( wxPoint centre, wxSize size, wxSize delta,
ddx
=
delta
.
x
/
2
;
ddx
=
delta
.
x
/
2
;
ddy
=
delta
.
y
/
2
;
ddy
=
delta
.
y
/
2
;
int
coord
[
10
]
=
{
int
coord
[
10
]
=
{
-
dx
-
ddy
,
+
dy
+
ddx
,
-
dx
-
ddy
,
+
dy
+
ddx
,
-
dx
+
ddy
,
-
dy
-
ddx
,
-
dx
+
ddy
,
-
dy
-
ddx
,
+
dx
-
ddy
,
-
dy
+
ddx
,
+
dx
-
ddy
,
-
dy
+
ddx
,
...
...
internat/fr/kicad.mo
View file @
0a58e630
No preview for this file type
internat/fr/kicad.po
View file @
0a58e630
This diff is collapsed.
Click to expand it.
pcbnew/pcbplot.cpp
View file @
0a58e630
...
@@ -29,6 +29,19 @@
...
@@ -29,6 +29,19 @@
#define MIN_SCALE 0.01
#define MIN_SCALE 0.01
#define MAX_SCALE 100.0
#define MAX_SCALE 100.0
// PCB_Plot_Options constructor: set the default values for plot options:
PCB_Plot_Options
::
PCB_Plot_Options
()
{
Sel_Texte_Reference
=
true
;
Sel_Texte_Valeur
=
true
;
Sel_Texte_Divers
=
true
;
DrillShapeOpt
=
PCB_Plot_Options
::
SMALL_DRILL_SHAPE
;
Trace_Mode
=
FILLED
;
Scale
=
1.0
;
ScaleAdjX
=
1.0
;
ScaleAdjY
=
1.0
;
PlotScaleOpt
=
1
;
}
static
long
s_SelectedLayers
=
CUIVRE_LAYER
|
CMP_LAYER
|
static
long
s_SelectedLayers
=
CUIVRE_LAYER
|
CMP_LAYER
|
SILKSCREEN_LAYER_CMP
|
SILKSCREEN_LAYER_CU
;
SILKSCREEN_LAYER_CMP
|
SILKSCREEN_LAYER_CU
;
...
...
pcbnew/pcbplot.h
View file @
0a58e630
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
/* Shared Config keys for plot and print */
/* Shared Config keys for plot and print */
#define OPTKEY_PLOT_LINEWIDTH_VALUE
wxT( "PlotLineWidth" )
#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
#define OPTKEY_LAYERBASE
wxT( "PlotLayer_%d" )
#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
#define OPTKEY_PRINT_X_FINESCALE_ADJ
wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ
wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE
wxT( "PrintScale" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
/* Constantes de conversion d'unites */
/* Constantes de conversion d'unites */
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
...
@@ -20,42 +20,47 @@
...
@@ -20,42 +20,47 @@
#define SCALE_HPGL 0.102041
#define SCALE_HPGL 0.102041
/* Plot Options : */
/* Plot Options : */
struct
PCB_Plot_Options
{
class
PCB_Plot_Options
bool
Exclude_Edges_Pcb
;
{
int
PlotLine_Width
;
public
:
bool
Plot_Frame_Ref
;
// True to plot/print frame references
bool
Exclude_Edges_Pcb
;
bool
DrawViaOnMaskLayer
;
// True if vias are drawn on Mask layer (ie protected by mask)
int
PlotLine_Width
;
bool
Plot_Frame_Ref
;
// True to plot/print frame references
bool
DrawViaOnMaskLayer
;
// True if vias are drawn on Mask layer (ie protected by mask)
GRTraceMode
Trace_Mode
;
GRTraceMode
Trace_Mode
;
bool
Plot_Set_MIROIR
;
bool
Plot_Set_MIROIR
;
int
HPGL_Pen_Num
;
int
HPGL_Pen_Num
;
int
HPGL_Pen_Speed
;
int
HPGL_Pen_Speed
;
int
HPGL_Pen_Diam
;
int
HPGL_Pen_Diam
;
int
HPGL_Pen_Recouvrement
;
int
HPGL_Pen_Recouvrement
;
int
PlotPSColorOpt
;
// True for color Postscript output
int
PlotPSColorOpt
;
// True for color Postscript output
bool
Plot_PS_Negative
;
// True to create a negative board ps plot
bool
Plot_PS_Negative
;
// True to create a negative board ps plot
/* Autorisation de trace des divers items en serigraphie */
/* Autorisation de trace des divers items en serigraphie */
bool
Sel_Texte_Reference
;
bool
Sel_Texte_Reference
;
bool
Sel_Texte_Valeur
;
bool
Sel_Texte_Valeur
;
bool
Sel_Texte_Divers
;
bool
Sel_Texte_Divers
;
bool
Sel_Texte_Invisible
;
bool
Sel_Texte_Invisible
;
bool
PlotPadsOnSilkLayer
;
bool
PlotPadsOnSilkLayer
;
bool
Plot_Pads_All_Layers
;
/* Plot pads meme n'appartenant pas a la
bool
Plot_Pads_All_Layers
;
/* Plot pads meme n'appartenant pas a la
couche ( utile pour serigraphie) */
*
couche ( utile pour serigraphie) */
/* id for plot format (see enum PlotFormat in plot_common.h) */
/* id for plot format (see enum PlotFormat in plot_common.h) */
int
PlotFormat
;
int
PlotFormat
;
int
PlotOrient
;
int
PlotOrient
;
int
PlotScaleOpt
;
int
PlotScaleOpt
;
enum
DrillShapeOptT
{
enum
DrillShapeOptT
{
NO_DRILL_SHAPE
=
0
,
NO_DRILL_SHAPE
=
0
,
SMALL_DRILL_SHAPE
=
1
,
SMALL_DRILL_SHAPE
=
1
,
FULL_DRILL_SHAPE
=
2
FULL_DRILL_SHAPE
=
2
};
};
DrillShapeOptT
DrillShapeOpt
;
DrillShapeOptT
DrillShapeOpt
;
double
Scale
;
double
Scale
;
double
ScaleAdjX
;
double
ScaleAdjX
;
double
ScaleAdjY
;
double
ScaleAdjY
;
public
:
PCB_Plot_Options
();
};
};
extern
PCB_Plot_Options
g_pcb_plot_options
;
extern
PCB_Plot_Options
g_pcb_plot_options
;
...
@@ -65,29 +70,29 @@ extern PCB_Plot_Options g_pcb_plot_options;
...
@@ -65,29 +70,29 @@ extern PCB_Plot_Options g_pcb_plot_options;
/*************************************/
/*************************************/
/* PLOT_RTN.CC */
/* PLOT_RTN.CC */
void
PlotTextePcb
(
Plotter
*
plotter
,
TEXTE_PCB
*
pt_texte
,
int
masque_layer
,
void
PlotTextePcb
(
Plotter
*
plotter
,
TEXTE_PCB
*
pt_texte
,
int
masque_layer
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules,
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules,
* prepare les parametres de trace de texte */
* prepare les parametres de trace de texte */
void
PlotDrawSegment
(
Plotter
*
plotter
,
DRAWSEGMENT
*
PtSegm
,
int
masque_layer
,
void
PlotDrawSegment
(
Plotter
*
plotter
,
DRAWSEGMENT
*
PtSegm
,
int
masque_layer
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
void
PlotCotation
(
Plotter
*
plotter
,
COTATION
*
Cotation
,
int
masque_layer
,
void
PlotCotation
(
Plotter
*
plotter
,
COTATION
*
Cotation
,
int
masque_layer
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
void
PlotMirePcb
(
Plotter
*
plotter
,
MIREPCB
*
PtMire
,
int
masque_layer
,
void
PlotMirePcb
(
Plotter
*
plotter
,
MIREPCB
*
PtMire
,
int
masque_layer
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
void
Plot_1_EdgeModule
(
Plotter
*
plotter
,
EDGE_MODULE
*
PtEdge
,
void
Plot_1_EdgeModule
(
Plotter
*
plotter
,
EDGE_MODULE
*
PtEdge
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
void
PlotFilledAreas
(
Plotter
*
plotter
,
ZONE_CONTAINER
*
aZone
,
void
PlotFilledAreas
(
Plotter
*
plotter
,
ZONE_CONTAINER
*
aZone
,
GRTraceMode
trace_mode
);
GRTraceMode
trace_mode
);
/* PLOTGERB.CPP */
/* PLOTGERB.CPP */
void
SelectD_CODE_For_LineDraw
(
Plotter
*
plotter
,
int
aSize
);
void
SelectD_CODE_For_LineDraw
(
Plotter
*
plotter
,
int
aSize
);
#endif
/* #define PCBPLOT_H */
#endif
/* #define PCBPLOT_H */
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