diff --git a/sch2fig/lib.c b/sch2fig/lib.c index 24410c0..08ef3b9 100644 --- a/sch2fig/lib.c +++ b/sch2fig/lib.c @@ -22,6 +22,7 @@ #include "style.h" #include "fig.h" #include "text.h" +#include "sch.h" #include "lib.h" @@ -345,10 +346,10 @@ static void draw_text(const struct text_obj *text, int m[6]) .x = mx(text->x, text->y, m), .y = my(text->x, text->y, m), .rot = angle_add(text->orient / 10, matrix_to_angle(m)), - .hor = text_mid, - .vert = text_mid, }; + decode_alignment(&txt, text->hor_align, text->vert_align); + switch (txt.rot) { case 180: case 270: diff --git a/sch2fig/lib.h b/sch2fig/lib.h index 7ba88db..f9e6384 100644 --- a/sch2fig/lib.h +++ b/sch2fig/lib.h @@ -44,7 +44,6 @@ struct comp { }; - const struct comp *lib_find(const char *name); bool lib_field_visible(const struct comp *comp, int n); void lib_exec(const struct comp *comp, unsigned unit, int m[6]);