\dontcomplain

\starttext

\testfeatureonce{25}{\dontleavehmode
    \ruledhbox\bgroup
        \red
        \frule
            width  2cm
            height 2cm
            depth  1cm
            radius 2mm
            type   fill
            line   2pt
        \relax
        \hskip-2cm
        \green
        \frule
            width  2cm
            height 2cm
            depth  1cm
            radius 2mm
            line   2pt
        \relax
    \egroup
\space}

\blank

\startuseMPgraphic{demoshape:back}
    fill
        unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
        withcolor RuleColor ;
\stopuseMPgraphic

\startuseMPgraphic{demoshape:fore}
    draw
        unitcircle xysized (RuleWidth,RuleHeight+RuleDepth)
        withcolor RuleColor
        withpen pencircle scaled RuleThickness ;
\stopuseMPgraphic

\testfeatureonce{100}{\dontleavehmode
    \ruledhbox\bgroup
        \red
        \frule
            width  1cm
            height 3mm
            depth  1mm
            type   mp
            data   {\includeMPgraphic{demoshape:back}}
            line   2pt
        \relax
        \hskip-1cm
        \green
        \frule
            width  1cm
            height 3mm
            depth  1mm
            type   mp
            data   {\includeMPgraphic{demoshape:fore}}
            line   2pt
        \relax
    \egroup
\space}

\blank

\defineoverlay[normalframe]
  [\frule
     width \overlaywidth
     height\overlayheight
     line  \overlaylinewidth
   \relax]

\defineoverlay[ovalframe]
  [\frule
     width  \overlaywidth
     height \overlayheight
     line   \overlaylinewidth
     radius \overlayradius
   \relax]

\dontleavehmode
\testfeatureonce{1}{\setbox\scratchbox\hbox{\framed                                  {test}}}
                                            \framed                                  {test}
\testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=normalframe,frame=off]{test}}}
                                            \framed[background=normalframe,frame=off]{test}
\testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[corner=round]                    {test}}}
                                            \framed[corner=round]                    {test}
\testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=off]  {test}}}
                                            \framed[background=ovalframe,frame=off]  {test}
\testfeatureonce{1}{\setbox\scratchbox\hbox{\framed[background=ovalframe,frame=on]   {test}}}
                                            \framed[background=ovalframe,frame=on]   {test}

\stoptext
