Browse Source

+ Added desciption of modes

michael 25 years ago
parent
commit
47c7b18700
1 changed files with 196 additions and 21 deletions
  1. 196 21
      docs/graph.tex

+ 196 - 21
docs/graph.tex

@@ -21,8 +21,11 @@
 % Documentation for the 'Graph' unit of Free Pascal.
 % Documentation for the 'Graph' unit of Free Pascal.
 % Michael Van Canneyt, July 1997
 % Michael Van Canneyt, July 1997
 \chapter{The GRAPH unit.}
 \chapter{The GRAPH unit.}
+\FPCexampledir{graphex}
 This document describes the \var{GRAPH} unit for Free Pascal, for all
 This document describes the \var{GRAPH} unit for Free Pascal, for all
-platforms. The unit was first written for \dos by Florian kl\"ampfl. 
+platforms. The unit was first written for \dos by Florian kl\"ampfl, but was
+later completely rewritten by Carl-Eric Codere to be completely portable.
+
 This chapter is divided in 4 sections. 
 This chapter is divided in 4 sections. 
 \begin{itemize}
 \begin{itemize}
 \item The first section gives an introduction to the graph unit.
 \item The first section gives an introduction to the graph unit.
@@ -36,11 +39,90 @@ interface part of the \file{GRAPH} unit.
 \label{se:Introduction}
 \label{se:Introduction}
 \subsection{Requirements}
 \subsection{Requirements}
 The unit Graph exports functions and procedures for graphical output.
 The unit Graph exports functions and procedures for graphical output.
-It requires at least a VESA compatible VGA-Card or a VGA-Card with software-driver
+It requires at least a VGA-compatible Card or a VGA-Card with software-driver
 (min. \textbf{512Kb} video memory).
 (min. \textbf{512Kb} video memory).
-Before the graph unit can be used, be sure your graphics adapter supports
-the VESA-Standard. Otherwise in the most cases you can try to use a VESA-TSR
-to make your adapter VESA compatible (e.g. UNIVBE).
+\subsection{A word about mode selection}
+The graph unit was implemented for compatibility with the old \tp graph
+unit. For this reason, the mode constants as they were defined in the
+\tp graph unit are retained. 
+
+However, since
+\begin{enumerate}
+\item Video cards have evolved very much
+\item Free Pascal runs on multiple platforms
+\end{enumerate}
+it was decided to implement new mode and graphic driver constants, 
+which are more independent of the specific platform the program runs on.
+
+In this section we give a short explanation of the new mode system. the
+following drivers were defined:
+\begin{verbatim}
+D1bit = 11;
+D2bit = 12;
+D4bit = 13;
+D6bit = 14;  { 64 colors Half-brite mode - Amiga }
+D8bit = 15;
+D12bit = 16; { 4096 color modes HAM mode - Amiga }
+D15bit = 17;
+D16bit = 18;
+D24bit = 19; { not yet supported }
+D32bit = 20; { not yet supported }
+D64bit = 21; { not yet supported }
+
+lowNewDriver = 11;
+highNewDriver = 21;
+\end{verbatim}
+Each of these drivers specifies a desired color-depth. 
+
+The following modes have been defined:
+\begin{verbatim}
+detectMode = 30000;
+m320x200 = 30001;  
+m320x256 = 30002; { amiga resolution (PAL) }
+m320x400 = 30003; { amiga/atari resolution }
+m512x384 = 30004; { mac resolution }
+m640x200 = 30005; { vga resolution }
+m640x256 = 30006; { amiga resolution (PAL) }
+m640x350 = 30007; { vga resolution }
+m640x400 = 30008;
+m640x480 = 30009;
+m800x600 = 30010;
+m832x624 = 30011; { mac resolution }
+m1024x768 = 30012;
+m1280x1024 = 30013;
+m1600x1200 = 30014;
+m2048x1536 = 30015;
+
+lowNewMode = 30001;
+highNewMode = 30015;
+\end{verbatim}
+These modes start at 30000 because Borland specified that the mode number
+should be ascending with increasing X resolution, and the new constants 
+shouldn't interfere with the old ones.
+
+The above constants can be used to set a certain color depth and resultion,
+as demonstrated in the following example:
+
+\FPCexample{inigraph1}
+
+If other modes than the ones above are supported by the graphics card,
+you will not be able to select them with this mechanism.
+
+For this reason, there is also a 'dynamic' mode number, which is assigned at
+run-time. This number increases with increasing X resolution. It can be
+queried with the \var{getmoderange} call. This call will return the range
+of modes which are valid for a certain graphics driver. The numbers are
+guaranteed to be consecutive, and can be used to search for a certain 
+resolution, as in the following example:
+
+\FPCexample{inigraph2}
+
+
+Thus, the \var{getmoderange} function can be used to detect all available 
+modes and drivers, as in the following example:
+
+\FPCexample{modrange}
+
 \section{Constants, Types and Variables}
 \section{Constants, Types and Variables}
 \subsection{Types}
 \subsection{Types}
 \begin{verbatim}
 \begin{verbatim}
@@ -69,7 +151,9 @@ ViewPortType = Record
   Clip : Boolean
   Clip : Boolean
 end;
 end;
 \end{verbatim}
 \end{verbatim}
+
 \section{Functions and procedures}
 \section{Functions and procedures}
+
 \begin{procedure}{Arc}
 \begin{procedure}{Arc}
 \Declaration
 \Declaration
 Procedure Arc (X,Y : Integer; start,stop, radius : Word);
 Procedure Arc (X,Y : Integer; start,stop, radius : Word);
@@ -85,6 +169,7 @@ None.
 \seep{Circle},\seep{Ellipse} 
 \seep{Circle},\seep{Ellipse} 
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Bar}
 \begin{procedure}{Bar}
 \Declaration
 \Declaration
 Procedure Bar (X1,Y1,X2,Y2 : Integer);
 Procedure Bar (X1,Y1,X2,Y2 : Integer);
@@ -98,6 +183,7 @@ None.
 \seep{Bar3D}, 
 \seep{Bar3D}, 
 \seep{Rectangle}
 \seep{Rectangle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Bar3D}
 \begin{procedure}{Bar3D}
 \Declaration
 \Declaration
 Procedure Bar3D (X1,Y1,X2,Y2 : Integer; depth : Word; Top : Boolean);
 Procedure Bar3D (X1,Y1,X2,Y2 : Integer; depth : Word; Top : Boolean);
@@ -113,6 +199,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Bar}, \seep{Rectangle}
 \seep{Bar}, \seep{Rectangle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Circle}
 \begin{procedure}{Circle}
 \Declaration
 \Declaration
 Procedure Circle (X,Y : Integer; Radius : Word);
 Procedure Circle (X,Y : Integer; Radius : Word);
@@ -126,6 +213,7 @@ None.
 \seep{Ellipse},\seep{Arc}
 \seep{Ellipse},\seep{Arc}
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{ClearDevice}
 \begin{procedure}{ClearDevice}
 \Declaration
 \Declaration
 Procedure ClearDevice ;
 Procedure ClearDevice ;
@@ -138,12 +226,13 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{ClearViewPort}, \seep{SetBkColor}
 \seep{ClearViewPort}, \seep{SetBkColor}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{ClearViewPort}
 \begin{procedure}{ClearViewPort}
 \Declaration
 \Declaration
 Procedure ClearViewPort ;
 Procedure ClearViewPort ;
 
 
 \Description
 \Description
-Clears the current view-port. The current background color is used as filling
+Clears the current viewport. The current background color is used as filling
 color. The pointer is set at
 color. The pointer is set at
 \var{(0,0)}
 \var{(0,0)}
 \Errors
 \Errors
@@ -151,6 +240,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{ClearDevice},\seep{SetViewPort}, \seep{SetBkColor}
 \seep{ClearDevice},\seep{SetViewPort}, \seep{SetBkColor}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{CloseGraph}
 \begin{procedure}{CloseGraph}
 \Declaration
 \Declaration
 Procedure CloseGraph ;
 Procedure CloseGraph ;
@@ -164,6 +254,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{DetectGraph}
 \begin{procedure}{DetectGraph}
 \Declaration
 \Declaration
 Procedure DetectGraph (Var Driver, Modus : Integer);
 Procedure DetectGraph (Var Driver, Modus : Integer);
@@ -178,6 +269,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{DrawPoly}
 \begin{procedure}{DrawPoly}
 \Declaration
 \Declaration
 Procedure DrawPoly (NumberOfPoints : Word; Var PolyPoints;
 Procedure DrawPoly (NumberOfPoints : Word; Var PolyPoints;
@@ -192,6 +284,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Bar}, seep{Bar3D}, \seep{Rectangle}
 \seep{Bar}, seep{Bar3D}, \seep{Rectangle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Ellipse}
 \begin{procedure}{Ellipse}
 \Declaration
 \Declaration
 Procedure Ellipse (X,Y : Integer; Start,Stop,XRadius,YRadius : Word);
 Procedure Ellipse (X,Y : Integer; Start,Stop,XRadius,YRadius : Word);
@@ -207,6 +300,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Arc} \seep{Circle}, \seep{FillEllipse}
 \seep{Arc} \seep{Circle}, \seep{FillEllipse}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{FillEllipse}
 \begin{procedure}{FillEllipse}
 \Declaration
 \Declaration
 Procedure FillEllipse (X,Y : Integer; Xradius,YRadius: Word);
 Procedure FillEllipse (X,Y : Integer; Xradius,YRadius: Word);
@@ -221,6 +315,7 @@ None.
 \seep{Arc} \seep{Circle},
 \seep{Arc} \seep{Circle},
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \seep{GetArcCoords},\seep{PieSlice}, \seep{Sector}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{FillPoly}
 \begin{procedure}{FillPoly}
 \Declaration
 \Declaration
 Procedure FillPoly (NumberOfPoints : Word; Var PolyPoints);
 Procedure FillPoly (NumberOfPoints : Word; Var PolyPoints);
@@ -236,6 +331,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Bar}, seep{Bar3D}, \seep{Rectangle}
 \seep{Bar}, seep{Bar3D}, \seep{Rectangle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{FloodFill}
 \begin{procedure}{FloodFill}
 \Declaration
 \Declaration
 Procedure FloodFill (X,Y : Integer; BorderColor : Word);
 Procedure FloodFill (X,Y : Integer; BorderColor : Word);
@@ -249,6 +345,7 @@ None
 \SeeAlso
 \SeeAlso
 \seep{SetColor}, \seep{SetBkColor}
 \seep{SetColor}, \seep{SetBkColor}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetArcCoords}
 \begin{procedure}{GetArcCoords}
 \Declaration
 \Declaration
 Procedure GetArcCoords (Var ArcCoords : ArcCoordsType);
 Procedure GetArcCoords (Var ArcCoords : ArcCoordsType);
@@ -261,6 +358,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Arc}, \seep{Ellipse}
 \seep{Arc}, \seep{Ellipse}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetAspectRatio}
 \begin{procedure}{GetAspectRatio}
 \Declaration
 \Declaration
 Procedure GetAspectRatio (Var Xasp,Yasp : Word);
 Procedure GetAspectRatio (Var Xasp,Yasp : Word);
