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
ee3e97e6
Commit
ee3e97e6
authored
Apr 19, 2014
by
Nick Østergaard
Committed by
jean-pierre charras
Apr 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vertical offset for multiline text in VRML exporter.
parent
5f65d0da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
export_vrml.cpp
pcbnew/exporters/export_vrml.cpp
+19
-21
No files found.
pcbnew/exporters/export_vrml.cpp
View file @
ee3e97e6
...
...
@@ -600,38 +600,36 @@ static void export_vrml_pcbtext( MODEL_VRML& aModel, TEXTE_PCB* text )
if
(
text
->
IsMirrored
()
)
NEGATE
(
size
.
x
);
EDA_COLOR_T
color
=
BLACK
;
// not actually used, but needed by DrawGraphicText
if
(
text
->
IsMultilineAllowed
()
)
{
wxPoint
pos
=
text
->
GetTextPosition
();
wxArrayString
*
list
=
wxStringSplit
(
text
->
GetText
(),
'\n'
);
wxPoint
offset
;
offset
.
y
=
text
->
GetInterline
();
RotatePoint
(
&
offset
,
text
->
GetOrientation
()
);
std
::
vector
<
wxPoint
>
positions
;
positions
.
reserve
(
list
->
Count
()
);
text
->
GetPositionsOfLinesOfMultilineText
(
positions
,
list
->
Count
()
);
for
(
unsigned
i
=
0
;
i
<
list
->
Count
();
i
++
)
for
(
unsigned
i
i
=
0
;
ii
<
list
->
Count
();
i
i
++
)
{
wxString
txt
=
list
->
Item
(
i
);
DrawGraphicText
(
NULL
,
NULL
,
pos
,
BLACK
,
txt
,
text
->
GetOrientation
(),
size
,
text
->
GetHorizJustify
(),
text
->
GetVertJustify
(),
text
->
GetThickness
(),
text
->
IsItalic
(),
true
,
vrml_text_callback
);
pos
+=
offset
;
wxString
txt
=
list
->
Item
(
ii
);
DrawGraphicText
(
NULL
,
NULL
,
positions
[
ii
],
color
,
txt
,
text
->
GetOrientation
(),
size
,
text
->
GetHorizJustify
(),
text
->
GetVertJustify
(),
text
->
GetThickness
(),
text
->
IsItalic
(),
true
,
vrml_text_callback
);
}
delete
(
list
);
}
else
{
DrawGraphicText
(
NULL
,
NULL
,
text
->
GetTextPosition
(),
BLACK
,
text
->
GetText
(),
text
->
GetOrientation
(),
size
,
text
->
GetHorizJustify
(),
text
->
GetVertJustify
(),
text
->
GetThickness
(),
text
->
IsItalic
(),
true
,
vrml_text_callback
);
DrawGraphicText
(
NULL
,
NULL
,
text
->
GetTextPosition
(),
color
,
text
->
GetText
(),
text
->
GetOrientation
(),
size
,
text
->
GetHorizJustify
(),
text
->
GetVertJustify
(),
text
->
GetThickness
(),
text
->
IsItalic
(),
true
,
vrml_text_callback
);
}
}
...
...
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