mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-09-12 21:10:16 +03:00
sch2fig/fig.c (fig_label): support direction 3 (down)
This commit is contained in:
parent
a0c4aedd32
commit
fe15498ef1
@ -88,24 +88,30 @@ void fig_label(int x, int y, const char *s, int dir, int dim,
|
||||
.hor = 0,
|
||||
.vert = text_min,
|
||||
};
|
||||
int dy;
|
||||
int dx, dy;
|
||||
|
||||
switch (dir) {
|
||||
case 0:
|
||||
case 0: /* right */
|
||||
txt.rot = 0;
|
||||
txt.hor = text_min;
|
||||
dy = 1;
|
||||
break;
|
||||
case 2:
|
||||
case 2: /* left */
|
||||
txt.rot = 0;
|
||||
txt.hor = text_max;
|
||||
dy = 1;
|
||||
break;
|
||||
case 3: /* down */
|
||||
txt.rot = 90;
|
||||
txt.hor = text_max;
|
||||
dx = -1;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
txt.y -= dy * LABEL_OFFSET;
|
||||
txt.x += dx * LABEL_OFFSET;
|
||||
text_fig(&txt, COLOR_LABEL, LAYER_LABEL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user