home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0300
/
CCE_0367.ZIP
/
CCE_0367.PD
/
INTRFACE
/
GRAPH.INT
< prev
next >
Wrap
Text File
|
1992-12-04
|
10KB
|
473 lines
unit graph;
interface
(* -------------------------------------------------------------------- *)
(* constants, types & variables *)
(* -------------------------------------------------------------------- *)
const
grOk = 0;
grNoInitGraph = -1;
grNotDetected = -2;
grFileNotFound = -3;
grInvalidDriver = -4;
grNoLoadMem = -5;
grNoScanMem = -6;
grNoFloodMem = -7;
grFontNotFound = -8;
grNoFontMem = -9;
grInvalidMode = -10;
grError = -11;
grIOerror = -12;
grInvalidFont = -13;
grInvalidFontNum = -14;
Detect = 0;
CGA = 1;
MCGA = 2;
EGA = 3;
EGA64 = 4;
EGAMono = 5;
IBM8514 = 6;
HercMono = 7;
ATT400 = 8;
VGA = 9;
PC3270 = 10;
CurrentDriver = -128;
VDI = 256;
CGAC0 = 0;
CGAC1 = 1;
CGAC2 = 2;
CGAC3 = 3;
CGAHi = 2;
MCGAC0 = 0;
MCGAC1 = 1;
MCGAC2 = 2;
MCGAC3 = 3;
MCGAMed = 4;
MCGAHi = 5;
EGALo = 0;
EGAHi = 1;
EGA64Lo = 0;
EGA64Hi = 1;
EGAMonoHi = 3;
HercMonoHi = 0;
ATT400C0 = 0;
ATT400C1 = 1;
ATT400C2 = 2;
ATT400C3 = 3;
ATT400Med = 4;
ATT400Hi = 5;
VGALo = 0;
VGAMed = 1;
VGAHi = 2;
PC3270Hi = 0;
IBM8514Lo = 0;
IBM8514Hi = 1;
VDIMode = 0;
Black = 0;
Blue = 1;
Green = 2;
Cyan = 3;
Red = 4;
Magenta = 5;
Brown = 6;
LightGray = 7;
DarkGray = 8;
LightBlue = 9;
LightGreen = 10;
LightCyan = 11;
LightRed = 12;
LightMagenta = 13;
Yellow = 14;
White = 15;
EGABlack = 0;
EGABlue = 1;
EGAGreen = 2;
EGACyan = 3;
EGARed = 4;
EGAMagenta = 5;
EGABrown = 20;
EGALightgray = 7;
EGADarkgray = 56;
EGALightblue = 57;
EGALightgreen = 58;
EGALightcyan = 59;
EGALightred = 60;
EGALightmagenta = 61;
EGAYellow = 62;
EGAWhite = 63;
SolidLn = 0;
DottedLn = 1;
CenterLn = 2;
DashedLn = 3;
UserBitLn = 4;
NormWidth = 1;
ThickWidth = 3;
DefaultFont = 0;
TriplexFont = 1;
SmallFont = 2;
SansSerifFont = 3;
GothicFont = 4;
HorizDir = 0;
VertDir = 1;
UserCharSize = 0;
LeftText = 0;
CenterText = 1;
RightText = 2;
BottomText = 0;
TopText = 2;
ClipOn = true;
ClipOff = false;
TopOn = true;
TopOff = false;
EmptyFill = 0;
SolidFill = 1;
LineFill = 2;
LtSlashFill = 3;
SlashFill = 4;
BkSlashFill = 5;
LtBkSlashFill = 6;
HatchFill = 7;
XHatchFill = 8;
InterleaveFill = 9;
WideDotFill = 10;
CloseDotFill = 11;
UserFill = 12;
CopyPut = 0;
XORPut = 1;
OrPut = 2;
AndPut = 3;
NotPut = 4;
NormalPut = CopyPut;
MaxColors = 15;
type
PaletteType = record
Size : Byte;
Colors : Array[0..MaxColors]
of ShortInt;
end;
LineSettingsType = record
LineStyle : Word;
Pattern : Word;
Thickness : Word;
end;
TextSettingsType = record
Font : Word;
Direction : Word;
CharSize : Word;
Horiz : Word;
Vert : Word;
end;
FillSettingsType = record
Pattern : Word;
Color : Word;
end;
FillPatternType = Array[1..8] of Byte;
PointType = record
X, Y : Integer;
end;
ViewPortType = record
x1, y1,
x2, y2 : Word;
Clip : Boolean;
end;
ArcCoordsType = record
X, Y : Integer;
Xstart,
Ystart,
Xend, Yend : Integer;
end;
var
GraphGetMemPtr : Pointer;
GraphFreeMemPtr : Pointer;
(* -------------------------------------------------------------------- *)
(* functions & procedures *)
(* -------------------------------------------------------------------- *)
procedure Arc( X, Y : Integer; StAngle, EndAngle, Radius : Word );
external;
procedure Bar( x1, y1, x2, y2 : Integer );
external;
procedure Bar3D( x1, y1, x2, y2 : Integer; Depth : Word; Top : Boolean );
external;
procedure Circle( X, Y : Integer; Radius : Word );
external;
procedure ClearDevice;
external;
procedure ClearViewPort;
external;
procedure CloseGraph;
external;
procedure DetectGraph( var GraphDriver, GraphMode : Integer );
external;
procedure DrawPoly( NumPoints : Word; var PolyPoints );
external;
procedure Ellipse( X, Y : Integer; StAngle, EndAngle : Word;
XRadius, YRadius : Word );
external;
procedure FillEllipse( X, Y : Integer; XRadius, YRadius : Word );
external;
procedure FillPoly( NumPoints : Word; var PolyPoints );
external;
procedure FloodFill( X, Y : Integer; Border : Word );
external;
procedure GetArcCoords( var ArcCoords : ArcCoordsType );
external;
procedure GetAspectRatio( var Xasp, Yasp : Word );
external;
function GetBkColor : Word;
external;
function GetColor : Word;
external;
procedure GetDefaultPalette( var Pal : PaletteType );
external;
function GetDriverName : String;
external;
procedure GetFillPattern( var FillPattern : FillPatternType );
external;
procedure GetFillSettings( var FillInfo : FillSettingsType );
external;
function GetGraphMode : Integer;
external;
procedure GetImage( x1, y1, x2, y2 : Integer; var BitMap );
external;
procedure GetLineSettings( var LineInfo : LineSettingsType );
external;
function GetMaxColor : Word;
external;
function GetMaxMode : Word;
external;
function GetMaxX : Integer;
external;
function GetMaxY : Integer;
external;
function GetModeName( ModeNumber : Integer ) : String;
external;
procedure GetModeRange( GraphDriver : Integer;
var LoMode, HiMode : Integer );
external;
function GetPaletteSize : Integer;
external;
procedure GetPalette( var Palette : PaletteType );
external;
function GetPixel( X, Y : Integer ) : Word;
external;
procedure GetTextSettings( var TextInfo : TextSettingsType );
external;
procedure GetViewSettings( var Viewport : ViewPortType );
external;
function GetX : Integer;
external;
function GetY : Integer;
external;
procedure GraphDefaults;
external;
function GraphErrorMsg( ErrorCode : Integer ) : String;
external;
procedure GraphFreeMem( var P : Pointer; Size : Word );
external;
procedure GraphGetMem( var P : Pointer; Size : Word );
external;
function GraphResult : Integer;
external;
function ImageSize( x1, y1, x2, y2 : Integer ) : LongInt;
external;
procedure InitGraph( var GraphDriver, GraphMode : Integer;
PathToDriver : String );
external;
function InstallUserFont( FontFileName : String ) : Integer;
external;
function InstallUserDriver( Name : String;
AutoDetectPtr : Pointer ) : Integer;
external;
procedure Line( x1, y1, x2, y2 : Integer );
external;
procedure LineRel( Dx, Dy : Integer );
external;
procedure LineTo( x, y : Integer );
external;
procedure MoveRel( Dx, Dy : Integer );
external;
procedure MoveTo( x, y : Integer );
external;
procedure OutText( Textstring : String );
external;
procedure OutTextXY( X, Y : Integer; Textstring : String );
external;
procedure PieSlice( X, Y : Integer; StAngle, EndAngle, Radius : Word );
external;
procedure PutImage( X, Y : Integer; var BitMap; BitBlt : Word );
external;
procedure PutPixel( X, Y : Integer; Color : Word );
external;
procedure Rectangle( x1, y1, x2, y2 : Integer );
external;
function RegisterBGIFont( Font : Pointer ) : Integer;
external;
function RegisterBGIDriver( Driver : Pointer ) : Integer;
external;
procedure RestoreCRTMode;
external;
procedure Sector( x, y : Integer; StAngle, EndAngle,
XRadius, YRadius : Word );
external;
procedure SetActivePage( Page : Word );
external;
procedure SetAllPalette( var Palette );
external;
procedure SetAspectRatio( XAsp, YAsp : Word );
external;
procedure SetBkColor( ColorNum : Word );
external;
procedure SetColor( Color : Word );
external;
procedure SetFillPattern( Pattern : FillPatternType; Color : Word );
external;
procedure SetFillStyle( Pattern : Word; Color : Word );
external;
procedure SetGraphBufSize( BufSize : Word );
external;
procedure SetGraphMode( Mode : Integer );
external;
procedure SetLineStyle( LineStyle, Pattern, Thickness : Word );
external;
procedure SetPalette( ColorNum : Word; Color : ShortInt );
external;
procedure SetRGBPalette( ColorNum, RedValue,
GreenValue, BlueValue : Integer );
external;
procedure SetTextJustify( Horiz, Vert : Word );
external;
procedure SetTextStyle( Font, Direction, CharSize : Word );
external;
procedure SetUserCharSize( MultX, DivX, MultY, DivY : Word );
external;
procedure SetViewPort( x1, y1, x2, y2 : Integer; Clip : Boolean );
external;
procedure SetVisualPage( Page : Word );
external;
procedure SetWriteMode( WriteMode : Integer );
external;
function TextHeight( Textstring : String ) : Word;
external;
function TextWidth( Textstring : String ) : Word;
external;
(* =================================================================== *)