@@ -273,6 +371,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph},\seep{SetAspectRatio}
 \seep{InitGraph},\seep{SetAspectRatio}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetBkColor}
 \begin{function}{GetBkColor}
 \Declaration
 \Declaration
 Function GetBkColor  : Word;
 Function GetBkColor  : Word;
@@ -285,6 +384,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetColor},\seep{SetBkColor}
 \seef{GetColor},\seep{SetBkColor}
 \end{function}
 \end{function}
+
 \begin{function}{GetColor}
 \begin{function}{GetColor}
 \Declaration
 \Declaration
 Function GetColor  : Word;
 Function GetColor  : Word;
@@ -297,6 +397,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetColor},\seep{SetBkColor}
 \seef{GetColor},\seep{SetBkColor}
 \end{function}
 \end{function}
+
 \begin{procedure}{GetDefaultPalette}
 \begin{procedure}{GetDefaultPalette}
 \Declaration
 \Declaration
 Procedure GetDefaultPalette (Var Palette : PaletteType);
 Procedure GetDefaultPalette (Var Palette : PaletteType);
@@ -309,6 +410,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetColor}, \seef{GetBkColor}
 \seef{GetColor}, \seef{GetBkColor}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetDriverName}
 \begin{function}{GetDriverName}
 \Declaration
 \Declaration
 Function GetDriverName  : String;
 Function GetDriverName  : String;
@@ -321,6 +423,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetModeName}, \seep{InitGraph}
 \seef{GetModeName}, \seep{InitGraph}
 \end{function}
 \end{function}
+
 \begin{procedure}{GetFillPattern}
 \begin{procedure}{GetFillPattern}
 \Declaration
 \Declaration
 Procedure GetFillPattern (Var FillPattern : FillPatternType);
 Procedure GetFillPattern (Var FillPattern : FillPatternType);
@@ -332,6 +435,7 @@ None
 \SeeAlso
 \SeeAlso
 \seep{SetFillPattern}
 \seep{SetFillPattern}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetFillSettings}
 \begin{procedure}{GetFillSettings}
 \Declaration
 \Declaration
 Procedure GetFillSettings (Var FillInfo : FillSettingsType);
 Procedure GetFillSettings (Var FillInfo : FillSettingsType);
@@ -344,6 +448,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetFillPattern}
 \seep{SetFillPattern}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetGraphMode}
 \begin{function}{GetGraphMode}
 \Declaration
 \Declaration
 Function GetGraphMode  : Integer;
 Function GetGraphMode  : Integer;
@@ -355,6 +460,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{function}
 \end{function}
+
 \begin{procedure}{GetImage}
 \begin{procedure}{GetImage}
 \Declaration
 \Declaration
 Procedure GetImage (X1,Y1,X2,Y2 : Integer, Var Bitmap;
 Procedure GetImage (X1,Y1,X2,Y2 : Integer, Var Bitmap;
@@ -368,6 +474,7 @@ Bitmap must have enough room to contain the image.
 \seef{ImageSize},
 \seef{ImageSize},
 \seep{PutImage}
 \seep{PutImage}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetLineSettings}
 \begin{procedure}{GetLineSettings}
 \Declaration
 \Declaration
 Procedure GetLineSettings (Var LineInfo : LineSettingsType);
 Procedure GetLineSettings (Var LineInfo : LineSettingsType);
@@ -380,19 +487,22 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetLineStyle}
 \seep{SetLineStyle}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetMaxColor}
 \begin{function}{GetMaxColor}
 \Declaration
 \Declaration
 Function GetMaxColor  : Word;
 Function GetMaxColor  : Word;
 
 
 \Description
 \Description
-\var{GetMaxColor} returns the maximum
-color-number which can be set with \var{SetColor}
+\var{GetMaxColor} returns the maximum color-number which can be 
+set with \var{SetColor}. Contrary to \tp, this color isn't always 
+guaranteed to be white (for instance in 256+ color modes).
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{SetColor},
 \seep{SetColor},
 \seef{GetPaletteSize}
 \seef{GetPaletteSize}
 \end{function}
 \end{function}
+
 \begin{function}{GetMaxMode}
 \begin{function}{GetMaxMode}
 \Declaration
 \Declaration
 Function GetMaxMode  : Word;
 Function GetMaxMode  : Word;
@@ -405,6 +515,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{function}
 \end{function}
+
 \begin{function}{GetMaxX}
 \begin{function}{GetMaxX}
 \Declaration
 \Declaration
 Function GetMaxX  : Word;
 Function GetMaxX  : Word;
@@ -417,6 +528,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetMaxY}
 \seef{GetMaxY}
 \end{function}
 \end{function}
+
 \begin{function}{GetMaxY}
 \begin{function}{GetMaxY}
 \Declaration
 \Declaration
 Function GetMaxY  : Word;
 Function GetMaxY  : Word;
@@ -429,6 +541,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetMaxY}
 \seef{GetMaxY}
 \end{function}
 \end{function}
+
 \begin{function}{GetModeName}
 \begin{function}{GetModeName}
 \Declaration
 \Declaration
 Function GetModeName (Var modus : Integer) : String;
 Function GetModeName (Var modus : Integer) : String;
@@ -442,18 +555,20 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetDriverName}, \seep{InitGraph}
 \seef{GetDriverName}, \seep{InitGraph}
 \end{function}
 \end{function}
+
 \begin{procedure}{GetModeRange}
 \begin{procedure}{GetModeRange}
 \Declaration
 \Declaration
 Procedure GetModeRange (Driver : Integer; \\ LoModus, HiModus: Integer);
 Procedure GetModeRange (Driver : Integer; \\ LoModus, HiModus: Integer);
-
 \Description
 \Description
 \var{GetModeRange} returns the Lowest and Highest modus of the currently
 \var{GetModeRange} returns the Lowest and Highest modus of the currently
-installed driver.
+installed driver. If no modes are supported for this driver, HiModus
+will be -1.
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetPalette}
 \begin{procedure}{GetPalette}
 \Declaration
 \Declaration
 Procedure GetPalette (Var Palette : PaletteType);
 Procedure GetPalette (Var Palette : PaletteType);
@@ -465,6 +580,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetPaletteSize}, \seep{SetPalette}
 \seef{GetPaletteSize}, \seep{SetPalette}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetPaletteSize}
 \begin{function}{GetPaletteSize}
 \Declaration
 \Declaration
 Function GetPaletteSize  : Word;
 Function GetPaletteSize  : Word;
@@ -478,6 +594,7 @@ None.
 \seep{GetPalette},
 \seep{GetPalette},
 \seep{SetPalette}
 \seep{SetPalette}
 \end{function}
 \end{function}
+
 \begin{function}{GetPixel}
 \begin{function}{GetPixel}
 \Declaration
 \Declaration
 Function GetPixel (X,Y : Integer) : Word;
 Function GetPixel (X,Y : Integer) : Word;
@@ -490,6 +607,7 @@ None.
 \SeeAlso
 \SeeAlso
 
 
 \end{function}
 \end{function}
+
 \begin{procedure}{GetTextSettings}
 \begin{procedure}{GetTextSettings}
 \Declaration
 \Declaration
 Procedure GetTextSettings (Var TextInfo : TextSettingsType);
 Procedure GetTextSettings (Var TextInfo : TextSettingsType);
@@ -503,18 +621,20 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetTextStyle}, \seep{SetTextJustify}
 \seep{SetTextStyle}, \seep{SetTextJustify}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{GetViewSettings}
 \begin{procedure}{GetViewSettings}
 \Declaration
 \Declaration
 Procedure GetViewSettings (Var ViewPort : ViewPortType);
 Procedure GetViewSettings (Var ViewPort : ViewPortType);
 
 
 \Description
 \Description
-\var{GetViewSettings} returns the current view-port and clipping settings in
+\var{GetViewSettings} returns the current viewport and clipping settings in
 \var{ViewPort}.
 \var{ViewPort}.
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{SetViewPort}
 \seep{SetViewPort}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GetX}
 \begin{function}{GetX}
 \Declaration
 \Declaration
 Function GetX  : Integer;
 Function GetX  : Integer;
@@ -527,6 +647,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetY}
 \seef{GetY}
 \end{function}
 \end{function}
+
 \begin{function}{GetY}
 \begin{function}{GetY}
 \Declaration
 \Declaration
 Function GetY  : Integer;
 Function GetY  : Integer;
@@ -539,12 +660,13 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetX}
 \seef{GetX}
 \end{function}
 \end{function}
+
 \begin{procedure}{GraphDefaults}
 \begin{procedure}{GraphDefaults}
 \Declaration
 \Declaration
 Procedure GraphDefaults ;
 Procedure GraphDefaults ;
 
 
 \Description
 \Description
-\var{GraphDefaults} resets all settings for view-port, palette,
+\var{GraphDefaults} resets all settings for viewport, palette,
 foreground and background pattern, line-style and pattern, filling style,
 foreground and background pattern, line-style and pattern, filling style,
 filling color and pattern, font, text-placement and
 filling color and pattern, font, text-placement and
 text size.
 text size.
@@ -554,6 +676,7 @@ None.
 \seep{SetViewPort}, \seep{SetFillStyle}, \seep{SetColor},
 \seep{SetViewPort}, \seep{SetFillStyle}, \seep{SetColor},
 \seep{SetBkColor}, \seep{SetLineStyle}
 \seep{SetBkColor}, \seep{SetLineStyle}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{GraphErrorMsg}
 \begin{function}{GraphErrorMsg}
 \Declaration
 \Declaration
 Function GraphErrorMsg (ErrorCode : Integer) : String;
 Function GraphErrorMsg (ErrorCode : Integer) : String;
@@ -567,6 +690,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GraphResult}
 \seef{GraphResult}
 \end{function}
 \end{function}
+
 \begin{function}{GraphResult}
 \begin{function}{GraphResult}
 \Declaration
 \Declaration
 Function GraphResult  : Integer;
 Function GraphResult  : Integer;
@@ -575,9 +699,10 @@ Function GraphResult  : Integer;
 \var{GraphResult} returns an error-code for
 \var{GraphResult} returns an error-code for
 the last graphical operation. If the returned value is zero, all went well.
 the last graphical operation. If the returned value is zero, all went well.
 A value different from zero means an error has occurred.
 A value different from zero means an error has occurred.
-Except for all operations which draw something on the screen, 
+besides all operations which draw something on the screen, 
 the following procedures also can produce a \var{GraphResult} different from
 the following procedures also can produce a \var{GraphResult} different from
 zero:
 zero:
+
 \begin{itemize}
 \begin{itemize}
 \item \seef{InstallUserFont}
 \item \seef{InstallUserFont}
 \item \seep{SetLineStyle}
 \item \seep{SetLineStyle}
@@ -593,6 +718,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GraphErrorMsg}
 \seef{GraphErrorMsg}
 \end{function}
 \end{function}
+
 \begin{function}{ImageSize}
 \begin{function}{ImageSize}
 \Declaration
 \Declaration
 Function ImageSize (X1,Y1,X2,Y2 : Integer) : Word;
 Function ImageSize (X1,Y1,X2,Y2 : Integer) : Word;
