Definition of /Draw.../EndDraw in DraTeX

When ‘\DrawOn’ is active, we have the definition ‘\def\Draw{\:Draw}’.

<..definition of /:Draw in DraTeX..>
 \ifvmode \noindent\hfil\fi
 \global\:TeXLoc\z@
 <.put picture in box.>\vbox\bgroup
         \begingroup
 \def\EndDraw{%
         \endgroup   \:SetDrawWidth
       \egroup    <.html into /EndDraw.>%
       <.image map after /Draw.>}%
 <.postscript for /Draw.>%
 \:DraCatCodes      \parindent\z@    \ht:everypar{}%
 \linepenalty10
 \leftskip\z@     \rightskip\z@    \boxmaxdepth\maxdimen
 \let\FigSize\:FigSize
 \def\Draw{\:wrn1{}}%
 \:CommonIID   \:InDraw
 -_-_-

<..postscript for /Draw..>
 \def\PsCode##1{{\Text(--\ht:special{\PsCodeSpecial##1}--)}}%
 -_-_-

In DraTeX dimensions don’t care about the color of the pixels, but once we go to dvips and/or convert we loose the invisible character around the visible picture. This causes a statement for improper dimensions, and so for a distortion of the picture when the dimensions are stated in ‘IMG’. To avoid this, we can put rulers ‘\hrule height 1pt \vskip2pt \vbox\bgroup’ and ‘\egroup \vskip2pt \hrule height 1pt’ at the start and end of the vbox that span to the full width. However, such rulers are not alway desirable.

Hence, we go for the following instead of ‘\DrawIMG{ WIDTH="\DrawWidth" HEIGHT="\DrawHeight"}’.

<..arguments of Draw into IMG..>
 \def\DrawIMG#1{\def\Pic:Img{ \ifx \in:pic\:UnDef \at:IMG
                                 \else \u:map#1\fi}}
 \DrawIMG{}
 \let\u:map=\empty
 -_-_-