vardef mycircle = save c ; picture c ; c := nullpicture ; addto c contour fullcircle scaled 2mm ; c enddef ; def a expr p = path _p_ ; _p_ := p ; a_impl enddef ; def a_impl text t = begingroup save c ; picture c ; c := mycircle ; clip c to bbox c scaled 0.5 ; addto currentpicture also c t ; addto currentpicture doublepath _p_ t ; endgroup enddef ; def b expr p = path _p_ ; _p_ := p ; b_impl enddef ; def b_impl text t = begingroup save c; picture c ; c := mycircle ; addto currentpicture also c t ; addto currentpicture doublepath _p_ t ; endgroup enddef ; beginfig(1) a (0,0) -- (1cm,0) dashed evenly ; currentpicture := currentpicture shifted (2cm,0) ; a (0,0) -- (1cm,0) ; currentpicture := currentpicture shifted (-2cm, 0.5cm ); b (0,0) -- (1cm,0) dashed evenly ; currentpicture := currentpicture shifted (2cm,0) ; b (0,0) -- (1cm,0) ; endfig ; end