mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-24 04:15:33 +02:00
sch2fig/fig.c (fig_glabel): support orientation 1 (up)
This commit is contained in:
parent
707c8f790d
commit
a0c4aedd32
@ -131,6 +131,9 @@ void fig_glabel(int x, int y, const char *s, int dir, int dim,
|
|||||||
bool anchor_right = 1;
|
bool anchor_right = 1;
|
||||||
|
|
||||||
switch (shape) {
|
switch (shape) {
|
||||||
|
case fig_unspec:
|
||||||
|
box = box_simple;
|
||||||
|
break;
|
||||||
case fig_in:
|
case fig_in:
|
||||||
box = box_right;
|
box = box_right;
|
||||||
break;
|
break;
|
||||||
@ -145,12 +148,19 @@ void fig_glabel(int x, int y, const char *s, int dir, int dim,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case 0:
|
case 0: /* left */
|
||||||
txt.rot = 0;
|
txt.rot = 0;
|
||||||
txt.hor = text_max;
|
txt.hor = text_max;
|
||||||
dx = -1;
|
dx = -1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1: /* up */
|
||||||
|
txt.rot = 90;
|
||||||
|
txt.hor = text_min;
|
||||||
|
dx = 1;
|
||||||
|
box = flip_box(box);
|
||||||
|
anchor_right = !anchor_right;
|
||||||
|
break;
|
||||||
|
case 2: /* right */
|
||||||
txt.rot = 0;
|
txt.rot = 0;
|
||||||
txt.hor = text_min;
|
txt.hor = text_min;
|
||||||
dx = 1;
|
dx = 1;
|
||||||
@ -165,6 +175,18 @@ void fig_glabel(int x, int y, const char *s, int dir, int dim,
|
|||||||
shift_tip = dx * (GLABEL_OFFSET + half);
|
shift_tip = dx * (GLABEL_OFFSET + half);
|
||||||
|
|
||||||
switch (box) {
|
switch (box) {
|
||||||
|
case box_simple:
|
||||||
|
n = 5;
|
||||||
|
text_shift(&txt, txt.hor, text_mid, shift_flat, 0);
|
||||||
|
text_rel(&txt, text_min, text_min,
|
||||||
|
-GLABEL_OFFSET, GLABEL_OFFSET, vx + 1, vy + 1);
|
||||||
|
text_rel(&txt, text_max, text_min,
|
||||||
|
GLABEL_OFFSET, GLABEL_OFFSET, vx + 2, vy + 2);
|
||||||
|
text_rel(&txt, text_max, text_max,
|
||||||
|
GLABEL_OFFSET, -GLABEL_OFFSET, vx + 3, vy + 3);
|
||||||
|
text_rel(&txt, text_min, text_max,
|
||||||
|
-GLABEL_OFFSET, -GLABEL_OFFSET, vx + 4, vy + 4);
|
||||||
|
break;
|
||||||
case box_right:
|
case box_right:
|
||||||
text_shift(&txt, txt.hor, text_mid,
|
text_shift(&txt, txt.hor, text_mid,
|
||||||
anchor_right ? shift_tip : shift_flat, 0);
|
anchor_right ? shift_tip : shift_flat, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user