%%%%%%%%%%%%%%%%%%%%%%%%  fullpict.sty  %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%       Written by Bruce Shawyer 14 March 1995       %%%%%%
%%%%%%       Updated and improved 14 November 1995        %%%%%%
%%%%%%       Second update September 1996		  %%%%%%
\newcount\gsu

\def\goodfullunit#1{\gsu=\number\hsize
\divide\gsu by72820\divide\gsu by#1\setlength\unitlength{\gsu pt}}

\def\fullpicture(#1,#2){\@ifnextchar({\@fullpicture(#1,#2)}%
{\@fullpicture(#1,#2)(0,0)}}
\def\@fullpicture(#1,#2)(#3,#4){\begin{center}
\goodfullunit{#1}\@picht #2\unitlength
\setbox\@picbox\hbox to#1\unitlength\bgroup
\hskip -#3\unitlength \lower #4\unitlength \hbox\bgroup\ignorespaces}
\def\endfullpicture{\egroup\hss\egroup\ht\@picbox\@picht
\dp\@picbox\z@\mbox{\box\@picbox}\end{center}}

\def\goodhalfunit#1{\gsu=\number\hsize
\divide\gsu by145640\divide\gsu by#1\setlength\unitlength{\gsu pt}}
 
\def\halfpicture(#1,#2){\@ifnextchar({\@halfpicture(#1,#2)}%
{\@halfpicture(#1,#2)(0,0)}}
\def\@halfpicture(#1,#2)(#3,#4){\begin{center}
\goodhalfunit{#1}\@picht #2\unitlength
\setbox\@picbox\hbox to#1\unitlength\bgroup
\hskip -#3\unitlength \lower #4\unitlength \hbox\bgroup\ignorespaces}
\def\endhalfpicture{\egroup\hss\egroup\ht\@picbox\@picht
\dp\@picbox\z@\mbox{\box\@picbox}\end{center}}

\def\scaleunit#1#2{\gsu=\number\hsize
\divide\gsu by72820\divide\gsu by#1\multiply\gsu by#2\divide\gsu by100
\setlength\unitlength{\gsu pt}}

\def\scalepicture#1(#2,#3){\@ifnextchar({\@scalepicture#1(#2,#3)}%
{\@scalepicture#1(#2,#3)(0,0)}}
\def\@scalepicture#1(#2,#3)(#4,#5){\begin{center}
\scaleunit{#2}{#1}\@picht #3\unitlength
\setbox\@picbox\hbox to#2\unitlength\bgroup
\hskip -#4\unitlength \lower #5\unitlength \hbox\bgroup\ignorespaces}
\def\endscalepicture{\egroup\hss\egroup\ht\@picbox\@picht
\dp\@picbox\z@\mbox{\box\@picbox}\end{center}}

