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
e37372f4
Commit
e37372f4
authored
Feb 21, 2013
by
Baranovskiy Konstantin
Committed by
Wayne Stambaugh
Feb 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema border and title block DXF plot color bug fix.
parent
72e845b2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
29 deletions
+38
-29
common_plot_functions.cpp
common/common_plot_functions.cpp
+29
-27
lib_text.cpp
eeschema/lib_text.cpp
+9
-1
plot_schematic_DXF.cpp
eeschema/plot_schematic_DXF.cpp
+0
-1
No files found.
common/common_plot_functions.cpp
View file @
e37372f4
...
...
@@ -71,7 +71,9 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
int
UpperLimit
=
VARIABLE_BLOCK_START_POSITION
;
#endif
plotter
->
SetColor
(
BLACK
);
EDA_COLOR_T
plotClr
;
plotClr
=
plotter
->
GetColorMode
()
?
RED
:
BLACK
;
plotter
->
SetColor
(
plotClr
);
plotter
->
SetCurrentLineWidth
(
PLOTTER
::
DEFAULT_LINE_WIDTH
);
// Plot edge.
...
...
@@ -150,7 +152,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
case
WS_PODPIS_LU
:
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_VERT
,
text_size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_BOTTOM
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -205,7 +207,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
pos
.
x
=
(
ii
-
gxpas
/
2
)
*
iusPerMil
;
pos
.
y
=
(
ref
.
y
+
GRID_REF_W
/
2
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -221,7 +223,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
}
pos
.
x
=
(
ii
-
gxpas
/
2
)
*
iusPerMil
;
pos
.
y
=
(
yg
-
GRID_REF_W
/
2
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -247,7 +249,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
}
pos
.
x
=
(
ref
.
x
+
GRID_REF_W
/
2
)
*
iusPerMil
;
pos
.
y
=
(
ii
-
gypas
/
2
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -264,7 +266,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
pos
.
x
=
(
xg
-
GRID_REF_W
/
2
)
*
iusPerMil
;
pos
.
y
=
(
ii
-
gypas
/
2
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
}
...
...
@@ -310,7 +312,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
case
WS_PODPIS
:
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -324,7 +326,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
WsItem
->
m_Legende
;
if
(
aNumberOfSheets
>
1
)
msg
<<
aSheetNumber
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -334,7 +336,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
msg
<<
aNumberOfSheets
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -344,7 +346,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetCompany
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size1_5
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -355,7 +357,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetTitle
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size1_5
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -366,13 +368,13 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetComment1
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size3
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
pos
.
x
=
(
aPageInfo
.
GetLeftMarginMils
()
+
1260
)
*
iusPerMil
;
pos
.
y
=
(
aPageInfo
.
GetTopMarginMils
()
+
270
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
.
GetData
(),
1800
,
text_size2
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -383,7 +385,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetComment2
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -394,7 +396,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetComment3
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -405,7 +407,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetComment4
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -440,13 +442,13 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
msg
=
aTitleBlock
.
GetComment1
();
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size3
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
pos
.
x
=
(
aPageInfo
.
GetLeftMarginMils
()
+
1260
)
*
iusPerMil
;
pos
.
y
=
(
aPageInfo
.
GetTopMarginMils
()
+
270
)
*
iusPerMil
;
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
1800
,
text_size2
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
...
...
@@ -456,7 +458,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
case
WS_PODPIS_D
:
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
plotter
->
Text
(
pos
,
BLACK
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
break
;
...
...
@@ -465,7 +467,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
if
(
WsItem
->
m_Legende
)
msg
=
WsItem
->
m_Legende
;
msg
<<
aSheetNumber
;
plotter
->
Text
(
pos
,
BLACK
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
false
,
false
);
break
;
...
...
@@ -593,7 +595,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
if
(
!
msg
.
IsEmpty
()
)
{
plotter
->
Text
(
pos
,
BLACK
,
plotter
->
Text
(
pos
,
plotClr
,
msg
,
TEXT_ORIENT_HORIZ
,
text_size
,
GR_TEXT_HJUSTIFY_LEFT
,
GR_TEXT_VJUSTIFY_CENTER
,
PLOTTER
::
DEFAULT_LINE_WIDTH
,
bold
,
false
);
...
...
eeschema/lib_text.cpp
View file @
e37372f4
...
...
@@ -318,7 +318,15 @@ void LIB_TEXT::Plot( PLOTTER* plotter, const wxPoint& offset, bool fill,
int
t1
=
(
aTransform
.
x1
!=
0
)
^
(
m_Orient
!=
0
);
wxPoint
pos
=
aTransform
.
TransformCoordinate
(
m_Pos
)
+
offset
;
plotter
->
Text
(
pos
,
UNSPECIFIED_COLOR
,
m_Text
,
// Get color
EDA_COLOR_T
color
;
if
(
plotter
->
GetColorMode
()
)
// Used normal color or selected color
color
=
IsSelected
()
?
GetItemSelectedColor
()
:
GetDefaultColor
();
else
color
=
BLACK
;
plotter
->
Text
(
pos
,
color
,
m_Text
,
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
,
m_Size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
GetPenSize
(),
m_Italic
,
m_Bold
);
...
...
eeschema/plot_schematic_DXF.cpp
View file @
e37372f4
...
...
@@ -129,7 +129,6 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
if
(
aPlotFrameRef
)
{
plotter
->
SetColor
(
BLACK
);
PlotWorkSheet
(
plotter
,
m_parent
->
GetTitleBlock
(),
m_parent
->
GetPageSettings
(),
aScreen
->
m_ScreenNumber
,
aScreen
->
m_NumberOfScreens
,
...
...
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