mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-30 08:56:13 +02:00
sch2fig/lib.c (draw_text): support horizontal and vertical alignment
This commit is contained in:
parent
76013a5b04
commit
58cd498ded
@ -22,6 +22,7 @@
|
|||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "fig.h"
|
#include "fig.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
|
#include "sch.h"
|
||||||
#include "lib.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),
|
.x = mx(text->x, text->y, m),
|
||||||
.y = my(text->x, text->y, m),
|
.y = my(text->x, text->y, m),
|
||||||
.rot = angle_add(text->orient / 10, matrix_to_angle(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) {
|
switch (txt.rot) {
|
||||||
case 180:
|
case 180:
|
||||||
case 270:
|
case 270:
|
||||||
|
@ -44,7 +44,6 @@ struct comp {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const struct comp *lib_find(const char *name);
|
const struct comp *lib_find(const char *name);
|
||||||
bool lib_field_visible(const struct comp *comp, int n);
|
bool lib_field_visible(const struct comp *comp, int n);
|
||||||
void lib_exec(const struct comp *comp, unsigned unit, int m[6]);
|
void lib_exec(const struct comp *comp, unsigned unit, int m[6]);
|
||||||
|
Loading…
Reference in New Issue
Block a user