mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 12:27:11 +02:00
sch2fig/lib.c (draw_text): support component text orientation other than 0 deg
This is for plain text. Pins and fields already supported rotation before.
This commit is contained in:
parent
0ddd4dbbb3
commit
8903dd8db7
@ -344,13 +344,14 @@ static void draw_text(const struct text_obj *text, int m[6])
|
|||||||
.size = text->dim,
|
.size = text->dim,
|
||||||
.x = mx(text->x, text->y, m),
|
.x = mx(text->x, text->y, m),
|
||||||
.y = my(text->x, text->y, m),
|
.y = my(text->x, text->y, m),
|
||||||
.rot = matrix_to_angle(m),
|
.rot = angle_add(text->orient / 10, matrix_to_angle(m)),
|
||||||
.hor = text_mid,
|
.hor = text_mid,
|
||||||
.vert = text_mid,
|
.vert = text_mid,
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (txt.rot) {
|
switch (txt.rot) {
|
||||||
case 180:
|
case 180:
|
||||||
|
case 270:
|
||||||
text_flip_x(&txt);
|
text_flip_x(&txt);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user