From 8903dd8db7c602ccb59f85681ab8ecc0e2c3bf7e Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 26 Jul 2016 17:48:09 -0300 Subject: [PATCH] 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. --- sch2fig/lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sch2fig/lib.c b/sch2fig/lib.c index b6d7087..fa45f06 100644 --- a/sch2fig/lib.c +++ b/sch2fig/lib.c @@ -344,13 +344,14 @@ static void draw_text(const struct text_obj *text, int m[6]) .size = text->dim, .x = mx(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, .vert = text_mid, }; switch (txt.rot) { case 180: + case 270: text_flip_x(&txt); break; default: