% Chapter 5. Positional Graphics
%
% 5.3 More layers
\setupcolors [state=start]
\setupinteraction [state=start]

\starttext 

\definelayer[BackLayer][position=yes]
\setuplayer[BackLayer][direction=reverse]
\setupbackgrounds[page][background=BackLayer] 

\defineoverlay[Shape] [BackLayer] [\uniqueMPgraphic{Shape}] 

\startuniqueMPgraphic{Shape} 
  path p ; p := fullcircle xyscaled(OverlayWidth,OverlayHeight) ; 
  fill p withcolor \MPcolor{lightgray} ; 
  draw p withpen pencircle scaled 1pt withcolor \MPcolor{darkred} ; 
\stopuniqueMPgraphic 

\defineframed[Shaped][background=Shape,frame=off,location=low]

\startlines
.... some \inframed[background=Shape]{text} with a frame ... 
.... some \Shaped{text} with a frame ...
\stoplines

\stoptext
