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
f9cc325b
Commit
f9cc325b
authored
Dec 27, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew, 3D viewer: fix incorrect position of multiline texts.
parent
517ca83f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
eda_text.cpp
common/eda_text.cpp
+1
-1
eda_text.h
include/eda_text.h
+1
-1
board_items_to_polygon_shape_transform.cpp
pcbnew/board_items_to_polygon_shape_transform.cpp
+6
-9
No files found.
common/eda_text.cpp
View file @
f9cc325b
...
...
@@ -295,7 +295,7 @@ void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
void
EDA_TEXT
::
GetPositionsOfLinesOfMultilineText
(
std
::
vector
<
wxPoint
>&
aPositions
,
int
aLineCount
)
std
::
vector
<
wxPoint
>&
aPositions
,
int
aLineCount
)
const
{
wxPoint
pos
=
m_Pos
;
// Position of first line of the
// multiline text according to
...
...
include/eda_text.h
View file @
f9cc325b
...
...
@@ -275,7 +275,7 @@ public:
* for efficiency reasons
*/
void
GetPositionsOfLinesOfMultilineText
(
std
::
vector
<
wxPoint
>&
aPositions
,
int
aLineCount
);
std
::
vector
<
wxPoint
>&
aPositions
,
int
aLineCount
)
const
;
/**
* Function Format
* outputs the object to \a aFormatter in s-expression form.
...
...
pcbnew/board_items_to_polygon_shape_transform.cpp
View file @
f9cc325b
...
...
@@ -290,22 +290,19 @@ void TEXTE_PCB::TransformShapeWithClearanceToPolygonSet(
if
(
IsMultilineAllowed
()
)
{
wxPoint
pos
=
GetTextPosition
();
wxArrayString
*
list
=
wxStringSplit
(
GetText
(),
'\n'
);
wxPoint
offset
;
std
::
vector
<
wxPoint
>
positions
;
positions
.
reserve
(
list
->
Count
()
);
GetPositionsOfLinesOfMultilineText
(
positions
,
list
->
Count
()
);
offset
.
y
=
GetInterline
();
RotatePoint
(
&
offset
,
GetOrientation
()
);
for
(
unsigned
i
=
0
;
i
<
list
->
Count
();
i
++
)
for
(
unsigned
ii
=
0
;
ii
<
list
->
Count
();
ii
++
)
{
wxString
txt
=
list
->
Item
(
i
);
DrawGraphicText
(
NULL
,
NULL
,
pos
,
color
,
wxString
txt
=
list
->
Item
(
i
i
);
DrawGraphicText
(
NULL
,
NULL
,
pos
itions
[
ii
]
,
color
,
txt
,
GetOrientation
(),
size
,
GetHorizJustify
(),
GetVertJustify
(),
GetThickness
(),
IsItalic
(),
true
,
addTextSegmToPoly
);
pos
+=
offset
;
}
delete
list
;
...
...
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