@@ -606,6 +732,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{GetImage}
 \seep{GetImage}
 \end{function}
 \end{function}
+
 \begin{procedure}{InitGraph}
 \begin{procedure}{InitGraph}
 \Declaration
 \Declaration
 Procedure InitGraph (var GraphDriver,GraphModus : integer;\\
 Procedure InitGraph (var GraphDriver,GraphModus : integer;\\
@@ -631,6 +758,7 @@ Introduction, (page \pageref{se:Introduction}),
 \seep{DetectGraph}, \seep{CloseGraph}, \seef{GraphResult}
 \seep{DetectGraph}, \seep{CloseGraph}, \seef{GraphResult}
 \end{procedure}
 \end{procedure}
 Example:
 Example:
+
 \begin{verbatim}
 \begin{verbatim}
 var 
 var 
    gd,gm : integer; 
    gd,gm : integer; 
@@ -646,6 +774,7 @@ begin
    CloseGraph; { restores the old graphics mode } 
    CloseGraph; { restores the old graphics mode } 
 end.
 end.
 \end{verbatim}
 \end{verbatim}
+
 \begin{function}{InstallUserDriver}
 \begin{function}{InstallUserDriver}
 \Declaration
 \Declaration
 Function InstallUserDriver (DriverPath : String; \\AutoDetectPtr: Pointer) : Integer;
 Function InstallUserDriver (DriverPath : String; \\AutoDetectPtr: Pointer) : Integer;
@@ -659,6 +788,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}, \seef{InstallUserFont}
 \seep{InitGraph}, \seef{InstallUserFont}
 \end{function}
 \end{function}
+
 \begin{function}{InstallUserFont}
 \begin{function}{InstallUserFont}
 \Declaration
 \Declaration
 Function InstallUserFont (FontPath : String) : Integer;
 Function InstallUserFont (FontPath : String) : Integer;
@@ -671,6 +801,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}, \seef{InstallUserDriver}
 \seep{InitGraph}, \seef{InstallUserDriver}
 \end{function}
 \end{function}
+
 \begin{procedure}{Line}
 \begin{procedure}{Line}
 \Declaration
 \Declaration
 Procedure Line (X1,Y1,X2,Y2 : Integer);
 Procedure Line (X1,Y1,X2,Y2 : Integer);
@@ -684,6 +815,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{LineRel},\seep{LineTo}
 \seep{LineRel},\seep{LineTo}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{LineRel}
 \begin{procedure}{LineRel}
 \Declaration
 \Declaration
 Procedure LineRel (DX,DY : Integer);
 Procedure LineRel (DX,DY : Integer);
@@ -698,6 +830,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Line}, \seep{LineTo}
 \seep{Line}, \seep{LineTo}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{LineTo}
 \begin{procedure}{LineTo}
 \Declaration
 \Declaration
 Procedure LineTo (DX,DY : Integer);
 Procedure LineTo (DX,DY : Integer);
@@ -712,6 +845,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{LineRel},\seep{Line}
 \seep{LineRel},\seep{Line}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{MoveRel}
 \begin{procedure}{MoveRel}
 \Declaration
 \Declaration
 Procedure MoveRel (DX,DY : Integer;
 Procedure MoveRel (DX,DY : Integer;
@@ -725,6 +859,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{MoveTo}
 \seep{MoveTo}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{MoveTo}
 \begin{procedure}{MoveTo}
 \Declaration
 \Declaration
 Procedure MoveTo (X,Y : Integer;
 Procedure MoveTo (X,Y : Integer;
@@ -737,6 +872,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{MoveRel}
 \seep{MoveRel}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{OutText}
 \begin{procedure}{OutText}
 \Declaration
 \Declaration
 Procedure OutText (Const TextString : String);
 Procedure OutText (Const TextString : String);
@@ -750,6 +886,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{OutTextXY}
 \seep{OutTextXY}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{OutTextXY}
 \begin{procedure}{OutTextXY}
 \Declaration
 \Declaration
 Procedure OutTextXY (X,Y : Integer; Const TextString : String);
 Procedure OutTextXY (X,Y : Integer; Const TextString : String);
@@ -763,6 +900,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{OutText}
 \seep{OutText}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{PieSlice}
 \begin{procedure}{PieSlice}
 \Declaration
 \Declaration
 Procedure PieSlice (X,Y : Integer; \\ Start,Stop,Radius : Word);
 Procedure PieSlice (X,Y : Integer; \\ Start,Stop,Radius : Word);
@@ -776,6 +914,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Arc}, \seep{Circle}, \seep{Sector}
 \seep{Arc}, \seep{Circle}, \seep{Sector}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{PutImage}
 \begin{procedure}{PutImage}
 \Declaration
 \Declaration
 Procedure PutImage (X1,Y1 : Integer; Var Bitmap; How : word) ;
 Procedure PutImage (X1,Y1 : Integer; Var Bitmap; How : word) ;
@@ -784,6 +923,7 @@ Procedure PutImage (X1,Y1 : Integer; Var Bitmap; How : word) ;
 \var{PutImage}
 \var{PutImage}
 Places the bitmap in \var{Bitmap} on the screen at \var{(X1,Y1)}. \var{How}
 Places the bitmap in \var{Bitmap} on the screen at \var{(X1,Y1)}. \var{How}
 determines how the bitmap will be placed on the screen. Possible values are :
 determines how the bitmap will be placed on the screen. Possible values are :
+
 \begin{itemize}
 \begin{itemize}
 \item CopyPut
 \item CopyPut
 \item XORPut
 \item XORPut
@@ -796,6 +936,7 @@ None
 \SeeAlso
 \SeeAlso
 \seef{ImageSize},\seep{GetImage}
 \seef{ImageSize},\seep{GetImage}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{PutPixel}
 \begin{procedure}{PutPixel}
 \Declaration
 \Declaration
 Procedure PutPixel (X,Y : Integer; Color : Word);
 Procedure PutPixel (X,Y : Integer; Color : Word);
@@ -808,6 +949,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetPixel}
 \seef{GetPixel}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Rectangle}
 \begin{procedure}{Rectangle}
 \Declaration
 \Declaration
 Procedure Rectangle (X1,Y1,X2,Y2 : Integer);
 Procedure Rectangle (X1,Y1,X2,Y2 : Integer);
@@ -821,6 +963,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Bar}, \seep{Bar3D}
 \seep{Bar}, \seep{Bar3D}
 \end{procedure}
 \end{procedure}
