diff options
| author | Antonin Houska <[email protected]> | 2025-10-20 09:07:12 +0200 |
|---|---|---|
| committer | Antonin Houska <[email protected]> | 2025-10-20 09:07:12 +0200 |
| commit | c7929489130c8de9ceb703eeeb9e76849f61ebc5 (patch) | |
| tree | 6fef7f3a65ab3fb1341aed6c8bc50ed1aacb599c | |
| parent | 2c89a71a1d129f9b5c143ae173689b1362d6ae06 (diff) | |
| download | metapostgres-master.tar.gz | |
| -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; |
