mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 07:02:29 +02:00
eeshow/text.c (text_fig): correct vertical alignment of multi-line text
We used the first line as alignment point, not the last line.
This commit is contained in:
parent
6fe19f52e9
commit
a03f41a845
@ -99,9 +99,15 @@ void text_fig(const struct text *txt, int color, unsigned layer)
|
|||||||
const char *s;
|
const char *s;
|
||||||
int x = txt->x;
|
int x = txt->x;
|
||||||
int y = txt->y;
|
int y = txt->y;
|
||||||
|
unsigned multiline = 0;
|
||||||
|
|
||||||
x += rx(0, align(txt->size, txt->vert), txt->rot);
|
for (s = txt->s; *s; s++)
|
||||||
y += ry(0, align(txt->size, txt->vert), txt->rot);
|
if (*s == '\n')
|
||||||
|
multiline += NEWLINE_SKIP * txt->size;
|
||||||
|
x += rx(0, align(txt->size + multiline, txt->vert) - multiline,
|
||||||
|
txt->rot);
|
||||||
|
y += ry(0, align(txt->size + multiline, txt->vert) - multiline,
|
||||||
|
txt->rot);
|
||||||
while (1) {
|
while (1) {
|
||||||
s = strtok(tmp, "\n");
|
s = strtok(tmp, "\n");
|
||||||
if (!s)
|
if (!s)
|
||||||
|
Loading…
Reference in New Issue
Block a user