Hi,
I would like to hatch the cell green.
Thank you.
Fabrice

\usecolors[xwi]
\startuniqueMPgraphic{meta:hash}{linewidth,linecolor,angle,gap}
if unknown context_back : input mp-back ; fi ;
some_hash ( OverlayWidth, OverlayHeight ,
\MPvar{linewidth}, \MPvar{linecolor} ,
\MPvar{angle}, \MPvar{gap} ) ;
\stopuniqueMPgraphic

\setupMPvariables
[meta:hash]
[gap=.25\bodyfontsize,
angle=45,
linewidth=\overlaylinewidth,
linecolor=\overlaylinecolor]

\def\metahashoverlay#1{\uniqueMPgraphic{meta:hash}{angle=#1}}
\defineoverlay[meta:hash:right]
[\metahashoverlay{ +45}]
\defineoverlay[meta:hash:left]
[\metahashoverlay{ -45}]
\defineoverlay[meta:hash:horizontal][\metahashoverlay{+180}]
\defineoverlay[meta:hash:vertical] [\metahashoverlay{ -90}]
\starttext
  \startmidaligned
                \startxtable
                  [align={lohi,middle}, width=1.5cm, background=color,
                    backgroundcolor=white, framecolor=purple,
                    meta:hash:linecolor=green]
                  \startxrow

\startxcell[background=color,backgroundcolor=paleturquoise]
                      i
                    \stopxcell
                    \startxcell[background=meta:hash:right,frame=off]

                    \stopxcell
                    \startxcell
                      0
                    \stopxcell
                    \startxcell
                      1
                    \stopxcell
                    \startxcell
                      2
                    \stopxcell
                  \stopxrow
                  \startxrow

\startxcell[background=color,backgroundcolor=paleturquoise]
                      S
                    \stopxcell
                    \startxcell
                      0
                    \stopxcell
                    \startxcell

                    \stopxcell
                    \startxcell

                    \stopxcell
                    \startxcell

                    \stopxcell
                  \stopxrow
                  \startxrow

\startxcell[background=color,backgroundcolor=paleturquoise]
                      a
                    \stopxcell
                    \startxcell
                      3
                    \stopxcell
                    \startxcell

                    \stopxcell
                    \startxcell

                    \stopxcell
                    \startxcell

                    \stopxcell
                    \stopxrow
                \stopxtable
              \stopmidaligned
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to