global.ppi 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by the Free Pascal development team.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$PACKRECORDS NORMAL}
  12. const
  13. { error codes }
  14. grOk = 0;
  15. grNoInitGraph = -1;
  16. grNotDetected = -2;
  17. grFileNotFound = -3;
  18. grInvalidDriver = -4;
  19. grNoLoadMem = -5;
  20. grNoScanMem = -6;
  21. grNoFloodMem = -7;
  22. grFontNotFound = -8;
  23. grNoFontMem = -9;
  24. grInvalidMode = -10;
  25. grError = -11;
  26. grIOerror = -12;
  27. grInvalidFont = -13;
  28. grInvalidFontNum = -14;
  29. grInvalidVersion = -18;
  30. { graphic drivers }
  31. CurrentDriver = -128;
  32. Detect = 0;
  33. { graph modes }
  34. Default = 0;
  35. { Farben f�r setpalette und setallpalette }
  36. black : longint = 0;
  37. blue : longint = 1;
  38. green : longint = 2;
  39. cyan : longint = 3;
  40. red : longint = 4;
  41. magenta : longint = 5;
  42. brown : longint = 6;
  43. lightgray : longint = 7;
  44. darkgray : longint = 8;
  45. lightblue : longint = 9;
  46. lightgreen : longint = 10;
  47. lightcyan : longint = 11;
  48. lightred : longint = 12;
  49. lightmagenta : longint = 13;
  50. yellow : longint = 14;
  51. white : longint = 15;
  52. { Linenart f�r Get/SetLineStyle: }
  53. SolidLn = 0;
  54. DottedLn = 1;
  55. CenterLn = 2;
  56. DashedLn = 3;
  57. UserBitLn = 4;
  58. NormWidth = 1;
  59. ThickWidth = 3;
  60. { Set/GetTextStyle Konstanten: }
  61. DefaultFont = 0;
  62. TriplexFont = 1;
  63. SmallFont = 2;
  64. SansSerifFont = 3;
  65. GothicFont = 4;
  66. ScriptFont = 5;
  67. SimpleFont = 6;
  68. TSCRFont = 7;
  69. LCOMFont = 8;
  70. EuroFont = 9;
  71. BoldFont = 10;
  72. HorizDir = 0;
  73. VertDir = 1;
  74. UserCharSize = 0;
  75. ClipOn = true;
  76. ClipOff = false;
  77. { Bar3D constants }
  78. TopOn = true;
  79. TopOff = false;
  80. { fill pattern for Get/SetFillStyle: }
  81. EmptyFill = 0;
  82. SolidFill = 1;
  83. LineFill = 2;
  84. LtSlashFill = 3;
  85. SlashFill = 4;
  86. BkSlashFill = 5;
  87. LtBkSlashFill = 6;
  88. HatchFill = 7;
  89. XHatchFill = 8;
  90. InterleaveFill = 9;
  91. WideDotFill = 10;
  92. CloseDotFill = 11;
  93. UserFill = 12;
  94. { bitblt operators }
  95. NormalPut = 0;
  96. CopyPut = 0;
  97. XORPut = 1;
  98. OrPut = 2;
  99. AndPut = 3;
  100. NotPut = 4;
  101. BackPut = 8;
  102. { SetTextJustify constants }
  103. LeftText = 0;
  104. CenterText = 1;
  105. RightText = 2;
  106. BottomText = 0;
  107. TopText = 2;
  108. type
  109. RGBColor = record
  110. r,g,b,i : byte;
  111. end;
  112. PaletteType = record
  113. Size : integer;
  114. Colors : array[0..767]of Byte;
  115. end;
  116. LineSettingsType = record
  117. linestyle : word;
  118. pattern : word;
  119. thickness : word;
  120. end;
  121. TextSettingsType = record
  122. font : word;
  123. direction : word;
  124. charsize : word;
  125. horiz : word;
  126. vert : word;
  127. end;
  128. FillSettingsType = record
  129. pattern : word;
  130. color : longint;
  131. end;
  132. FillPatternType = array[1..8] of byte;
  133. PointType = record
  134. x,y : integer;
  135. end;
  136. ViewPortType = record
  137. x1,y1,x2,y2 : integer;
  138. Clip : boolean;
  139. end;
  140. ArcCoordsType = record
  141. x,y : integer;
  142. xstart,ystart : integer;
  143. xend,yend : integer;
  144. end;
  145. const
  146. fillpattern : array[0..12] of FillPatternType = (
  147. ($00,$00,$00,$00,$00,$00,$00,$00), { Hintergrundfarbe }
  148. ($ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff), { Vordergrundfarbe }
  149. ($ff,$ff,$00,$00,$ff,$ff,$00,$00), { === }
  150. ($01,$02,$04,$08,$10,$20,$40,$80), { /// }
  151. ($07,$0e,$1c,$38,$70,$e0,$c1,$83), { /// als dicke Linien }
  152. ($07,$83,$c1,$e0,$70,$38,$1c,$0e), { \\\ als dicke Linien }
  153. ($5a,$2d,$96,$4b,$a5,$d2,$69,$b4), { \ \\ \ }
  154. ($ff,$88,$88,$88,$ff,$88,$88,$88), { K„stchen }
  155. ($18,$24,$42,$81,$81,$42,$24,$18), { Rauten }
  156. ($cc,$33,$cc,$33,$cc,$33,$cc,$33), { "Mauermuster" }
  157. ($80,$00,$08,$00,$80,$00,$08,$00), { weit auseinanderliegende Punkte }
  158. ($88,$00,$22,$00,$88,$00,$22,$00), { dichte Punkte}
  159. (0,0,0,0,0,0,0,0) { benutzerdefiniert }
  160. );
  161. G640x400x256 = $100;
  162. G640x480x256 = $101;
  163. G800x600x256 = $103;
  164. G1024x768x256 = $105;
  165. G1280x1024x256 = $107; { Additional modes. }
  166. G640x480x32K = $110;
  167. G640x480x64K = $111;
  168. G640x480x16M = $112;
  169. G800x600x32K = $113;
  170. G800x600x64K = $114;
  171. G800x600x16M = $115;
  172. G1024x768x32K = $116;
  173. G1024x768x64K = $117;
  174. G1024x768x16M = $118;
  175. G1280x1024x32K = $119;
  176. G1280x1024x64K = $11A;
  177. G1280x1024x16M = $11B;
  178. (* G320x200x16M32 = 33; { 32-bit per pixel modes. }
  179. G640x480x16M32 = 34;
  180. G800x600x16M32 = 35;
  181. G1024x768x16M32 = 36;
  182. G1280x1024x16M32 = 37; *)
  183. {
  184. $Log$
  185. Revision 1.5 1998-11-19 15:09:38 pierre
  186. * several bugfixes for sector/ellipse/floodfill
  187. + graphic driver mode const in interface G800x600x256...
  188. + added backput mode as in linux graph.pp
  189. (clears the background of textoutput)
  190. Revision 1.4 1998/11/19 09:48:50 pierre
  191. + added some functions missing like sector ellipse getarccoords
  192. (the filling of sector and ellipse is still buggy
  193. I use floodfill but sometimes the starting point
  194. is outside !!)
  195. * fixed a bug in floodfill for patterns
  196. (still has problems !!)
  197. Revision 1.3 1998/11/18 09:31:34 pierre
  198. * changed color scheme
  199. all colors are in RGB format if more than 256 colors
  200. + added 24 and 32 bits per pixel mode
  201. (compile with -dDEBUG)
  202. 24 bit mode with banked still as problems on pixels across
  203. the bank boundary, but works in LinearFrameBufferMode
  204. Look at install/demo/nmandel.pp
  205. Revision 1.2 1998/03/26 10:41:15 florian
  206. * some warnings fixed
  207. Revision 1.1.1.1 1998/03/25 11:18:42 root
  208. * Restored version
  209. Revision 1.4 1998/03/03 22:48:42 florian
  210. + graph.drawpoly procedure
  211. + putimage with xorput uses mmx if available
  212. Revision 1.3 1998/01/26 11:58:05 michael
  213. + Added log at the end
  214. Working file: rtl/dos/ppi/global.ppi
  215. description:
  216. ----------------------------
  217. revision 1.2
  218. date: 1997/12/01 12:21:30; author: michael; state: Exp; lines: +13 -0
  219. + added copyright reference in header.
  220. ----------------------------
  221. revision 1.1
  222. date: 1997/11/27 08:33:51; author: michael; state: Exp;
  223. Initial revision
  224. ----------------------------
  225. revision 1.1.1.1
  226. date: 1997/11/27 08:33:51; author: michael; state: Exp; lines: +0 -0
  227. FPC RTL CVS start
  228. =============================================================================
  229. }