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
94db11a8
Commit
94db11a8
authored
Nov 17, 2013
by
Baranovskiy Konstantin
Committed by
Wayne Stambaugh
Nov 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix justification of vertically aligned multi-line text.
parent
4c8bff9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
eda_text.cpp
common/eda_text.cpp
+12
-3
No files found.
common/eda_text.cpp
View file @
94db11a8
...
...
@@ -40,7 +40,7 @@
// because the text position is sometimes critical.
// Currently, this change is broken for rotated or mirrored texts,
// so keep this line commented until there are fixes
//
#define FIX_MULTILINE_VERT_JUSTIF
#define FIX_MULTILINE_VERT_JUSTIF
// Conversion to application internal units defined at build time.
#if defined( PCBNEW )
...
...
@@ -267,9 +267,13 @@ void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
{
if
(
m_MultilineAllowed
)
{
wxPoint
pos
=
m_Pos
;
wxArrayString
*
list
=
wxStringSplit
(
m_Text
,
'\n'
);
wxPoint
offset
;
wxPoint
pos
=
m_Pos
;
// Position of first line of the
// multiline text according to
// the center of the multiline text block
wxPoint
offset
;
// Offset to next line.
offset
.
y
=
GetInterline
();
...
...
@@ -290,7 +294,12 @@ void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset,
break
;
}
}
// Rotate the position of the first line
// around the center of the multiline text block
RotatePoint
(
&
pos
,
m_Pos
,
m_Orient
);
#endif
// Rotate the offset lines to increase happened in the right direction
RotatePoint
(
&
offset
,
m_Orient
);
for
(
unsigned
i
=
0
;
i
<
list
->
Count
();
i
++
)
...
...
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