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
27386696
Commit
27386696
authored
Aug 21, 2009
by
peud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PS plotting was broken in B/W mode, made neccessary changes.
parent
22f66571
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
common_plotPS_functions.cpp
common/common_plotPS_functions.cpp
+33
-13
No files found.
common/common_plotPS_functions.cpp
View file @
27386696
...
@@ -72,21 +72,41 @@ void PS_Plotter::set_color( int color )
...
@@ -72,21 +72,41 @@ void PS_Plotter::set_color( int color )
*/
*/
{
{
wxASSERT
(
output_file
);
wxASSERT
(
output_file
);
if
((
color
>=
0
&&
color_mode
)
||
(
color
==
BLACK
)
/* Return at invalid color index */
||
(
color
==
WHITE
))
if
(
color
<
0
)
return
;
if
(
color_mode
)
{
{
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
[
color
].
m_Red
/
255
,
(
double
)
1.0
-
ColorRefs
[
color
].
m_Red
/
255
,
(
double
)
1.0
-
ColorRefs
[
color
].
m_Green
/
255
,
(
double
)
1.0
-
ColorRefs
[
color
].
m_Green
/
255
,
(
double
)
1.0
-
ColorRefs
[
color
].
m_Blue
/
255
);
(
double
)
1.0
-
ColorRefs
[
color
].
m_Blue
/
255
);
else
}
else
{
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
(
double
)
ColorRefs
[
color
].
m_Red
/
255
,
(
double
)
ColorRefs
[
color
].
m_Red
/
255
,
(
double
)
ColorRefs
[
color
].
m_Green
/
255
,
(
double
)
ColorRefs
[
color
].
m_Green
/
255
,
(
double
)
ColorRefs
[
color
].
m_Blue
/
255
);
(
double
)
ColorRefs
[
color
].
m_Blue
/
255
);
}
}
}
else
/* B/W Mode - Use BLACK for all items */
{
/* Why invert in this mode. Does anyway WHITE! */
if
(
negative_mode
)
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Red
/
255
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Green
/
255
,
(
double
)
1.0
-
ColorRefs
[
BLACK
].
m_Blue
/
255
);
else
fprintf
(
output_file
,
"%.3g %.3g %.3g setrgbcolor
\n
"
,
(
double
)
ColorRefs
[
BLACK
].
m_Red
/
255
,
(
double
)
ColorRefs
[
BLACK
].
m_Green
/
255
,
(
double
)
ColorRefs
[
BLACK
].
m_Blue
/
255
);
}
}
}
void
PS_Plotter
::
set_dash
(
bool
dashed
)
void
PS_Plotter
::
set_dash
(
bool
dashed
)
...
...
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