vardef bouton(expr txt) = picture $; path $$; pair BLLC,BULC,BURC,BLRC; numeric RRAY,wray; wray = 4pt; RRAY = 1-1/sqrt(2); $ = thelabel(txt,(0,0)); % acquisition du texte à encadrer sous forme d'image BLLC = (0,0) ; BULC = (0,14); BURC = (50,14); BLRC = (50,0); % construction du bord de la boîte $$ = (BLLC + (0,wray)) -- (BULC - (0,wray)) .. (BULC + RRAY*(wray,-wray)) .. (BULC + (wray,0)) -- (BURC - (wray,0)) .. (BURC - RRAY*(wray,wray)) .. (BURC - (0,wray)) -- (BLRC + (0,wray)) .. (BLRC + RRAY*(-wray,wray)) .. (BLRC - (wray,0)) -- (BLLC + (wray,0)) .. (BLLC + RRAY*(wray,wray)) .. cycle; fill $$ withcolor (1,1,0.7); draw $ shifted (25,7); draw $$ withcolor (0,0,.3) withpen pencircle scaled 1; enddef;