\hypertarget{classDviFile}{\section{Dvi\-File Class Reference}
\label{classDviFile}\index{Dvi\-File@{Dvi\-File}}
}


Represents a D\-V\-I file.  




{\ttfamily \#include $<$Dvi\-File.\-h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classDviFile_1_1FontSet}{Font\-Set}
\begin{DoxyCompactList}\small\item\em Represents the set of fonts in a D\-V\-I file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} \{ \\*
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a7f3d4b27872a11c803fe7dd33b20a19c}{unit\-\_\-\-B\-A\-D}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ade5ac4dad04956788d291daf3b3da762}{unit\-\_\-pt}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac2ac1302748ded06cc397f8693f1cfca}{unit\-\_\-pc}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982afeb58468284041182aeeaafece39e471}{unit\-\_\-in}, 
\\*
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a59a8cc27fb4e4c3fc5f93810ad3f7d62}{unit\-\_\-bp}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad2356dcec95b7ea23636c57b8518e188}{unit\-\_\-cm}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad77a497b56dc7bd0c499fbefb10b6f1c}{unit\-\_\-mm}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ae7ce7663338df48d0302e70502e3be35}{unit\-\_\-dd}, 
\\*
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a310cd0c3737b25b22287a2f04d8cc659}{unit\-\_\-cc}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aee051c4585b3fe9b6b54df051b6ea490}{unit\-\_\-sp}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}{unit\-\_\-pixels}, 
\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac82d0bcb0d8fca4f82d84e75e15b5186}{unit\-\_\-dvi}
 \}
\begin{DoxyCompactList}\small\item\em Units of length. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classDviFile_a605ede92069ced2286c645df90e8be7d}{Dvi\-File} (string \&\hyperlink{classDviFile_a15b8125de3dc85838fae5268c0cf1557}{s}, int \hyperlink{dvi2bitmap_8cc_a42e8863b58f9ee9bd3e23ed02cc63430}{resolution}=0, double magmag=1.\-0, bool read\-\_\-postamble=true, bool seekable=true)  throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Constructs a new {\ttfamily \hyperlink{classDviFile}{Dvi\-File}} object. \end{DoxyCompactList}\item 
\hyperlink{classDviFile_a6e4e9d32cce3ea34afb52af50220ec0e}{$\sim$\-Dvi\-File} ()
\item 
bool \hyperlink{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}{eof} ()
\begin{DoxyCompactList}\small\item\em Indicates whether we are at the end of the D\-V\-I file. \end{DoxyCompactList}\item 
\hyperlink{classDviFileEvent}{Dvi\-File\-Event} $\ast$ \hyperlink{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{get\-Event} ()
\begin{DoxyCompactList}\small\item\em Gets an event from the D\-V\-I file. \end{DoxyCompactList}\item 
\hyperlink{classDviFileEvent}{Dvi\-File\-Event} $\ast$ \hyperlink{classDviFile_aa22ae3f64419e60aedda55105f9378cb}{get\-End\-Of\-Page} ()
\begin{DoxyCompactList}\small\item\em Skips to the end of the page. \end{DoxyCompactList}\item 
int \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H} (\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} units=\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}{unit\-\_\-pixels}) const   throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Obtains the current horizontal position. \end{DoxyCompactList}\item 
int \hyperlink{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{curr\-V} (\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} units=\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}{unit\-\_\-pixels}) const   throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Obtains the current vertical position. \end{DoxyCompactList}\item 
int \hyperlink{classDviFile_a0ae806c759da83c6029bb50c2d0a3987}{h\-Size} ()
\begin{DoxyCompactList}\small\item\em Obtains the `width of the widest page'. \end{DoxyCompactList}\item 
int \hyperlink{classDviFile_a0e43ecef9bffd730ad69477f69e36c1b}{v\-Size} ()
\begin{DoxyCompactList}\small\item\em Obtains the `height plus depth of the tallest page'. \end{DoxyCompactList}\item 
double \hyperlink{classDviFile_a99126a8eb463577923c0e89245a90b24}{magnification} () const 
\begin{DoxyCompactList}\small\item\em Return the net magnification factor for the D\-V\-I file. \end{DoxyCompactList}\item 
int \hyperlink{classDviFile_a8e1a3b49bf147f16aeabb518dbaf29e3}{pt2px} (double npt) const 
\begin{DoxyCompactList}\small\item\em Converts a length in points to one in pixels, using the current magnifications and any other relevant parameters. \end{DoxyCompactList}\item 
const string $\ast$ \hyperlink{classDviFile_a46cbea55f623117a404aa80b31086023}{filename} () const 
\begin{DoxyCompactList}\small\item\em Gets the name of this D\-V\-I file. \end{DoxyCompactList}\item 
const \hyperlink{classPkFont}{Pk\-Font} $\ast$ \hyperlink{classDviFile_aeccd349cdbaa933d7fc2030560e081b4}{get\-Fallback\-Font} (const \hyperlink{classPkFont}{Pk\-Font} $\ast$desired)
\begin{DoxyCompactList}\small\item\em Returns a fallback font, for use when a requested font is not available. \end{DoxyCompactList}\item 
bool \hyperlink{classDviFile_addc7e9b528a1302544826d626d5842aa}{have\-Read\-Postamble} () const 
\begin{DoxyCompactList}\small\item\em Reports whether the D\-V\-I file postamble was read when this file was opened. \end{DoxyCompactList}\item 
const \hyperlink{classDviFile_1_1FontSet}{Font\-Set} $\ast$ \hyperlink{classDviFile_a7ec85e9da600751dbf52a7c5fec22bea}{get\-Font\-Set} () const 
\begin{DoxyCompactList}\small\item\em Obtains a representation of the set of fonts contained in this D\-V\-I file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} \hyperlink{classDviFile_a1a0c717f68d506b76256f843f65b748b}{unit\-Type} (string \hyperlink{classDviFile_a6e0683850f7b4dc066aebc2ab41b2120}{unit\-String})
\begin{DoxyCompactList}\small\item\em Convert a string to a unit. \end{DoxyCompactList}\item 
static string \hyperlink{classDviFile_a6e0683850f7b4dc066aebc2ab41b2120}{unit\-String} (\hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} unit)
\begin{DoxyCompactList}\small\item\em Gets the string representation of a D\-V\-I unit. \end{DoxyCompactList}\item 
static double \hyperlink{classDviFile_a494b563b071412775248ce7267dc4abd}{convert\-From\-Scaled\-Points} (int sp, \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} units, \hyperlink{classDviFile}{Dvi\-File} $\ast$dvif=0)  throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Convert a Te\-X scaled point to another unit. \end{DoxyCompactList}\item 
static int \hyperlink{classDviFile_af761b8986e650c9b50811e3d7f123f27}{convert\-To\-Scaled\-Points} (double length, \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} units, \hyperlink{classDviFile}{Dvi\-File} $\ast$dvif=0)  throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Convert a length to Te\-X scaled points. \end{DoxyCompactList}\item 
static double \hyperlink{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}{convert\-Units} (double length, \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} from\-\_\-units, \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} to\-\_\-units, \hyperlink{classDviFile}{Dvi\-File} $\ast$dvif=0)  throw (\-Dvi\-Error)
\begin{DoxyCompactList}\small\item\em Convert a length from one set of units to another. \end{DoxyCompactList}\item 
static \hyperlink{verbosity_8h_a886df075e73fd6d54e018791f87fa071}{verbosities} \hyperlink{classDviFile_a43cc50a8ebead60efd612c028b0c6ca6}{verbosity} (const \hyperlink{verbosity_8h_a886df075e73fd6d54e018791f87fa071}{verbosities} level)
\begin{DoxyCompactList}\small\item\em Sets the verbosity of this module. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Represents a D\-V\-I file. 

See the D\-V\-I Driver standard \mbox{[}driv-\/std\mbox{]} for details of the parameters here.

\mbox{[}driv-\/std\mbox{]} Level-\/0 D\-V\-I Driver Standard, available on-\/line on C\-T\-A\-N, in the directory \href{http://www.tex.ac.uk/tex-archive/dviware/driv-standard}{\tt dviware/driv-\/standard}. 

\subsection{Member Enumeration Documentation}
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{\index{Dvi\-File@{Dvi\-File}!Dvi\-Units@{Dvi\-Units}}
\index{Dvi\-Units@{Dvi\-Units}!DviFile@{Dvi\-File}}
\subsubsection[{Dvi\-Units}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Dvi\-File\-::\-Dvi\-Units}}}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}


Units of length. 

Used in \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H} and \hyperlink{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{curr\-V}, and other conversions are available through method \hyperlink{classDviFile_a494b563b071412775248ce7267dc4abd}{convert\-From\-Scaled\-Points}. \begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{unit\-\_\-\-B\-A\-D@{unit\-\_\-\-B\-A\-D}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-\-B\-A\-D@{unit\-\_\-\-B\-A\-D}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a7f3d4b27872a11c803fe7dd33b20a19c}{unit\-\_\-\-B\-A\-D}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a7f3d4b27872a11c803fe7dd33b20a19c}
}]An invalid unit. \index{unit\-\_\-pt@{unit\-\_\-pt}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-pt@{unit\-\_\-pt}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ade5ac4dad04956788d291daf3b3da762}{unit\-\_\-pt}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ade5ac4dad04956788d291daf3b3da762}
}]Traditional printer's point. There are 72.\-27pt in 1in. \index{unit\-\_\-pc@{unit\-\_\-pc}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-pc@{unit\-\_\-pc}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac2ac1302748ded06cc397f8693f1cfca}{unit\-\_\-pc}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac2ac1302748ded06cc397f8693f1cfca}
}]Pica; 1pc=12pt. \index{unit\-\_\-in@{unit\-\_\-in}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-in@{unit\-\_\-in}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982afeb58468284041182aeeaafece39e471}{unit\-\_\-in}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982afeb58468284041182aeeaafece39e471}
}]Inch; 1in=25.\-4mm. \index{unit\-\_\-bp@{unit\-\_\-bp}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-bp@{unit\-\_\-bp}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a59a8cc27fb4e4c3fc5f93810ad3f7d62}{unit\-\_\-bp}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a59a8cc27fb4e4c3fc5f93810ad3f7d62}
}]The big point; 72bp=1in. Postscript points are bigpoints in this terminology. \index{unit\-\_\-cm@{unit\-\_\-cm}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-cm@{unit\-\_\-cm}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad2356dcec95b7ea23636c57b8518e188}{unit\-\_\-cm}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad2356dcec95b7ea23636c57b8518e188}
}]Centimetre; 1cm=10\-E-\/2m. \index{unit\-\_\-mm@{unit\-\_\-mm}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-mm@{unit\-\_\-mm}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad77a497b56dc7bd0c499fbefb10b6f1c}{unit\-\_\-mm}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ad77a497b56dc7bd0c499fbefb10b6f1c}
}]Millimetre; 1mm=10\-E-\/3m. One metre is the distance light travels, in vacuum, in a time 1/299792458 seconds.

Conversion factors\-: 1mm=2.\-84527559pt; 1pt=0.\-3515mm. \index{unit\-\_\-dd@{unit\-\_\-dd}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-dd@{unit\-\_\-dd}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ae7ce7663338df48d0302e70502e3be35}{unit\-\_\-dd}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ae7ce7663338df48d0302e70502e3be35}
}]Didot point; 1157dd=1238pt. \index{unit\-\_\-cc@{unit\-\_\-cc}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-cc@{unit\-\_\-cc}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a310cd0c3737b25b22287a2f04d8cc659}{unit\-\_\-cc}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a310cd0c3737b25b22287a2f04d8cc659}
}]Cicero; 1cc=12dd. \index{unit\-\_\-sp@{unit\-\_\-sp}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-sp@{unit\-\_\-sp}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aee051c4585b3fe9b6b54df051b6ea490}{unit\-\_\-sp}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aee051c4585b3fe9b6b54df051b6ea490}
}]Te\-X `scaled points'. These are the dimensions which Te\-X itself works in, where 65536sp=1pt, or   1sp=$5.36434\times 10^{-9}$   metres. Light at that wavelength is classed as soft X-\/rays, and is a health-\/hazard (so don't examine your scaled points too closely); it's about the size of 50 atoms. \index{unit\-\_\-pixels@{unit\-\_\-pixels}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-pixels@{unit\-\_\-pixels}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}{unit\-\_\-pixels}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}
}]Pixel units. The D\-V\-I standard calls these `device units', and refers to them with the notation {\itshape hh}. \index{unit\-\_\-dvi@{unit\-\_\-dvi}!Dvi\-File@{Dvi\-File}}\index{Dvi\-File@{Dvi\-File}!unit\-\_\-dvi@{unit\-\_\-dvi}}\item[{\em 
\hypertarget{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac82d0bcb0d8fca4f82d84e75e15b5186}{unit\-\_\-dvi}\label{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac82d0bcb0d8fca4f82d84e75e15b5186}
}]D\-V\-I units. All dimensions within the D\-V\-I file are expressed in these units, written as {\itshape h} in the standard. The conversion of D\-V\-I units to physical units is governed by the values in the preamble. D\-V\-I files written by Te\-X (that is, essentially all of them, except those written by converters such as {\ttfamily dtl}, which write compatible ones) have a preamble which ensures that the D\-V\-I units are scaled points, times the overall magnification factor. \end{description}
\end{Desc}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classDviFile_a605ede92069ced2286c645df90e8be7d}{\index{Dvi\-File@{Dvi\-File}!Dvi\-File@{Dvi\-File}}
\index{Dvi\-File@{Dvi\-File}!DviFile@{Dvi\-File}}
\subsubsection[{Dvi\-File}]{\setlength{\rightskip}{0pt plus 5cm}Dvi\-File\-::\-Dvi\-File (
\begin{DoxyParamCaption}
\item[{string \&}]{fn, }
\item[{int}]{res = {\ttfamily 0}, }
\item[{double}]{externalmag = {\ttfamily 1.0}, }
\item[{bool}]{read\-\_\-post = {\ttfamily true}, }
\item[{bool}]{seekable = {\ttfamily true}}
\end{DoxyParamCaption}
) throw  {\bf Dvi\-Error}) }}\label{classDviFile_a605ede92069ced2286c645df90e8be7d}


Constructs a new {\ttfamily \hyperlink{classDviFile}{Dvi\-File}} object. 

Once the D\-V\-I file has been opened in this way, its contents can be processed in an event-\/based fashion, by repeatedly calling \hyperlink{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{get\-Event} and handling the returned object.

The D\-V\-I file may be specified as \char`\"{}-\/\char`\"{}, in which case the D\-V\-I file will be read from {\ttfamily stdin}. In fact, this is just a synonym for the expression, {\ttfamily $<$osfd$>$0}, as understood by \hyperlink{classInputByteStream}{Input\-Byte\-Stream} (qv). In this case, the postamble is not read, irrespective of the value of parameter {\ttfamily read\-\_\-post}, and this is known not to be seekable, so the value of parameter {\ttfamily seekable} is ignored.

After the D\-V\-I file has been opened using this constructor, the preamble may or may not be read (this may be specified in future versions). If you need to ensure that the preamble is read (for example if you wish to call \hyperlink{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}{convert\-Units}), then you should call \hyperlink{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{get\-Event} once to retrieve the \hyperlink{classDviFilePreamble}{Dvi\-File\-Preamble} event which it returns the first time it is called.


\begin{DoxyParams}{Parameters}
{\em fn} & the name of the D\-V\-I file. The given name is searched for both as-\/is, and with an extension {\ttfamily .dvi} added.\\
\hline
{\em res} & the base D\-P\-I to be used for processing the file, in pixels-\/per-\/inch. If given as zero, default to the resolution returned by \hyperlink{classPkFont_a4f830aadba0fe1febcef59b1a175cb09}{Pk\-Font\#dpi\-Base}.\\
\hline
{\em externalmag} & the factor by which the D\-V\-I file's internal magnification factor should itself be magnified, specified externally to the D\-V\-I file (on a command line, for example); default is 1.\-0\\
\hline
{\em read\-\_\-post} & if true, then the D\-V\-I postamble will be read; if false, it will be skipped. This is false by default, but if the postamble is read, then the font declarations there will be read and acted on, which {\itshape may} speed things up.\\
\hline
{\em seekable} & if true, the input file is seekable; if false, it is not seekable, the value of {\ttfamily read\-\_\-post} is ignored (taken to be false), and the file is opened without attempting to add any {\ttfamily .dvi} extension.\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classDviError}{Dvi\-Error}} & if the D\-V\-I file cannot be opened \\
\hline
\end{DoxyExceptions}


References Dvi\-Error\-::problem(), and Pk\-Font\-::set\-Resolution().

\hypertarget{classDviFile_a6e4e9d32cce3ea34afb52af50220ec0e}{\index{Dvi\-File@{Dvi\-File}!$\sim$\-Dvi\-File@{$\sim$\-Dvi\-File}}
\index{$\sim$\-Dvi\-File@{$\sim$\-Dvi\-File}!DviFile@{Dvi\-File}}
\subsubsection[{$\sim$\-Dvi\-File}]{\setlength{\rightskip}{0pt plus 5cm}Dvi\-File\-::$\sim$\-Dvi\-File (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_a6e4e9d32cce3ea34afb52af50220ec0e}


\subsection{Member Function Documentation}
\hypertarget{classDviFile_a494b563b071412775248ce7267dc4abd}{\index{Dvi\-File@{Dvi\-File}!convert\-From\-Scaled\-Points@{convert\-From\-Scaled\-Points}}
\index{convert\-From\-Scaled\-Points@{convert\-From\-Scaled\-Points}!DviFile@{Dvi\-File}}
\subsubsection[{convert\-From\-Scaled\-Points}]{\setlength{\rightskip}{0pt plus 5cm}double Dvi\-File\-::convert\-From\-Scaled\-Points (
\begin{DoxyParamCaption}
\item[{int}]{sp, }
\item[{{\bf Dvi\-Units}}]{units, }
\item[{{\bf Dvi\-File} $\ast$}]{dvif = {\ttfamily 0}}
\end{DoxyParamCaption}
) throw  {\bf Dvi\-Error}) \hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_a494b563b071412775248ce7267dc4abd}


Convert a Te\-X scaled point to another unit. 

It is possible to convert to pixel units with this method; however it is generally better to either get pixel positions directly (through \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H} or \hyperlink{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{curr\-V} for example).

The conversions to D\-V\-Iunits and pixels are not universal, but are instead dependent on a particular D\-V\-I file; if you wish to convert to either of these units, you must supply a reference to a D\-V\-I file. If not, any argument here is ignored, and may be zero (the default).


\begin{DoxyParams}{Parameters}
{\em sp} & the length in scaled points \\
\hline
{\em units} & the unit to convert it to \\
\hline
{\em dvif} & a D\-V\-I file, if pixels or D\-V\-Iunits are requested\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the converted unit
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classDviError}{Dvi\-Error}} & if pixels or D\-V\-Iunits were requested and no dvif parameter was supplied \\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See Also}
\hyperlink{classDviFile_af761b8986e650c9b50811e3d7f123f27}{convert\-To\-Scaled\-Points} 

\hyperlink{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}{convert\-Units} 
\end{DoxySeeAlso}


Referenced by Dvi\-File\-Position\-::\-Dvi\-File\-Position(), Dvi\-File\-Position\-::get\-X(), Dvi\-File\-Position\-::get\-Y(), Dvi\-File\-Position\-::scale(), and Dvi\-File\-Position\-::shift().

\hypertarget{classDviFile_af761b8986e650c9b50811e3d7f123f27}{\index{Dvi\-File@{Dvi\-File}!convert\-To\-Scaled\-Points@{convert\-To\-Scaled\-Points}}
\index{convert\-To\-Scaled\-Points@{convert\-To\-Scaled\-Points}!DviFile@{Dvi\-File}}
\subsubsection[{convert\-To\-Scaled\-Points}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::convert\-To\-Scaled\-Points (
\begin{DoxyParamCaption}
\item[{double}]{length, }
\item[{{\bf Dvi\-Units}}]{units, }
\item[{{\bf Dvi\-File} $\ast$}]{dvif = {\ttfamily 0}}
\end{DoxyParamCaption}
) throw  {\bf Dvi\-Error}) \hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_af761b8986e650c9b50811e3d7f123f27}


Convert a length to Te\-X scaled points. 

The conversions from D\-V\-Iunits and pixels are not universal, but are instead dependent on a particular D\-V\-I file; if you wish to convert from either of these units, you must supply a reference to a D\-V\-I file. If not, any argument here is ignored, and may be zero (the default).


\begin{DoxyParams}{Parameters}
{\em length} & the length to be converted \\
\hline
{\em units} & the units in which the length is currently \\
\hline
{\em dvif} & a D\-V\-I file, if pixels or D\-V\-Iunits are requested\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the input length as a multiple of the Te\-X scaled-\/point
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classDviError}{Dvi\-Error}} & if pixels or D\-V\-Iunits were requested and no dvif parameter was supplied \\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See Also}
\hyperlink{classDviFile_a494b563b071412775248ce7267dc4abd}{convert\-From\-Scaled\-Points} 

\hyperlink{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}{convert\-Units} 
\end{DoxySeeAlso}


Referenced by Dvi\-File\-Position\-::\-Dvi\-File\-Position(), and Dvi\-File\-Position\-::shift().

\hypertarget{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}{\index{Dvi\-File@{Dvi\-File}!convert\-Units@{convert\-Units}}
\index{convert\-Units@{convert\-Units}!DviFile@{Dvi\-File}}
\subsubsection[{convert\-Units}]{\setlength{\rightskip}{0pt plus 5cm}double Dvi\-File\-::convert\-Units (
\begin{DoxyParamCaption}
\item[{double}]{length, }
\item[{{\bf Dvi\-Units}}]{from\-\_\-units, }
\item[{{\bf Dvi\-Units}}]{to\-\_\-units, }
\item[{{\bf Dvi\-File} $\ast$}]{dvif = {\ttfamily 0}}
\end{DoxyParamCaption}
) throw  {\bf Dvi\-Error}) \hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_aeff5df3d81ddf7509ac205fae3b09eab}


Convert a length from one set of units to another. 

The conversions to D\-V\-Iunits and pixels are not universal, but are instead dependent on a particular D\-V\-I file; if you wish to convert to either of these units, you must supply a reference to a D\-V\-I file. If not, any argument here is ignored, and may be zero (the default).


\begin{DoxyParams}{Parameters}
{\em length} & the length to be converted \\
\hline
{\em from\-\_\-units} & the units in which length is currently expressed \\
\hline
{\em to\-\_\-units} & the target units \\
\hline
{\em dvif} & a D\-V\-I file, if pixels or D\-V\-Iunits are requested\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the length expressed as a multiple of the target unit
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classDviError}{Dvi\-Error}} & if pixels or D\-V\-Iunits were requested and no dvif parameter was supplied \\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See Also}
\hyperlink{classDviFile_a494b563b071412775248ce7267dc4abd}{convert\-From\-Scaled\-Points} 

\hyperlink{classDviFile_af761b8986e650c9b50811e3d7f123f27}{convert\-To\-Scaled\-Points} 
\end{DoxySeeAlso}


Referenced by main().

\hypertarget{classDviFile_aefa62a58509c27806d5d42aee059252b}{\index{Dvi\-File@{Dvi\-File}!curr\-H@{curr\-H}}
\index{curr\-H@{curr\-H}!DviFile@{Dvi\-File}}
\subsubsection[{curr\-H}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::curr\-H (
\begin{DoxyParamCaption}
\item[{{\bf Dvi\-Units}}]{units = {\ttfamily {\bf unit\-\_\-pixels}}}
\end{DoxyParamCaption}
) const throw  {\bf Dvi\-Error}) \hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_aefa62a58509c27806d5d42aee059252b}


Obtains the current horizontal position. 

The position can be reported in any of \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aa2b7e3e61dbb7a40adec26c04cb95f67}{unit\-\_\-pixels}, \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982ac82d0bcb0d8fca4f82d84e75e15b5186}{unit\-\_\-dvi} or \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982aee051c4585b3fe9b6b54df051b6ea490}{unit\-\_\-sp}; it is an error to call this function with any other of the defined units.

The conversion to pixel units includes any drift correction, and is correctly rounded. Scaled points are calculated as D\-V\-I units times the overall magnification (that is, we ignore the general case of D\-V\-I files with odd preamble scalings).

\begin{DoxyReturn}{Returns}
the horizontal position, in the chosen units 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classDviError}{Dvi\-Error}} & if we are invoked with an inappropriate unit argument \\
\hline
\end{DoxyExceptions}


References unit\-\_\-dvi, unit\-\_\-pixels, and unit\-\_\-sp.



Referenced by main(), and show\-\_\-position().

\hypertarget{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{\index{Dvi\-File@{Dvi\-File}!curr\-V@{curr\-V}}
\index{curr\-V@{curr\-V}!DviFile@{Dvi\-File}}
\subsubsection[{curr\-V}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::curr\-V (
\begin{DoxyParamCaption}
\item[{{\bf Dvi\-Units}}]{units = {\ttfamily {\bf unit\-\_\-pixels}}}
\end{DoxyParamCaption}
) const throw  {\bf Dvi\-Error}) \hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_afa079cd54c174db0aa46457a627ff0c1}


Obtains the current vertical position. 

See \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H}, to which this is precisely analogous. 

References unit\-\_\-dvi, unit\-\_\-pixels, and unit\-\_\-sp.



Referenced by main(), and show\-\_\-position().

\hypertarget{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}{\index{Dvi\-File@{Dvi\-File}!eof@{eof}}
\index{eof@{eof}!DviFile@{Dvi\-File}}
\subsubsection[{eof}]{\setlength{\rightskip}{0pt plus 5cm}bool Dvi\-File\-::eof (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}


Indicates whether we are at the end of the D\-V\-I file. 

This is true if the underlying file is closed, {\itshape or} if we have read all the pages and \hyperlink{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{get\-Event} has returned a \hyperlink{classDviFilePostamble}{Dvi\-File\-Postamble} event. \begin{DoxyReturn}{Returns}
true if we are at E\-O\-F 
\end{DoxyReturn}


References Input\-Byte\-Stream\-::eof().



Referenced by get\-Event(), and main().

\hypertarget{classDviFile_a46cbea55f623117a404aa80b31086023}{\index{Dvi\-File@{Dvi\-File}!filename@{filename}}
\index{filename@{filename}!DviFile@{Dvi\-File}}
\subsubsection[{filename}]{\setlength{\rightskip}{0pt plus 5cm}const string$\ast$ Dvi\-File\-::filename (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_a46cbea55f623117a404aa80b31086023}


Gets the name of this D\-V\-I file. 

\begin{DoxyReturn}{Returns}
the open file name as a string 
\end{DoxyReturn}


Referenced by main().

\hypertarget{classDviFile_aa22ae3f64419e60aedda55105f9378cb}{\index{Dvi\-File@{Dvi\-File}!get\-End\-Of\-Page@{get\-End\-Of\-Page}}
\index{get\-End\-Of\-Page@{get\-End\-Of\-Page}!DviFile@{Dvi\-File}}
\subsubsection[{get\-End\-Of\-Page}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Dvi\-File\-Event} $\ast$ Dvi\-File\-::get\-End\-Of\-Page (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_aa22ae3f64419e60aedda55105f9378cb}


Skips to the end of the page. 

This reads the D\-V\-I file at high speed until it finds the next end-\/of-\/page event, which it returns, leaving the D\-V\-I file positioned appropriately. If there are in fact no more pages -- if the last end-\/of-\/page event has already been returned -- then return either a \hyperlink{classDviFilePostamble}{Dvi\-File\-Postamble} event or zero, just like \hyperlink{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{get\-Event}.

\begin{DoxyReturn}{Returns}
the next end-\/of-\/page event 
\end{DoxyReturn}


References get\-Event().



Referenced by main().

\hypertarget{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}{\index{Dvi\-File@{Dvi\-File}!get\-Event@{get\-Event}}
\index{get\-Event@{get\-Event}!DviFile@{Dvi\-File}}
\subsubsection[{get\-Event}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Dvi\-File\-Event} $\ast$ Dvi\-File\-::get\-Event (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_a61972430078d5a4e6a5caa5ce454c92a}


Gets an event from the D\-V\-I file. 

This is the routine which does most of the actual work. It scans through the file reading opcodes. Most of these it handles itself, but certain ones it handles by returning an event to the calling routine.

The first event this method will return is the \hyperlink{classDviFilePreamble}{Dvi\-File\-Preamble} event, and the last one is a \hyperlink{classDviFilePostamble}{Dvi\-File\-Postamble} event, after which {\ttfamily \hyperlink{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}{eof()}} will be true, and this method will return only zero.

The events which can be returned are all of the subclasses of \hyperlink{classDviFileEvent}{Dvi\-File\-Event}, qv.

When you are finished with the returned event, you should release it by a call to the event's \hyperlink{classDviFileEvent_a63d6630a9224d369c6cefd5123ce3c6c}{release} method, after which you should make no further reference to it.

\begin{DoxyReturn}{Returns}
the next event from the D\-V\-I file, or zero if {\ttfamily \hyperlink{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}{eof()}} is true 
\end{DoxyReturn}


References Dvi\-File\-Preamble\-::comment, Dvi\-File\-Page\-::count, Dvi\-File\-Preamble\-::den, Dvi\-File\-Preamble\-::dvi\-Type, eof(), i, Dvi\-File\-Preamble\-::mag, normal, Dvi\-File\-Preamble\-::num, and Dvi\-File\-Page\-::previous.



Referenced by get\-End\-Of\-Page(), and main().

\hypertarget{classDviFile_aeccd349cdbaa933d7fc2030560e081b4}{\index{Dvi\-File@{Dvi\-File}!get\-Fallback\-Font@{get\-Fallback\-Font}}
\index{get\-Fallback\-Font@{get\-Fallback\-Font}!DviFile@{Dvi\-File}}
\subsubsection[{get\-Fallback\-Font}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Pk\-Font} $\ast$ Dvi\-File\-::get\-Fallback\-Font (
\begin{DoxyParamCaption}
\item[{const {\bf Pk\-Font} $\ast$}]{desired}
\end{DoxyParamCaption}
)}}\label{classDviFile_aeccd349cdbaa933d7fc2030560e081b4}


Returns a fallback font, for use when a requested font is not available. 

The font returned depends on whether the D\-V\-I postamble was read or not, on what fonts have already been seen in the file, and on the font desired. This flexibility will not, however, stray beyond the liberty given by section 4.\-4, `\-Missing fonts', in the D\-V\-I standard.


\begin{DoxyParams}{Parameters}
{\em desired} & a pointer to the font which was requested (but not, presumably, loaded), or 0 if this information is not available \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to a fallback font, or zero if absolutely no fonts are available 
\end{DoxyReturn}


References Dvi\-File\-::\-Font\-Set\-::begin(), Pk\-Font\-::design\-Size, Dvi\-File\-::\-Font\-Set\-::end(), and get\-Font\-Set().



Referenced by main().

\hypertarget{classDviFile_a7ec85e9da600751dbf52a7c5fec22bea}{\index{Dvi\-File@{Dvi\-File}!get\-Font\-Set@{get\-Font\-Set}}
\index{get\-Font\-Set@{get\-Font\-Set}!DviFile@{Dvi\-File}}
\subsubsection[{get\-Font\-Set}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Font\-Set}$\ast$ Dvi\-File\-::get\-Font\-Set (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_a7ec85e9da600751dbf52a7c5fec22bea}


Obtains a representation of the set of fonts contained in this D\-V\-I file. 

If the postamble was read, then the {\ttfamily \hyperlink{classDviFile_1_1FontSet}{Font\-Set}} returned by this method will be complete; if not, it will simply represent the set of fonts read so far in the file.

\begin{DoxyReturn}{Returns}
a pointer to the \hyperlink{classDviFile_1_1FontSet}{Font\-Set} for this file 
\end{DoxyReturn}


Referenced by get\-Fallback\-Font(), and main().

\hypertarget{classDviFile_addc7e9b528a1302544826d626d5842aa}{\index{Dvi\-File@{Dvi\-File}!have\-Read\-Postamble@{have\-Read\-Postamble}}
\index{have\-Read\-Postamble@{have\-Read\-Postamble}!DviFile@{Dvi\-File}}
\subsubsection[{have\-Read\-Postamble}]{\setlength{\rightskip}{0pt plus 5cm}bool Dvi\-File\-::have\-Read\-Postamble (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_addc7e9b528a1302544826d626d5842aa}


Reports whether the D\-V\-I file postamble was read when this file was opened. 

This affects the semantics of such methods as \hyperlink{classDviFile_a7ec85e9da600751dbf52a7c5fec22bea}{get\-Font\-Set}. Note that this only reports whether the postamble was read at the {\itshape start} of processing, and it does not become true when the postamble is discovered at the end; it is not an end-\/of-\/file indicator. For that, see the \hyperlink{classDviFile_a0bda3121daf3e9009b7e7aa46d6a669f}{eof} method.

\begin{DoxyReturn}{Returns}
true if the postamble was (successfully) read 
\end{DoxyReturn}


Referenced by main().

\hypertarget{classDviFile_a0ae806c759da83c6029bb50c2d0a3987}{\index{Dvi\-File@{Dvi\-File}!h\-Size@{h\-Size}}
\index{h\-Size@{h\-Size}!DviFile@{Dvi\-File}}
\subsubsection[{h\-Size}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::h\-Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_a0ae806c759da83c6029bb50c2d0a3987}


Obtains the `width of the widest page'. 

This is either the value obtained from the postamble of the D\-V\-I file, if that was read, or else the maximum value of the horizontal position (as returned by {\ttfamily \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H()}}), if that is larger. If the postamble has not been read, then this is initialised to -\/1. Note that this isn't the same as the maximum value of \hyperlink{classDviFile_aefa62a58509c27806d5d42aee059252b}{curr\-H}, any more than 0 is the minimum, but if the origin is set `appropriately' (ie, at (1in,1in)), then everything should fit on. It's not a precise figure, but can be useful as a scale for initialising bitmap sizes, for example.

\begin{DoxyReturn}{Returns}
the horizontal size of the largest `page', in pixels 
\end{DoxyReturn}


Referenced by main().

\hypertarget{classDviFile_a99126a8eb463577923c0e89245a90b24}{\index{Dvi\-File@{Dvi\-File}!magnification@{magnification}}
\index{magnification@{magnification}!DviFile@{Dvi\-File}}
\subsubsection[{magnification}]{\setlength{\rightskip}{0pt plus 5cm}double Dvi\-File\-::magnification (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_a99126a8eb463577923c0e89245a90b24}


Return the net magnification factor for the D\-V\-I file. 

\begin{DoxyReturn}{Returns}
the overall magnification factor applied to lengths in the D\-V\-I file. A value of 1.\-0 implies no magnification at all. 
\end{DoxyReturn}


Referenced by main().

\hypertarget{classDviFile_a8e1a3b49bf147f16aeabb518dbaf29e3}{\index{Dvi\-File@{Dvi\-File}!pt2px@{pt2px}}
\index{pt2px@{pt2px}!DviFile@{Dvi\-File}}
\subsubsection[{pt2px}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::pt2px (
\begin{DoxyParamCaption}
\item[{double}]{npt}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classDviFile_a8e1a3b49bf147f16aeabb518dbaf29e3}


Converts a length in points to one in pixels, using the current magnifications and any other relevant parameters. 


\begin{DoxyParams}{Parameters}
{\em npt} & a length in points \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the given length, in pixels 
\end{DoxyReturn}
\hypertarget{classDviFile_a6e0683850f7b4dc066aebc2ab41b2120}{\index{Dvi\-File@{Dvi\-File}!unit\-String@{unit\-String}}
\index{unit\-String@{unit\-String}!DviFile@{Dvi\-File}}
\subsubsection[{unit\-String}]{\setlength{\rightskip}{0pt plus 5cm}string Dvi\-File\-::unit\-String (
\begin{DoxyParamCaption}
\item[{{\bf Dvi\-File\-::\-Dvi\-Units}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_a6e0683850f7b4dc066aebc2ab41b2120}


Gets the string representation of a D\-V\-I unit. 


\begin{DoxyParams}{Parameters}
{\em unit} & the unit in question \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string representing the unit 
\end{DoxyReturn}


References M\-A\-P.



Referenced by main().

\hypertarget{classDviFile_a1a0c717f68d506b76256f843f65b748b}{\index{Dvi\-File@{Dvi\-File}!unit\-Type@{unit\-Type}}
\index{unit\-Type@{unit\-Type}!DviFile@{Dvi\-File}}
\subsubsection[{unit\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Dvi\-File\-::\-Dvi\-Units} Dvi\-File\-::unit\-Type (
\begin{DoxyParamCaption}
\item[{string}]{unit\-String}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_a1a0c717f68d506b76256f843f65b748b}


Convert a string to a unit. 


\begin{DoxyParams}{Parameters}
{\em unit\-String} & one of the strings representing a D\-V\-I unit \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the appropriate member of the \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982}{Dvi\-Units} enum, or \hyperlink{classDviFile_a7ff390c8c958d5280a1a96c3ad659982a7f3d4b27872a11c803fe7dd33b20a19c}{unit\-\_\-\-B\-A\-D} if the unit string is not recognised 
\end{DoxyReturn}


References i, M\-A\-P, u, unit\-\_\-\-B\-A\-D, unit\-\_\-dvi, and unit\-\_\-pixels.



Referenced by main().

\hypertarget{classDviFile_a43cc50a8ebead60efd612c028b0c6ca6}{\index{Dvi\-File@{Dvi\-File}!verbosity@{verbosity}}
\index{verbosity@{verbosity}!DviFile@{Dvi\-File}}
\subsubsection[{verbosity}]{\setlength{\rightskip}{0pt plus 5cm}{\bf verbosities} Dvi\-File\-::verbosity (
\begin{DoxyParamCaption}
\item[{const {\bf verbosities}}]{level}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classDviFile_a43cc50a8ebead60efd612c028b0c6ca6}


Sets the verbosity of this module. 


\begin{DoxyParams}{Parameters}
{\em level} & the required verbosity \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the previous verbosity level 
\end{DoxyReturn}


References Dvi\-File\-Event\-::verbosity().



Referenced by main().

\hypertarget{classDviFile_a0e43ecef9bffd730ad69477f69e36c1b}{\index{Dvi\-File@{Dvi\-File}!v\-Size@{v\-Size}}
\index{v\-Size@{v\-Size}!DviFile@{Dvi\-File}}
\subsubsection[{v\-Size}]{\setlength{\rightskip}{0pt plus 5cm}int Dvi\-File\-::v\-Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classDviFile_a0e43ecef9bffd730ad69477f69e36c1b}


Obtains the `height plus depth of the tallest page'. 

\begin{DoxyVerb}This is either the
\end{DoxyVerb}
 value obtained from the postamble of the D\-V\-I file, if that was read, or else the maximum value of the vertical position (as returned by {\ttfamily \hyperlink{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{curr\-V()}}), if that is larger. If the postamble has not been read, then this is initialised to -\/1. Note that this isn't the same as the maximum value of \hyperlink{classDviFile_afa079cd54c174db0aa46457a627ff0c1}{curr\-V}, any more than 0 is the minimum, but if the origin is set `appropriately' (ie, at (1in,1in)), then everything should fit on. It's not a precise figure, but can be useful as a scale for initialising bitmap sizes, for example.

\begin{DoxyReturn}{Returns}
the vertical size of the largest `page', in pixels 
\end{DoxyReturn}


Referenced by main().



\subsection{Member Data Documentation}
\hypertarget{classDviFile_ad43f0e36d322bdf2724af58c31856324}{\index{Dvi\-File@{Dvi\-File}!comment@{comment}}
\index{comment@{comment}!DviFile@{Dvi\-File}}
\subsubsection[{comment}]{\setlength{\rightskip}{0pt plus 5cm}string Dvi\-File\-::comment}}\label{classDviFile_ad43f0e36d322bdf2724af58c31856324}
\hypertarget{classDviFile_a805814f09e928b0edc14604fcdafbea7}{\index{Dvi\-File@{Dvi\-File}!den@{den}}
\index{den@{den}!DviFile@{Dvi\-File}}
\subsubsection[{den}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::den}}\label{classDviFile_a805814f09e928b0edc14604fcdafbea7}
\hypertarget{classDviFile_aa2266a2e8a8f00feeca23abc869448d5}{\index{Dvi\-File@{Dvi\-File}!i@{i}}
\index{i@{i}!DviFile@{Dvi\-File}}
\subsubsection[{i}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::i}}\label{classDviFile_aa2266a2e8a8f00feeca23abc869448d5}


Referenced by get\-Event(), and unit\-Type().

\hypertarget{classDviFile_a23b35564372e6d4b0361fc218ae16775}{\index{Dvi\-File@{Dvi\-File}!l@{l}}
\index{l@{l}!DviFile@{Dvi\-File}}
\subsubsection[{l}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::l}}\label{classDviFile_a23b35564372e6d4b0361fc218ae16775}
\hypertarget{classDviFile_ae0bcd6b576af34c1f46883a996128c15}{\index{Dvi\-File@{Dvi\-File}!mag@{mag}}
\index{mag@{mag}!DviFile@{Dvi\-File}}
\subsubsection[{mag}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::mag}}\label{classDviFile_ae0bcd6b576af34c1f46883a996128c15}
\hypertarget{classDviFile_ab6e50204df1a264516840d3f107ebd77}{\index{Dvi\-File@{Dvi\-File}!num@{num}}
\index{num@{num}!DviFile@{Dvi\-File}}
\subsubsection[{num}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::num}}\label{classDviFile_ab6e50204df1a264516840d3f107ebd77}
\hypertarget{classDviFile_a15b8125de3dc85838fae5268c0cf1557}{\index{Dvi\-File@{Dvi\-File}!s@{s}}
\index{s@{s}!DviFile@{Dvi\-File}}
\subsubsection[{s}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::s}}\label{classDviFile_a15b8125de3dc85838fae5268c0cf1557}
\hypertarget{classDviFile_aeca00a3cfa33dfed11fd0b55e815bdbd}{\index{Dvi\-File@{Dvi\-File}!t@{t}}
\index{t@{t}!DviFile@{Dvi\-File}}
\subsubsection[{t}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::t}}\label{classDviFile_aeca00a3cfa33dfed11fd0b55e815bdbd}
\hypertarget{classDviFile_a4b59353fef57f5ad35e0b811ef2f961b}{\index{Dvi\-File@{Dvi\-File}!u@{u}}
\index{u@{u}!DviFile@{Dvi\-File}}
\subsubsection[{u}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int Dvi\-File\-::u}}\label{classDviFile_a4b59353fef57f5ad35e0b811ef2f961b}


Referenced by unit\-Type().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{DviFile_8h}{Dvi\-File.\-h}\item 
\hyperlink{DviFile_8cc}{Dvi\-File.\-cc}\end{DoxyCompactItemize}

.