+
 \begin{function}{RegisterBGIDriver}
 \begin{function}{RegisterBGIDriver}
 \Declaration
 \Declaration
 Function RegisterBGIDriver (Driver : Pointer) : Integer;
 Function RegisterBGIDriver (Driver : Pointer) : Integer;
@@ -833,6 +976,7 @@ None.
 \seef{InstallUserDriver},
 \seef{InstallUserDriver},
 \seef{RegisterBGIFont}
 \seef{RegisterBGIFont}
 \end{function}
 \end{function}
+
 \begin{function}{RegisterBGIFont}
 \begin{function}{RegisterBGIFont}
 \Declaration
 \Declaration
 Function RegisterBGIFont (Font : Pointer) : Integer;
 Function RegisterBGIFont (Font : Pointer) : Integer;
@@ -845,6 +989,7 @@ None.
 \seef{InstallUserFont},
 \seef{InstallUserFont},
 \seef{RegisterBGIDriver}
 \seef{RegisterBGIDriver}
 \end{function}
 \end{function}
+
 \begin{procedure}{RestoreCRTMode}
 \begin{procedure}{RestoreCRTMode}
 \Declaration
 \Declaration
 Procedure RestoreCRTMode ;
 Procedure RestoreCRTMode ;
@@ -852,11 +997,15 @@ Procedure RestoreCRTMode ;
 \Description
 \Description
 Restores the screen modus which was active before
 Restores the screen modus which was active before
 the graphical modus was started.
 the graphical modus was started.
+
+To get back to the graph mode you were last in, you can use
+\var{SetGraphMode(GetGraphMode)}
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{Sector}
 \begin{procedure}{Sector}
 \Declaration
 \Declaration
 Procedure Sector (X,Y : Integer; \\ Start,Stop,XRadius,YRadius : Word);
 Procedure Sector (X,Y : Integer; \\ Start,Stop,XRadius,YRadius : Word);
@@ -870,6 +1019,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{Arc}, \seep{Circle}, \seep{PieSlice}
 \seep{Arc}, \seep{Circle}, \seep{PieSlice}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetActivePage}
 \begin{procedure}{SetActivePage}
 \Declaration
 \Declaration
 Procedure SetActivePage (Page : Word);
 Procedure SetActivePage (Page : Word);
@@ -882,6 +1032,7 @@ None.
 \SeeAlso
 \SeeAlso
 
 
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetAllPallette}
 \begin{procedure}{SetAllPallette}
 \Declaration
 \Declaration
 Procedure SetAllPallette (Var Palette);
 Procedure SetAllPallette (Var Palette);
@@ -895,6 +1046,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{GetPalette}
 \seep{GetPalette}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetAspectRatio}
 \begin{procedure}{SetAspectRatio}
 \Declaration
 \Declaration
 Procedure SetAspectRatio (Xasp,Yasp : Word);
 Procedure SetAspectRatio (Xasp,Yasp : Word);
@@ -907,6 +1059,7 @@ None
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}, \seep{GetAspectRatio}
 \seep{InitGraph}, \seep{GetAspectRatio}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetBkColor}
 \begin{procedure}{SetBkColor}
 \Declaration
 \Declaration
 Procedure SetBkColor (Color : Word);
 Procedure SetBkColor (Color : Word);
@@ -919,6 +1072,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetBkColor}, \seep{SetColor}
 \seef{GetBkColor}, \seep{SetColor}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetColor}
 \begin{procedure}{SetColor}
 \Declaration
 \Declaration
 Procedure SetColor (Color : Word);
 Procedure SetColor (Color : Word);
@@ -931,6 +1085,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{GetColor}, \seep{SetBkColor}
 \seef{GetColor}, \seep{SetBkColor}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetFillPattern}
 \begin{procedure}{SetFillPattern}
 \Declaration
 \Declaration
 Procedure SetFillPattern (FillPattern : FillPatternType,\\ Color : Word);
 Procedure SetFillPattern (FillPattern : FillPatternType,\\ Color : Word);
@@ -945,6 +1100,7 @@ None
 \SeeAlso
 \SeeAlso
 \seep{GetFillPattern}, \seep{SetFillStyle}
 \seep{GetFillPattern}, \seep{SetFillStyle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetFillStyle}
 \begin{procedure}{SetFillStyle}
 \Declaration
 \Declaration
 Procedure SetFillStyle (Pattern,Color : word);
 Procedure SetFillStyle (Pattern,Color : word);
@@ -953,6 +1109,7 @@ Procedure SetFillStyle (Pattern,Color : word);
 \var{SetFillStyle} sets the filling pattern and color to one of the
 \var{SetFillStyle} sets the filling pattern and color to one of the
 predefined filling patterns. \var{Pattern} can be one of the following predefined
 predefined filling patterns. \var{Pattern} can be one of the following predefined
 constants :
 constants :
+
 \begin{itemize}
 \begin{itemize}
 \item \var{EmptyFill  } Uses backgroundcolor.
 \item \var{EmptyFill  } Uses backgroundcolor.
 \item \var{SolidFill  } Uses filling color
 \item \var{SolidFill  } Uses filling color
@@ -974,30 +1131,32 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetFillPattern}
 \seep{SetFillPattern}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetGraphBufSize}
 \begin{procedure}{SetGraphBufSize}
 \Declaration
 \Declaration
 Procedure SetGraphBufSize (BufSize : Word);
 Procedure SetGraphBufSize (BufSize : Word);
 
 
 \Description
 \Description
-\var{SetGraphBufSize} 
-sets the graphical buffer size. The default size is 4Kb
+\var{SetGraphBufSize} is a dummy function which does not do 
+anything; it is no longer needed.
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 
 
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetGraphMode}
 \begin{procedure}{SetGraphMode}
 \Declaration
 \Declaration
 Procedure SetGraphMode (Mode : Integer);
 Procedure SetGraphMode (Mode : Integer);
 
 
 \Description
 \Description
-\var{SetGraphMode} sets the
-graphical mode and clears the screen.
+\var{SetGraphMode} sets the graphical mode and clears the screen.
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{InitGraph}
 \seep{InitGraph}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetLineStyle}
 \begin{procedure}{SetLineStyle}
 \Declaration
 \Declaration
 Procedure SetLineStyle (LineStyle,Pattern,Width :
 Procedure SetLineStyle (LineStyle,Pattern,Width :
@@ -1007,6 +1166,7 @@ Word);
 \var{SetLineStyle}
 \var{SetLineStyle}
 sets the drawing style for lines. You can specify a \var{LineStyle} which is
 sets the drawing style for lines. You can specify a \var{LineStyle} which is
 one of the following pre-defined constants:
 one of the following pre-defined constants:
+
 \begin{itemize}
 \begin{itemize}
 \item \var{Solidln=0;} draws a solid line.
 \item \var{Solidln=0;} draws a solid line.
 \item \var{Dottedln=1;} Draws a dotted line.
 \item \var{Dottedln=1;} Draws a dotted line.
@@ -1018,6 +1178,7 @@ If \var{UserBitln} is specified then \var{Pattern} contains the bit pattern.
 In all another cases, \var{Pattern} is ignored. The parameter \var{Width} 
 In all another cases, \var{Pattern} is ignored. The parameter \var{Width} 
 indicates how thick the line should be. You can specify one of the following
 indicates how thick the line should be. You can specify one of the following
 pre-defined constants:
 pre-defined constants:
+
 \begin{itemize}
 \begin{itemize}
 \item \var{NormWidth=1}
 \item \var{NormWidth=1}
 \item \var{ThickWidth=3}
 \item \var{ThickWidth=3}
@@ -1028,6 +1189,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{GetLineSettings}
 \seep{GetLineSettings}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetPalette}
 \begin{procedure}{SetPalette}
 \Declaration
 \Declaration
 Procedure SetPalette (ColorNr : Word; NewColor : ShortInt);
 Procedure SetPalette (ColorNr : Word; NewColor : ShortInt);
@@ -1040,6 +1202,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetAllPallette},\seep{SetRGBPalette}
 \seep{SetAllPallette},\seep{SetRGBPalette}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetRGBPalette}
 \begin{procedure}{SetRGBPalette}
 \Declaration
 \Declaration
 Procedure SetRGBPalette (ColorNr,Red,Green,Blue : Integer);
 Procedure SetRGBPalette (ColorNr,Red,Green,Blue : Integer);
@@ -1053,6 +1216,7 @@ None.
 \seep{SetAllPallette},
 \seep{SetAllPallette},
 \seep{SetPalette}
 \seep{SetPalette}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetTextJustify}
 \begin{procedure}{SetTextJustify}
 \Declaration
 \Declaration
 Procedure SetTextJustify (Horizontal,Vertical : Word);
 Procedure SetTextJustify (Horizontal,Vertical : Word);
@@ -1061,6 +1225,7 @@ Procedure SetTextJustify (Horizontal,Vertical : Word);
 \var{SetTextJustify} controls the placement of new text, relative to the 
 \var{SetTextJustify} controls the placement of new text, relative to the 
 (graphical) cursor position. \var{Horizontal} controls horizontal placement, and can be
 (graphical) cursor position. \var{Horizontal} controls horizontal placement, and can be
 one of the following pre-defined constants:
 one of the following pre-defined constants:
+
 \begin{itemize}
 \begin{itemize}
 \item \var{LeftText=0;} Text is set left of the pointer.
 \item \var{LeftText=0;} Text is set left of the pointer.
 \item \var{CenterText=1;} Text is set centered horizontally on the pointer.
 \item \var{CenterText=1;} Text is set centered horizontally on the pointer.
@@ -1069,6 +1234,7 @@ one of the following pre-defined constants:
 \var{Vertical} controls the vertical placement of the text, relative to the
 \var{Vertical} controls the vertical placement of the text, relative to the
 (graphical) cursor position. Its value can be one of the following
 (graphical) cursor position. Its value can be one of the following
 pre-defined constants :
 pre-defined constants :
+
 \begin{itemize}
 \begin{itemize}
 \item \var{BottomText=0;} Text is placed under the pointer.
 \item \var{BottomText=0;} Text is placed under the pointer.
 \item \var{CenterText=1;} Text is placed centered vertically on the pointer.
 \item \var{CenterText=1;} Text is placed centered vertically on the pointer.
@@ -1080,6 +1246,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{OutText}, \seep{OutTextXY}
 \seep{OutText}, \seep{OutTextXY}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetTextStyle}
 \begin{procedure}{SetTextStyle}
 \Declaration
 \Declaration
 Procedure SetTextStyle (Font,Direction,Magnitude : Word);
 Procedure SetTextStyle (Font,Direction,Magnitude : Word);
@@ -1087,6 +1254,7 @@ Procedure SetTextStyle (Font,Direction,Magnitude : Word);
 \Description
 \Description
 \var{SetTextStyle} controls the style of text to be put on the screen.
 \var{SetTextStyle} controls the style of text to be put on the screen.
 pre-defined constants for \var{Font} are:
 pre-defined constants for \var{Font} are:
+
 \begin{itemize}
 \begin{itemize}
 \item \var{DefaultFont=0;}
 \item \var{DefaultFont=0;}
 \item \var{TriplexFont=2;}
 \item \var{TriplexFont=2;}
@@ -1095,6 +1263,7 @@ pre-defined constants for \var{Font} are:
 \item \var{GothicFont=4;}
 \item \var{GothicFont=4;}
 \end{itemize}
 \end{itemize}
 Pre-defined constants for \var{Direction} are :
 Pre-defined constants for \var{Direction} are :
+
 \begin{itemize}
 \begin{itemize}
 \item \var{HorizDir=0;}
 \item \var{HorizDir=0;}
 \item \var{VertDir=1;}
 \item \var{VertDir=1;}
@@ -1104,6 +1273,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{GetTextSettings} 
 \seep{GetTextSettings} 
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetUserCharSize}
 \begin{procedure}{SetUserCharSize}
 \Declaration
 \Declaration
 Procedure SetUserCharSize (Xasp1,Xasp2,Yasp1,Yasp2 : Word);
 Procedure SetUserCharSize (Xasp1,Xasp2,Yasp1,Yasp2 : Word);
@@ -1116,21 +1286,23 @@ None.
 \SeeAlso
 \SeeAlso
 \seep{SetTextStyle}
 \seep{SetTextStyle}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetViewPort}
 \begin{procedure}{SetViewPort}
 \Declaration
 \Declaration
 Procedure SetViewPort (X1,Y1,X2,Y2 : Integer; Clip : Boolean);
 Procedure SetViewPort (X1,Y1,X2,Y2 : Integer; Clip : Boolean);
 
 
 \Description
 \Description
-Sets the current graphical view-port (window) to the rectangle defined by
+Sets the current graphical viewport (window) to the rectangle defined by
 the top-left corner \var{(X1,Y1)} and the bottom-right corner \var{(X2,Y2)}.
 the top-left corner \var{(X1,Y1)} and the bottom-right corner \var{(X2,Y2)}.
-If \var{Clip} is true, anything drawn outside the view-port (window) will be
+If \var{Clip} is true, anything drawn outside the viewport (window) will be
 clipped (i.e. not drawn). Coordinates specified after this call are relative
 clipped (i.e. not drawn). Coordinates specified after this call are relative
-to the top-left corner of the view-port.
+to the top-left corner of the viewport.
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso
 \seep{GetViewSettings}
 \seep{GetViewSettings}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetVisualPage}
 \begin{procedure}{SetVisualPage}
 \Declaration
 \Declaration
 Procedure SetVisualPage (Page : Word);
 Procedure SetVisualPage (Page : Word);
@@ -1142,6 +1314,7 @@ None
 \SeeAlso
 \SeeAlso
 \seep{SetActivePage}
 \seep{SetActivePage}
 \end{procedure}
 \end{procedure}
+
 \begin{procedure}{SetWriteMode}
 \begin{procedure}{SetWriteMode}
 \Declaration
 \Declaration
 Procedure SetWriteMode (Mode : Integer);
 Procedure SetWriteMode (Mode : Integer);
@@ -1150,6 +1323,7 @@ Procedure SetWriteMode (Mode : Integer);
 \var{SetWriteMode} controls the drawing of lines on the screen. It controls
 \var{SetWriteMode} controls the drawing of lines on the screen. It controls
 the binary operation used when drawing lines on the screen. \var{Mode} can
 the binary operation used when drawing lines on the screen. \var{Mode} can
 be one of the following pre-defined constants:
 be one of the following pre-defined constants:
+
 \begin{itemize}
 \begin{itemize}
 \item CopyPut=0;
 \item CopyPut=0;
 \item XORPut=1;
 \item XORPut=1;
@@ -1159,6 +1333,7 @@ None.
 \SeeAlso
 \SeeAlso
 
 
 \end{procedure}
 \end{procedure}
+
 \begin{function}{TextHeight}
 \begin{function}{TextHeight}
 \Declaration
 \Declaration
 Function TextHeight (S : String) : Word;
 Function TextHeight (S : String) : Word;
@@ -1172,6 +1347,7 @@ None.
 \SeeAlso
 \SeeAlso
 \seef{TextWidth}
 \seef{TextWidth}
 \end{function}
 \end{function}
+
 \begin{function}{TextWidth}
 \begin{function}{TextWidth}
 \Declaration
 \Declaration
 Function TextWidth (S : String) : Word;
 Function TextWidth (S : String) : Word;
@@ -1179,7 +1355,6 @@ Function TextWidth (S : String) : Word;
 \Description
 \Description
 \var{TextHeight} returns the width (in pixels) of the string \var{S} in
 \var{TextHeight} returns the width (in pixels) of the string \var{S} in
 the current font and text-size.
 the current font and text-size.
-
 \Errors
 \Errors
 None.
 None.
 \SeeAlso
 \SeeAlso