mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 08:45:19 +02:00
sch2fig/sch.c (draw_text): convert to use text_*; support direction 1 (up)
This commit is contained in:
parent
3433068d71
commit
d031e59811
@ -62,7 +62,27 @@ static enum fig_shape decode_shape(const char *s)
|
|||||||
static void draw_text(int x, int y, const char *s, int dir, int dim,
|
static void draw_text(int x, int y, const char *s, int dir, int dim,
|
||||||
enum fig_shape shape)
|
enum fig_shape shape)
|
||||||
{
|
{
|
||||||
fig_text(x, y, s, dim, text_min, 0, COLOR_TEXT, LAYER_TEXT);
|
struct text txt = {
|
||||||
|
.s = s,
|
||||||
|
.size = dim,
|
||||||
|
.x = x,
|
||||||
|
.y = y,
|
||||||
|
.rot = 0,
|
||||||
|
.hor = text_min,
|
||||||
|
.vert = text_min,
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (dir) {
|
||||||
|
case 0: /* right */
|
||||||
|
break;
|
||||||
|
case 1: /* up */
|
||||||
|
text_rot(&txt, 90);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(2 + 2 == 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
text_fig(&txt, COLOR_TEXT, LAYER_TEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user