Local Drawing Environment

<..draw sty..>
 \:CheckOption{draw}     \if:Option
    <.local draw env.>
 \fi
 -_-_-

<..local draw env..>
 \NewConfigure{Fig}{2}
 \Odef\Fig[#1]{\bgroup
    \ifx  \EndPicture\:Undef
       \ifx  \EndFig\:Undef
          \def\EndFig{\b:Fig\egroup}%
          \def\AltFig{#1}\a:Fig
       \else  \let\EndFig=\egroup \fi
    \else  \let\EndFig=\egroup \fi
    \HAssign\y::=0
    \def\Text##1"##2"{\raise \y:: pt \hbox to 0pt{##2\hss}\ignorespaces}%
    \def\Line{\afterassignment\Ln:A\tmp:cnta}%
    \def\Move{\afterassignment\Mv:A\tmp:cnta}\ignorespaces}
 
 \def\Ln:A{\afterassignment\Ln:B\tmp:cntb}
 \def\Ln:B{\bgroup \leavevmode
   <.diagonal line.>%
    \egroup \Mv:B  }
 
 \def\Ln:C{\ifnum \I::<\J::
    \vrule depth \z@ height \z@ width \tmp:dim
    \raise \tmp:dima \hbox{\vrule height 0.5pt depth 0.5pt  width 1pt}%
    \vrule depth \z@ height \z@ width -\tmp:dim
    \vrule depth \z@ height \z@ width -1.0pt
    \advance\tmp:dim by  \C::
    \advance\tmp:dima by  \D::
    \Advance:\I:: by  1
    \expandafter\Ln:C  \fi  }
 
 \def\Mv:A{\afterassignment\Mv:B\tmp:cntb}
 \def\Mv:B{\leavevmode
    \vrule depth \z@ height \z@ width \tmp:cnta pt
    \Advance:\y:: by \tmp:cntb     \ignorespaces  }
 
 \csname newcount\endcsname\tmp:cnta
 \csname newcount\endcsname\tmp:cntb
 \csname newdimen\endcsname\tmp:dima
 -_-_-

<..diagonal line..>
 \HAssign\I::=\ifnum \tmp:cnta<0 -\fi \tmp:cnta
 \HAssign\J::=\ifnum \tmp:cntb<0 -\fi \tmp:cntb
 \ifnum \I::>\J:: \HAssign\J::=\I:: \fi \relax
 \ifnum \J::>0
    \tmp:dim=\tmp:cnta pt
    \ifnum \tmp:cnta<0
        \tmp:dim=-\tmp:dim
        \vrule depth \z@ height \z@ width \tmp:cnta pt
        \HAdvance\y:: by \tmp:cntb    \tmp:cntb=-\tmp:cntb
    \fi
    \divide\tmp:dim by \J::  \edef\C::{\the\tmp:dim}%
    \tmp:dima=\tmp:cntb pt  \divide\tmp:dima by \J::
    \edef\D::{\the\tmp:dima}%
    \tmp:dima= \y:: pt
    \HAssign\I::=-1  \tmp:dim=\z@  \Ln:C
    \ifnum \tmp:cnta>0  \else
       \vrule depth \z@ height \z@ width -\tmp:cnta pt
 \fi\fi
 -_-_-