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
44071acf
Commit
44071acf
authored
Jun 30, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lorenzo's postscript fill patch for bugs 2003834 and 1956732
parent
0cdcd78b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
101 additions
and
59 deletions
+101
-59
common_plotHPGL_functions.cpp
common/common_plotHPGL_functions.cpp
+18
-2
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+34
-13
plot.cpp
eeschema/plot.cpp
+26
-16
plothpgl.cpp
eeschema/plothpgl.cpp
+1
-1
plotps.cpp
eeschema/plotps.cpp
+1
-1
protos.h
eeschema/protos.h
+1
-1
plot_common.h
include/plot_common.h
+6
-4
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+2
-2
plotps.cpp
pcbnew/plotps.cpp
+2
-2
specctra_export.cpp
pcbnew/specctra_export.cpp
+0
-16
specctra_import.cpp
pcbnew/specctra_import.cpp
+10
-1
No files found.
common/common_plotHPGL_functions.cpp
View file @
44071acf
...
@@ -68,9 +68,25 @@ bool CloseFileHPGL( FILE* plot_file )
...
@@ -68,9 +68,25 @@ bool CloseFileHPGL( FILE* plot_file )
return
TRUE
;
return
TRUE
;
}
}
/************************************************************/
void
PlotRectHPGL
(
wxPoint
p1
,
wxPoint
p2
,
int
fill
,
int
width
)
/************************************************************/
{
char
Line
[
256
];
UserToDeviceCoordinate
(
p1
);
UserToDeviceCoordinate
(
p2
);
Plume_HPGL
(
'U'
);
sprintf
(
Line
,
"PA %d,%d;EA %d,%d;
\n
"
,
p1
.
x
,
p1
.
y
,
p2
.
x
,
p2
.
y
);
fputs
(
Line
,
PlotOutputFile
);
Plume_HPGL
(
'U'
);
return
;
}
/************************************************************/
/************************************************************/
void
PlotCircle
_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
)
void
PlotCircle
HPGL
(
wxPoint
centre
,
int
diameter
,
int
fill
,
int
width
)
/************************************************************/
/************************************************************/
{
{
int
rayon
;
int
rayon
;
...
@@ -91,7 +107,7 @@ void PlotCircle_HPGL( wxPoint centre, int diameter, int width )
...
@@ -91,7 +107,7 @@ void PlotCircle_HPGL( wxPoint centre, int diameter, int width )
/********************************************************************/
/********************************************************************/
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
)
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
fill
,
int
width
)
/********************************************************************/
/********************************************************************/
/* trace d'un arc de cercle:
/* trace d'un arc de cercle:
...
...
common/common_plotPS_functions.cpp
View file @
44071acf
...
@@ -113,9 +113,20 @@ void PlotFilledSegmentPS( wxPoint start, wxPoint end, int width )
...
@@ -113,9 +113,20 @@ void PlotFilledSegmentPS( wxPoint start, wxPoint end, int width )
fprintf
(
PlotOutputFile
,
"%d %d %d %d line
\n
"
,
start
.
x
,
start
.
y
,
end
.
x
,
end
.
y
);
fprintf
(
PlotOutputFile
,
"%d %d %d %d line
\n
"
,
start
.
x
,
start
.
y
,
end
.
x
,
end
.
y
);
}
}
/***************************************************************/
void
PlotRectPS
(
wxPoint
p1
,
wxPoint
p2
,
int
fill
,
int
width
)
/***************************************************************/
{
UserToDeviceCoordinate
(
p1
);
UserToDeviceCoordinate
(
p2
);
SetCurrentLineWidthPS
(
width
);
fprintf
(
PlotOutputFile
,
"%d %d %d %d rect%d
\n
"
,
p1
.
x
,
p1
.
y
,
p2
.
x
-
p1
.
x
,
p2
.
y
-
p1
.
y
,
fill
);
}
/******************************************************/
/******************************************************/
void
PlotCircle
_PS
(
wxPoint
pos
,
int
diametre
,
int
width
)
void
PlotCircle
PS
(
wxPoint
pos
,
int
diametre
,
int
fill
,
int
width
)
/******************************************************/
/******************************************************/
{
{
int
rayon
;
int
rayon
;
...
@@ -128,13 +139,13 @@ void PlotCircle_PS( wxPoint pos, int diametre, int width )
...
@@ -128,13 +139,13 @@ void PlotCircle_PS( wxPoint pos, int diametre, int width )
rayon
=
0
;
rayon
=
0
;
SetCurrentLineWidthPS
(
width
);
SetCurrentLineWidthPS
(
width
);
sprintf
(
Line
,
"newpath %d %d %d 0 360 arc stroke
\n
"
,
pos
.
x
,
pos
.
y
,
rayon
);
sprintf
(
Line
,
"%d %d %d cir%d
\n
"
,
pos
.
x
,
pos
.
y
,
rayon
,
fill
);
fputs
(
Line
,
PlotOutputFile
);
fputs
(
Line
,
PlotOutputFile
);
}
}
/**************************************************************************************/
/**************************************************************************************/
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
)
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
fill
,
int
width
)
/**************************************************************************************/
/**************************************************************************************/
/* Plot an arc:
/* Plot an arc:
...
@@ -152,11 +163,13 @@ void PlotArcPS( wxPoint centre, int StAngle, int EndAngle, int rayon, int width
...
@@ -152,11 +163,13 @@ void PlotArcPS( wxPoint centre, int StAngle, int EndAngle, int rayon, int width
UserToDeviceCoordinate
(
centre
);
UserToDeviceCoordinate
(
centre
);
if
(
PlotOrientOptions
==
PLOT_MIROIR
)
if
(
PlotOrientOptions
==
PLOT_MIROIR
)
sprintf
(
Line
,
"newpath %d %d %d %f %f arc stroke
\n
"
,
centre
.
x
,
centre
.
y
,
sprintf
(
Line
,
"%d %d %d %f %f arc%d
\n
"
,
centre
.
x
,
centre
.
y
,
(
int
)
(
rayon
*
XScale
),
(
float
)
StAngle
/
10
,
(
float
)
EndAngle
/
10
);
(
int
)
(
rayon
*
XScale
),
(
float
)
StAngle
/
10
,
(
float
)
EndAngle
/
10
,
fill
);
else
else
sprintf
(
Line
,
"newpath %d %d %d %f %f arc stroke
\n
"
,
centre
.
x
,
centre
.
y
,
sprintf
(
Line
,
"%d %d %d %f %f arc%d
\n
"
,
centre
.
x
,
centre
.
y
,
(
int
)
(
rayon
*
XScale
),
-
(
float
)
EndAngle
/
10
,
-
(
float
)
StAngle
/
10
);
(
int
)
(
rayon
*
XScale
),
-
(
float
)
EndAngle
/
10
,
-
(
float
)
StAngle
/
10
,
fill
);
// Undo internationalization printf (float x.y printed x,y)
// Undo internationalization printf (float x.y printed x,y)
to_point
(
Line
);
to_point
(
Line
);
...
@@ -197,11 +210,7 @@ void PlotPolyPS( int nb_segm, int* coord, int fill, int width )
...
@@ -197,11 +210,7 @@ void PlotPolyPS( int nb_segm, int* coord, int fill, int width )
}
}
// Fermeture du polygone
// Fermeture du polygone
if
(
fill
)
fprintf
(
PlotOutputFile
,
"poly%d
\n
"
,
fill
);
fprintf
(
PlotOutputFile
,
"closepath "
);
if
(
fill
==
1
)
fprintf
(
PlotOutputFile
,
"fill "
);
fprintf
(
PlotOutputFile
,
"stroke
\n
"
);
}
}
...
@@ -260,7 +269,19 @@ void PrintHeaderPS( FILE* file, const wxString& Creator,
...
@@ -260,7 +269,19 @@ void PrintHeaderPS( FILE* file, const wxString& Creator,
" moveto
\n
"
,
" moveto
\n
"
,
" lineto
\n
"
,
" lineto
\n
"
,
" stroke
\n
"
,
" stroke
\n
"
,
"} def
\n
"
,
"} bind def
\n
"
,
"/cir0 { newpath 0 360 arc stroke } bind def
\n
"
,
"/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def
\n
"
,
"/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def
\n
"
,
"/arc0 { newpath arc stroke } bind def
\n
"
,
"/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill grestore stroke } bind def
\n
"
,
"/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill grestore stroke } bind def
\n
"
,
"/poly0 { stroke } bind def
\n
"
,
"/poly1 { closepath gsave fill grestore stroke } bind def
\n
"
,
"/poly2 { closepath gsave fill grestore stroke } bind def
\n
"
,
"/rect0 { rectstroke } bind def
\n
"
,
"/rect1 { rectfill } bind def
\n
"
,
"/rect2 { rectfill } bind def
\n
"
,
"gsave
\n
"
,
"gsave
\n
"
,
"72 72 scale
\t\t\t
% Talk inches
\n
"
,
"72 72 scale
\t\t\t
% Talk inches
\n
"
,
"1 setlinecap
\n
"
,
"1 setlinecap
\n
"
,
...
...
eeschema/plot.cpp
View file @
44071acf
...
@@ -73,9 +73,24 @@ void SetCurrentLineWidth( int width )
...
@@ -73,9 +73,24 @@ void SetCurrentLineWidth( int width )
}
}
}
}
/*******************************************************************************/
void
PlotRect
(
wxPoint
p1
,
wxPoint
p2
,
int
fill
,
int
width
)
/*******************************************************************************/
{
switch
(
g_PlotFormat
)
{
case
PLOT_FORMAT_HPGL
:
PlotRectHPGL
(
p1
,
p2
,
fill
,
width
);
break
;
case
PLOT_FORMAT_POST
:
PlotRectPS
(
p1
,
p2
,
fill
,
width
);
break
;
}
}
/*******************************************************************************/
/*******************************************************************************/
void
PlotArc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
)
void
PlotArc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
fill
,
int
width
)
/*******************************************************************************/
/*******************************************************************************/
/* trace d'un arc de cercle:
/* trace d'un arc de cercle:
...
@@ -87,28 +102,28 @@ void PlotArc( wxPoint centre, int StAngle, int EndAngle, int rayon, int width )
...
@@ -87,28 +102,28 @@ void PlotArc( wxPoint centre, int StAngle, int EndAngle, int rayon, int width )
switch
(
g_PlotFormat
)
switch
(
g_PlotFormat
)
{
{
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
PlotArcHPGL
(
centre
,
StAngle
,
EndAngle
,
rayon
,
width
);
PlotArcHPGL
(
centre
,
StAngle
,
EndAngle
,
rayon
,
fill
,
width
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotArcPS
(
centre
,
StAngle
,
EndAngle
,
rayon
,
width
);
PlotArcPS
(
centre
,
StAngle
,
EndAngle
,
rayon
,
fill
,
width
);
break
;
break
;
}
}
}
}
/*******************************************************/
/*******************************************************/
void
PlotCercle
(
wxPoint
pos
,
int
diametre
,
int
width
)
void
PlotCercle
(
wxPoint
pos
,
int
diametre
,
int
fill
,
int
width
)
/*******************************************************/
/*******************************************************/
{
{
switch
(
g_PlotFormat
)
switch
(
g_PlotFormat
)
{
{
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
PlotCircle
_HPGL
(
pos
,
diametre
,
width
);
PlotCircle
HPGL
(
pos
,
diametre
,
fill
,
width
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotCircle
_PS
(
pos
,
diametre
,
width
);
PlotCircle
PS
(
pos
,
diametre
,
fill
,
width
);
break
;
break
;
}
}
}
}
...
@@ -204,7 +219,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
...
@@ -204,7 +219,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
pos
.
y
=
PartY
+
TransMat
[
1
][
0
]
*
Arc
->
m_Pos
.
x
+
pos
.
y
=
PartY
+
TransMat
[
1
][
0
]
*
Arc
->
m_Pos
.
x
+
TransMat
[
1
][
1
]
*
Arc
->
m_Pos
.
y
;
TransMat
[
1
][
1
]
*
Arc
->
m_Pos
.
y
;
MapAngles
(
&
t1
,
&
t2
,
TransMat
);
MapAngles
(
&
t1
,
&
t2
,
TransMat
);
PlotArc
(
pos
,
t1
,
t2
,
Arc
->
m_Rayon
,
Arc
->
m_Width
);
PlotArc
(
pos
,
t1
,
t2
,
Arc
->
m_Rayon
,
Arc
->
m_
Fill
,
Arc
->
m_
Width
);
}
}
break
;
break
;
...
@@ -215,7 +230,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
...
@@ -215,7 +230,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
TransMat
[
0
][
1
]
*
Circle
->
m_Pos
.
y
;
TransMat
[
0
][
1
]
*
Circle
->
m_Pos
.
y
;
pos
.
y
=
PartY
+
TransMat
[
1
][
0
]
*
Circle
->
m_Pos
.
x
+
pos
.
y
=
PartY
+
TransMat
[
1
][
0
]
*
Circle
->
m_Pos
.
x
+
TransMat
[
1
][
1
]
*
Circle
->
m_Pos
.
y
;
TransMat
[
1
][
1
]
*
Circle
->
m_Pos
.
y
;
PlotCercle
(
pos
,
Circle
->
m_Rayon
*
2
,
Circle
->
m_Width
);
PlotCercle
(
pos
,
Circle
->
m_Rayon
*
2
,
Circle
->
m_
Fill
,
Circle
->
m_
Width
);
}
}
break
;
break
;
...
@@ -251,12 +266,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
...
@@ -251,12 +266,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
y2
=
PartY
+
TransMat
[
1
][
0
]
*
Square
->
m_End
.
x
y2
=
PartY
+
TransMat
[
1
][
0
]
*
Square
->
m_End
.
x
+
TransMat
[
1
][
1
]
*
Square
->
m_End
.
y
;
+
TransMat
[
1
][
1
]
*
Square
->
m_End
.
y
;
SetCurrentLineWidth
(
Square
->
m_Width
);
PlotRect
(
wxPoint
(
x1
,
y1
),
wxPoint
(
x2
,
y2
),
Square
->
m_Fill
,
Square
->
m_Width
);
Move_Plume
(
wxPoint
(
x1
,
y1
),
'U'
);
Move_Plume
(
wxPoint
(
x1
,
y2
),
'D'
);
Move_Plume
(
wxPoint
(
x2
,
y2
),
'D'
);
Move_Plume
(
wxPoint
(
x2
,
y1
),
'D'
);
Move_Plume
(
wxPoint
(
x1
,
y1
),
'D'
);
}
}
break
;
break
;
...
@@ -469,8 +479,8 @@ static void PlotPinSymbol( int posX, int posY, int len, int orient, int Shape )
...
@@ -469,8 +479,8 @@ static void PlotPinSymbol( int posX, int posY, int len, int orient, int Shape )
if
(
Shape
&
INVERT
)
if
(
Shape
&
INVERT
)
{
{
PlotCercle
(
wxPoint
(
MapX1
*
INVERT_PIN_RADIUS
+
x1
,
PlotCercle
(
wxPoint
(
MapX1
*
INVERT_PIN_RADIUS
+
x1
,
MapY1
*
INVERT_PIN_RADIUS
+
y1
),
MapY1
*
INVERT_PIN_RADIUS
+
y1
),
INVERT_PIN_RADIUS
*
2
);
INVERT_PIN_RADIUS
*
2
,
0
);
Move_Plume
(
wxPoint
(
MapX1
*
INVERT_PIN_RADIUS
*
2
+
x1
,
Move_Plume
(
wxPoint
(
MapX1
*
INVERT_PIN_RADIUS
*
2
+
x1
,
MapY1
*
INVERT_PIN_RADIUS
*
2
+
y1
),
'U'
);
MapY1
*
INVERT_PIN_RADIUS
*
2
+
y1
),
'U'
);
...
...
eeschema/plothpgl.cpp
View file @
44071acf
...
@@ -677,7 +677,7 @@ void WinEDA_PlotHPGLFrame::Plot_1_Page_HPGL( const wxString& FullFileName,
...
@@ -677,7 +677,7 @@ void WinEDA_PlotHPGLFrame::Plot_1_Page_HPGL( const wxString& FullFileName,
#undef STRUCT
#undef STRUCT
#define STRUCT ( (DrawJunctionStruct*) DrawList )
#define STRUCT ( (DrawJunctionStruct*) DrawList )
x1
=
STRUCT
->
m_Pos
.
x
;
y1
=
STRUCT
->
m_Pos
.
y
;
x1
=
STRUCT
->
m_Pos
.
x
;
y1
=
STRUCT
->
m_Pos
.
y
;
PlotCercle
(
wxPoint
(
x1
,
y1
),
DRAWJUNCTION_SIZE
*
2
);
PlotCercle
(
wxPoint
(
x1
,
y1
),
DRAWJUNCTION_SIZE
*
2
,
1
);
break
;
break
;
case
TYPE_SCH_TEXT
:
case
TYPE_SCH_TEXT
:
...
...
eeschema/plotps.cpp
View file @
44071acf
...
@@ -559,7 +559,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
...
@@ -559,7 +559,7 @@ void WinEDA_PlotPSFrame::PlotOneSheetPS( const wxString& FileName,
#define STRUCT ( (DrawJunctionStruct*) DrawList )
#define STRUCT ( (DrawJunctionStruct*) DrawList )
if
(
g_PlotPSColorOpt
)
if
(
g_PlotPSColorOpt
)
SetColorMapPS
(
ReturnLayerColor
(
STRUCT
->
GetLayer
()
)
);
SetColorMapPS
(
ReturnLayerColor
(
STRUCT
->
GetLayer
()
)
);
PlotCercle
(
STRUCT
->
m_Pos
,
DRAWJUNCTION_SIZE
);
PlotCercle
(
STRUCT
->
m_Pos
,
DRAWJUNCTION_SIZE
,
1
);
break
;
break
;
case
TYPE_SCH_TEXT
:
case
TYPE_SCH_TEXT
:
...
...
eeschema/protos.h
View file @
44071acf
...
@@ -290,7 +290,7 @@ int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
...
@@ -290,7 +290,7 @@ int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
void
SetCurrentLineWidth
(
int
width
);
void
SetCurrentLineWidth
(
int
width
);
void
PlotArc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotArc
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotCercle
(
wxPoint
centre
,
int
diametre
,
int
width
=
-
1
);
void
PlotCercle
(
wxPoint
centre
,
int
diametre
,
int
fill
,
int
width
=
-
1
);
void
PlotPoly
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotPoly
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotNoConnectStruct
(
DrawNoConnectStruct
*
Struct
);
void
PlotNoConnectStruct
(
DrawNoConnectStruct
*
Struct
);
...
...
include/plot_common.h
View file @
44071acf
...
@@ -61,8 +61,9 @@ void InitPlotParametresPS( wxPoint offset,
...
@@ -61,8 +61,9 @@ void InitPlotParametresPS( wxPoint offset,
double
yscale
,
double
yscale
,
int
orient
=
0
);
int
orient
=
0
);
void
SetDefaultLineWidthPS
(
int
width
);
void
SetDefaultLineWidthPS
(
int
width
);
void
PlotCircle_PS
(
wxPoint
pos
,
int
diametre
,
int
width
=
-
1
);
void
PlotRectPS
(
wxPoint
p1
,
wxPoint
p2
,
int
fill
,
int
width
=
-
1
);
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotCirclePS
(
wxPoint
pos
,
int
diametre
,
int
fill
,
int
width
=
-
1
);
void
PlotArcPS
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
fill
,
int
width
=
-
1
);
// Plot an arc: StAngle, EndAngle = start and end arc in 0.1 degree
// Plot an arc: StAngle, EndAngle = start and end arc in 0.1 degree
void
PlotPolyPS
(
int
nb_segm
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotPolyPS
(
int
nb_segm
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
...
@@ -84,8 +85,9 @@ void SetColorMapPS( int color );
...
@@ -84,8 +85,9 @@ void SetColorMapPS( int color );
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
=
0
);
void
InitPlotParametresHPGL
(
wxPoint
offset
,
double
xscale
,
double
yscale
,
int
orient
=
0
);
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
);
bool
PrintHeaderHPGL
(
FILE
*
plot_file
,
int
pen_speed
,
int
pen_num
);
bool
CloseFileHPGL
(
FILE
*
plot_file
);
bool
CloseFileHPGL
(
FILE
*
plot_file
);
void
PlotCircle_HPGL
(
wxPoint
centre
,
int
diameter
,
int
width
=
-
1
);
void
PlotCircleHPGL
(
wxPoint
centre
,
int
diameter
,
int
fill
,
int
width
=
-
1
);
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
width
=
-
1
);
void
PlotRectHPGL
(
wxPoint
t1
,
wxPoint
t2
,
int
fill
,
int
width
=
-
1
);
void
PlotArcHPGL
(
wxPoint
centre
,
int
StAngle
,
int
EndAngle
,
int
rayon
,
int
fill
,
int
width
=
-
1
);
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
PlotPolyHPGL
(
int
nb
,
int
*
coord
,
int
fill
,
int
width
=
-
1
);
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
);
void
Move_Plume_HPGL
(
wxPoint
pos
,
int
plume
);
void
Plume_HPGL
(
int
plume
);
void
Plume_HPGL
(
int
plume
);
...
...
pcbnew/plot_rtn.cpp
View file @
44071acf
...
@@ -791,7 +791,7 @@ void PlotCircle( int format_plot, int thickness, wxPoint centre, int radius )
...
@@ -791,7 +791,7 @@ void PlotCircle( int format_plot, int thickness, wxPoint centre, int radius )
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotCircle
_PS
(
centre
,
radius
*
2
,
thickness
);
PlotCircle
PS
(
centre
,
radius
*
2
,
thickness
,
0
);
break
;
break
;
}
}
}
}
...
@@ -837,7 +837,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -837,7 +837,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
if
(
IsPostScript
(
format_plot
)
)
if
(
IsPostScript
(
format_plot
)
)
{
{
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
radius
,
thickness
);
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
radius
,
thickness
,
0
);
return
;
return
;
}
}
...
...
pcbnew/plotps.cpp
View file @
44071acf
...
@@ -543,8 +543,8 @@ void trace_1_pastille_OVALE_POST( wxPoint pos, wxSize size, int orient, int mode
...
@@ -543,8 +543,8 @@ void trace_1_pastille_OVALE_POST( wxPoint pos, wxSize size, int orient, int mode
rayon
=
1
;
rayon
=
1
;
if
(
rayon
<
w
)
if
(
rayon
<
w
)
w
=
rayon
;
w
=
rayon
;
PlotArcPS
(
wxPoint
(
pos
.
x
+
x1
,
pos
.
y
+
y1
),
-
orient
,
-
orient
+
1800
,
rayon
,
w
);
PlotArcPS
(
wxPoint
(
pos
.
x
+
x1
,
pos
.
y
+
y1
),
-
orient
,
-
orient
+
1800
,
rayon
,
w
,
0
);
PlotArcPS
(
wxPoint
(
pos
.
x
+
x0
,
pos
.
y
+
y0
),
-
orient
+
1800
,
-
orient
,
rayon
,
w
);
PlotArcPS
(
wxPoint
(
pos
.
x
+
x0
,
pos
.
y
+
y0
),
-
orient
+
1800
,
-
orient
,
rayon
,
w
,
0
);
x0
=
-
rayon
;
x0
=
-
rayon
;
y0
=
-
delta
/
2
;
y0
=
-
delta
/
2
;
...
...
pcbnew/specctra_export.cpp
View file @
44071acf
...
@@ -132,26 +132,10 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
...
@@ -132,26 +132,10 @@ void WinEDA_PcbFrame::ExportToSpecctra( wxCommandEvent& event )
namespace
DSN
{
namespace
DSN
{
struct
POINT_PAIR
{
POINT
start
;
POINT
end
;
BOARD_ITEM
*
item
;
///< the item which has these points, TRACK or DRAWSEGMENT
};
typedef
std
::
vector
<
POINT_PAIR
>
POINT_PAIRS
;
const
KICAD_T
SPECCTRA_DB
::
scanPADs
[]
=
{
TYPEPAD
,
EOT
};
const
KICAD_T
SPECCTRA_DB
::
scanPADs
[]
=
{
TYPEPAD
,
EOT
};
static
inline
void
swap
(
POINT_PAIR
&
pair
)
{
POINT
temp
=
pair
.
start
;
pair
.
start
=
pair
.
end
;
pair
.
end
=
temp
;
}
/**
/**
* Function scale
* Function scale
* converts a distance from kicad units to our reported specctra dsn units:
* converts a distance from kicad units to our reported specctra dsn units:
...
...
pcbnew/specctra_import.cpp
View file @
44071acf
...
@@ -122,6 +122,15 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
...
@@ -122,6 +122,15 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
namespace
DSN
{
namespace
DSN
{
/**
* Function scale
* converts a session file distance to Kicad units of deci-mils.
* @param distance The session file length to convert.
* @param aResolution The session UNIT_RES which holds the engineering unit
* specifier
* @return int - The Kicad length in deci-mils
*/
static
int
scale
(
double
distance
,
UNIT_RES
*
aResolution
)
static
int
scale
(
double
distance
,
UNIT_RES
*
aResolution
)
{
{
double
resValue
=
aResolution
->
GetValue
();
double
resValue
=
aResolution
->
GetValue
();
...
@@ -152,7 +161,7 @@ static int scale( double distance, UNIT_RES* aResolution )
...
@@ -152,7 +161,7 @@ static int scale( double distance, UNIT_RES* aResolution )
// used within Kicad.
// used within Kicad.
factor
*=
10.0
;
factor
*=
10.0
;
int
ret
=
(
int
)
round
(
factor
*
distance
/
resValue
);
int
ret
=
(
int
)
round
(
factor
*
distance
/
resValue
);
return
ret
;
return
ret
;
}
}
...
...
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