1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-23 08:57:10 +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:
Werner Almesberger 2016-07-26 17:48:09 -03:00
parent 0ddd4dbbb3
commit 8903dd8db7

View File

@ -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: