{ $Id$ This file is part of the Free Pascal run time library. Copyright (c) 1993,97 by the Free Pascal development team. See the file COPYING.FPC, included in this distribution, for details about the copyright. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} {$PACKRECORDS NORMAL} const { error codes } 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; grInvalidVersion = -18; { graphic drivers } CurrentDriver = -128; Detect = 0; { graph modes } Default = 0; { Farben fr setpalette und setallpalette } black : longint = 0; blue : longint = 1; green : longint = 2; cyan : longint = 3; red : longint = 4; magenta : longint = 5; brown : longint = 6; lightgray : longint = 7; darkgray : longint = 8; lightblue : longint = 9; lightgreen : longint = 10; lightcyan : longint = 11; lightred : longint = 12; lightmagenta : longint = 13; yellow : longint = 14; white : longint = 15; { Linenart fr Get/SetLineStyle: } SolidLn = 0; DottedLn = 1; CenterLn = 2; DashedLn = 3; UserBitLn = 4; NormWidth = 1; ThickWidth = 3; { Set/GetTextStyle Konstanten: } DefaultFont = 0; TriplexFont = 1; SmallFont = 2; SansSerifFont = 3; GothicFont = 4; ScriptFont = 5; SimpleFont = 6; TSCRFont = 7; LCOMFont = 8; EuroFont = 9; BoldFont = 10; HorizDir = 0; VertDir = 1; UserCharSize = 0; ClipOn = true; ClipOff = false; { Bar3D constants } TopOn = true; TopOff = false; { fill pattern for Get/SetFillStyle: } 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; { bitblt operators } NormalPut = 0; CopyPut = 0; XORPut = 1; OrPut = 2; AndPut = 3; NotPut = 4; BackPut = 8; { SetTextJustify constants } LeftText = 0; CenterText = 1; RightText = 2; BottomText = 0; TopText = 2; type RGBColor = record r,g,b,i : byte; end; PaletteType = record Size : integer; Colors : array[0..767]of Byte; 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 : longint; end; FillPatternType = array[1..8] of byte; PointType = record x,y : integer; end; ViewPortType = record x1,y1,x2,y2 : integer; Clip : boolean; end; ArcCoordsType = record x,y : integer; xstart,ystart : integer; xend,yend : integer; end; const fillpattern : array[0..12] of FillPatternType = ( ($00,$00,$00,$00,$00,$00,$00,$00), { Hintergrundfarbe } ($ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff), { Vordergrundfarbe } ($ff,$ff,$00,$00,$ff,$ff,$00,$00), { === } ($01,$02,$04,$08,$10,$20,$40,$80), { /// } ($07,$0e,$1c,$38,$70,$e0,$c1,$83), { /// als dicke Linien } ($07,$83,$c1,$e0,$70,$38,$1c,$0e), { \\\ als dicke Linien } ($5a,$2d,$96,$4b,$a5,$d2,$69,$b4), { \ \\ \ } ($ff,$88,$88,$88,$ff,$88,$88,$88), { K„stchen } ($18,$24,$42,$81,$81,$42,$24,$18), { Rauten } ($cc,$33,$cc,$33,$cc,$33,$cc,$33), { "Mauermuster" } ($80,$00,$08,$00,$80,$00,$08,$00), { weit auseinanderliegende Punkte } ($88,$00,$22,$00,$88,$00,$22,$00), { dichte Punkte} (0,0,0,0,0,0,0,0) { benutzerdefiniert } ); G640x400x256 = $100; G640x480x256 = $101; G800x600x256 = $103; G1024x768x256 = $105; G1280x1024x256 = $107; { Additional modes. } G640x480x32K = $110; G640x480x64K = $111; G640x480x16M = $112; G800x600x32K = $113; G800x600x64K = $114; G800x600x16M = $115; G1024x768x32K = $116; G1024x768x64K = $117; G1024x768x16M = $118; G1280x1024x32K = $119; G1280x1024x64K = $11A; G1280x1024x16M = $11B; (* G320x200x16M32 = 33; { 32-bit per pixel modes. } G640x480x16M32 = 34; G800x600x16M32 = 35; G1024x768x16M32 = 36; G1280x1024x16M32 = 37; *) { $Log$ Revision 1.5 1998-11-19 15:09:38 pierre * several bugfixes for sector/ellipse/floodfill + graphic driver mode const in interface G800x600x256... + added backput mode as in linux graph.pp (clears the background of textoutput) Revision 1.4 1998/11/19 09:48:50 pierre + added some functions missing like sector ellipse getarccoords (the filling of sector and ellipse is still buggy I use floodfill but sometimes the starting point is outside !!) * fixed a bug in floodfill for patterns (still has problems !!) Revision 1.3 1998/11/18 09:31:34 pierre * changed color scheme all colors are in RGB format if more than 256 colors + added 24 and 32 bits per pixel mode (compile with -dDEBUG) 24 bit mode with banked still as problems on pixels across the bank boundary, but works in LinearFrameBufferMode Look at install/demo/nmandel.pp Revision 1.2 1998/03/26 10:41:15 florian * some warnings fixed Revision 1.1.1.1 1998/03/25 11:18:42 root * Restored version Revision 1.4 1998/03/03 22:48:42 florian + graph.drawpoly procedure + putimage with xorput uses mmx if available Revision 1.3 1998/01/26 11:58:05 michael + Added log at the end Working file: rtl/dos/ppi/global.ppi description: ---------------------------- revision 1.2 date: 1997/12/01 12:21:30; author: michael; state: Exp; lines: +13 -0 + added copyright reference in header. ---------------------------- revision 1.1 date: 1997/11/27 08:33:51; author: michael; state: Exp; Initial revision ---------------------------- revision 1.1.1.1 date: 1997/11/27 08:33:51; author: michael; state: Exp; lines: +0 -0 FPC RTL CVS start ============================================================================= }