% \iffalse
% --------------------------------------------------------------------
% <*chit>
% \fi
% \subsubsection{Modifications to chits}
%
% These defines overlays one can add on top of chits, for example to
% shade a chit, put a semi-transparent red cover to indicate
% elimination, and similar. 
%
%    \begin{macrocode}
\tikzset{
  pics/chit/shade/.style={
    code={%
      \path[fill=white,opacity=#1,pic actions] (-.6,-.6) rectangle(.6,.6);}},
  pics/chit/eliminate/.style={
    code={%
      \path[fill=red,opacity=#1,pic actions] (-.6,-.6) rectangle(.6,.6);}},
  pics/chit/shade/.default=0.5,
  pics/chit/eliminate/.default=0.25,
  dummy chit/.style={draw=none,fill=none,chit={}},
}
\def\shadechit{%
  \@ifnextchar[{\sh@dechit}{\sh@dechit[.5]}%]
}
\def\eliminatechit{%
  \@ifnextchar[{\elimin@techit}{\elimin@techit[.25]}%]
}
\def\sh@dechit[#1](#2){%
  % \message{^^JShading chit with opacity `#1'}%
  \pic[transform shape] at (#2) {chit/shade=#1};%
  \@ifnextchar;{\@gobble}{}}
\def\elimin@techit[#1](#2){%
  \pic[transform shape] at (#2) {chit/eliminate=#1};%
  \@ifnextchar;{\@gobble}{}}
%    \end{macrocode}
% 
%
% \iffalse
% --------------------------------------------------------------------
% </chit>
% \fi
