%------------------------------------------------------------------------------
\stopMPpage
%==============================================================================
%==============================================================================
%==============================================================================
\setupMPinstance
[metafun]
[textstyle={\definedfont[name:dejavusans*default at 50pt]\ignorespaces}]
\startMPpage
draw (0cm,0cm)--(20cm,0cm)--(20cm,20cm)--(0cm,20cm)--cycle
withpen pencircle
scaled 0.5mm
withcolor red;
%------------------------------------------------------------------------------
picture PictA ;
pair PA ; PA := (5cm,12cm) ;
PictA := textext.urt("\ruledhbox{Aujourd'hui}") shifted PA;
draw PictA;
%------------------------------------------------------------------------------
draw (llcorner PictA) withpen pencircle scaled 3mm withcolor green;
draw (lrcorner PictA) withpen pencircle scaled 3mm withcolor yellow;
draw (urcorner PictA) withpen pencircle scaled 3mm withcolor blue;
draw (ulcorner PictA) withpen pencircle scaled 3mm withcolor cyan;
%------------------------------------------------------------------------------
picture PictB, PictC ;
pair PB ; PB := PA shifted (0cm,-4cm) ;
PictB := textext.urt("\ruledhbox{Aujourd'hui}") shifted PB;
PictC := textext.drt("\ruledhbox{Aujourd'hui}") shifted PB;
draw PictB;
pair decalage ;
decalage = llcorner PictB - llcorner PictC;
%------------------------------------------------------------------------------
draw (center PictB) withpen pencircle scaled 3mm withcolor green;
draw (PB shifted decalage) withpen pencircle scaled 3mm withcolor yellow;
draw (PB shifted (decalage shifted (bbwidth PictB / 2,0mm)))
withpen pencircle scaled 3mm withcolor blue;
draw (PB shifted (decalage shifted (bbwidth PictB,0mm)))
withpen pencircle scaled 3mm withcolor cyan;
draw PA withpen pencircle scaled 1.5mm withcolor red;
\stopMPpage