diff options
| -rw-r--r-- | common.mp | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -154,14 +154,6 @@ def drawlabel(text i) = % TODO Introduce a separate pen for labels. pickup arrowpen; - draw label[i] shifted ( - % First, find the middle point of the lower edge ... - (label[i].ll + label[i].lr) / 2 - - % ... then shift the lower left corner of the letter horizontally ... - (lrcorner label[i] - llcorner label[i]) / 2 + - % ... and move the text upwards vertically. - (0, labelbordery + labeldpth)); - if not label[i].textonly: % Fill the area. fill label[i].ll--label[i].lr--label[i].ur--label[i].ul--cycle withcolor labelbgcolor; @@ -171,6 +163,14 @@ def drawlabel(text i) = % Draw the bounding box. draw label[i].ll--label[i].ul--label[i].ur--label[i].lr--cycle; fi; + + draw label[i] shifted ( + % First, find the middle point of the lower edge ... + (label[i].ll + label[i].lr) / 2 - + % ... then shift the lower left corner of the letter horizontally ... + (lrcorner label[i] - llcorner label[i]) / 2 + + % ... and move the text upwards vertically. + (0, labelbordery + labeldpth)); enddef; |
