% Time-stamp: <Donnerstag, 06 Juli 2006 11:49:29; cliptest.tex>
%

\setupcolors[state=start]

\startreusableMPgraphic{cliptest}
  path p ;
  u:= 64bp ;
  p:= unitsquare xyscaled(u,u) ;

  fill p withcolor green ;
  fill p xshifted u  withcolor blue ;
  fill p xshifted 2u withcolor green ;

  fill p yshifted u     withcolor blue ;
  fill p shifted (u,u)  withcolor red ;
  fill p shifted (2u,u) withcolor blue ;

  fill p shifted (0,2u)  withcolor green ;
  fill p shifted (u,2u)  withcolor blue ;
  fill p shifted (2u,2u) withcolor green ;
\stopreusableMPgraphic


\starttext

\reuseMPgraphic{cliptest}
\blank

\setupclipping[nx=3,ny=3]

\clip[x=1,y=1]{\reuseMPgraphic{cliptest}}
\blank

\clip[x=2,y=2]{\reuseMPgraphic{cliptest}}
\blank

\clip[x=2,y=3]{\reuseMPgraphic{cliptest}}
\blank

\clip[hoffset=64bp,voffset=64bp,width=64bp,height=64bp]{\reuseMPgraphic{cliptest}}

\stoptext

%%% Local Variables:
%%% mode: context
%%% TeX-master: ""
%%% End:
