Previous: FDebug Unit To the Table of Content Next: Graph Unit Types, Constants and Variables

- 4.37 -
Standard Units

Graph Unit Introduction

Targets: MS-DOS, Win32


The Graph unit for TMT Pascal is as compatible with the Borland Graphics Library as possible. Since BGI is by now an obsolete interface, we added a number of enhancements. They are described in detail below. This graphics library for TMT Pascal allows easy porting of programs written for Borland Pascal (with minimal changes to the source).

Features: System Requirements Notices on Win32 target
The Graph unit can be used to emulate MS-DOS SVGA graphics in Windows 32-bit GUI and console applications using the Microsoft DirectDraw 5.0 or later. Moreover the Graph unit for Win32 works in conjunction with CRT, Keyboard and Mouse units in a same way, as in MS-DOS applications. So you may recompile most of your old MS-DOS programs as Win32 GUI applications without any changes in your sources.
For example, you may compile any source from your TMTPL\SAMPLES\COMMON\GRAPH subdirectory for both Win32 GUI and MS-DOS targets.

Compatibility with the Graph unit from Borland Pascal
TMT Graph unit will partly replicate the Graph unit from Borland Pascal. However there are some differences. Listed below are the names of all procedures and functions from the Graph unit from Borland Pascal 7 and an indication of their status in TMT our Graph unit.
+Arc+GetMaxX*PutImage
+Bar+GetMaxY+PutPixel
+Bar3D-GetModeName*Rectangle
+Circle-GetModeRange-RegisterBGIdriver
*ClearDevice+GetPalette-RegisterBGIfont
*ClearViewPort+GetPaletteSize*RestoreCrtMode
*CloseGraph+GetPixel-Sector
-DetectGraph*GetTextSettings+SetActivePage
*Drawpoly+GetViewSettings+SetAllPalette
+Ellipse+GetX*SetAspectRatio
*FillEllipse+GetY*SetBkColor
*FillPoly*GraphDefaults+SetColor
*FloodFill+GraphErrorMsg*SetFillPattern
-GetArcCoords+GraphResult*SetFillStyle
*GetAspectRatio+ImageSize+SetGraphBufSize
*GetBkColor-InitGraph*SetGraphMode
+GetColor-InstallUserDriver+SetLineStyle
+GetDefaultPalette-InstallUserFont+SetPalette
-GetDriverName+Line+SetRGBPalette
+GetFillPattern+LineRel+SetTextJustify
-GetFillSettings+LineTo*SetTextStyle
*GetGraphMode+MoveRel-SetUserCharSize
+GetImage+MoveTo*SetViewPort
+GetLineSettings+OutText+SetVisualPage
+GetMaxColor+OutTextXY*SetWriteMode
-GetMaxMode-PieSlice+TextHeight
+TextWidth  
Definitions:
+ procedure/function supported and functionally equivalent to Borland;
* procedure/function supported, but somewhat different from Borland;
- procedure/function not supported.

Note that TMT Graph provides many procedures and functions, which are not supported by Borland's Graph unit.


Previous: FDebug Unit To the Table of Content Next: Graph Unit Types, Constants and Variables
FDebug Unit Table of Content Graph Unit Types, Constants and Variables

- 4.37 -