From ff12e388e2529f48398ba93e349e78365decfbc9 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 26 Jul 2016 20:56:43 -0300 Subject: [PATCH] sch2fig/lib.c (draw_pin_num): correct pin number flipping --- sch2fig/lib.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sch2fig/lib.c b/sch2fig/lib.c index 08ef3b9..f20cd19 100644 --- a/sch2fig/lib.c +++ b/sch2fig/lib.c @@ -282,10 +282,27 @@ static void draw_pin_num(const struct comp *comp, const struct pin_obj *pin, text_rot(&txt, matrix_to_angle(m) % 180); if (matrix_is_mirrored(m)) { - if ((txt.rot % 180) == 0) + switch (txt.rot) { + case 0: txt.hor = text_flip(txt.hor); - else - txt.vert = text_flip(txt.vert); + break; + case 90: + break; + case 180: + txt.hor = text_flip(txt.hor); + break; + case 270: + break; + } + } + + switch (txt.rot) { + case 180: + case 270: + text_flip_x(&txt); + break; + default: + break; } text_fig(&txt, COLOR_PIN_NUMBER, LAYER_PIN_NUMBER);