%\def\myFrameAlternative{line}
%\def\myFrameAlternative{dashes}
\def\myFrameAlternative{dots}
\startuniqueMPgraphic{name}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
show (\myFrameAlternative) ;
if \myFrameAlternative = dashes :
% if (\myFrameAlternative) = dashes :
draw p dashed evenly scaled 2 ;
% elseif (\myFrameAlternative) = dots :
elseif \myFrameAlternative = dots :
draw p dashed withdots scaled 2 ;
else :
draw p ;
fi ;
\stopuniqueMPgraphic
\defineoverlay[myGraphic][\uniqueMPgraphic{name}]
\starttext
\framed[%
offset=5mm,
background=myGraphic,
frame=off]
{mp framed}
\stoptext
---
context.cmd mpframed
--
Alan