global.ppi 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 = 0;
  37. blue = 1;
  38. green = 2;
  39. cyan = 3;
  40. red = 4;
  41. magenta = 5;
  42. brown = 6;
  43. lightgray = 7;
  44. darkgray = 8;
  45. lightblue = 9;
  46. lightgreen = 10;
  47. lightcyan = 11;
  48. lightred = 12;
  49. lightmagenta = 13;
  50. yellow = 14;
  51. white = 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. { SetTextJustify constants }
  102. LeftText = 0;
  103. CenterText = 1;
  104. RightText = 2;
  105. BottomText = 0;
  106. TopText = 2;
  107. type
  108. RGBColor = record
  109. r,g,b,i : byte;
  110. end;
  111. PaletteType = record
  112. Size : integer;
  113. Colors : array[0..767]of Byte;
  114. end;
  115. LineSettingsType = record
  116. linestyle : word;
  117. pattern : word;
  118. thickness : word;
  119. end;
  120. TextSettingsType = record
  121. font : word;
  122. direction : word;
  123. charsize : word;
  124. horiz : word;
  125. vert : word;
  126. end;
  127. FillSettingsType = record
  128. pattern : word;
  129. color : longint;
  130. end;
  131. FillPatternType = array[1..8] of byte;
  132. PointType = record
  133. x,y : integer;
  134. end;
  135. ViewPortType = record
  136. x1,y1,x2,y2 : integer;
  137. Clip : boolean;
  138. end;
  139. ArcCoordsType = record
  140. x,y : integer;
  141. xstart,ystart : integer;
  142. xend,yend : integer;
  143. end;
  144. const
  145. fillpattern : array[0..12] of FillPatternType = (
  146. ($00,$00,$00,$00,$00,$00,$00,$00), { Hintergrundfarbe }
  147. ($ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff), { Vordergrundfarbe }
  148. ($ff,$ff,$00,$00,$ff,$ff,$00,$00), { === }
  149. ($01,$02,$04,$08,$10,$20,$40,$80), { /// }
  150. ($07,$0e,$1c,$38,$70,$e0,$c1,$83), { /// als dicke Linien }
  151. ($07,$83,$c1,$e0,$70,$38,$1c,$0e), { \\\ als dicke Linien }
  152. ($5a,$2d,$96,$4b,$a5,$d2,$69,$b4), { \ \\ \ }
  153. ($ff,$88,$88,$88,$ff,$88,$88,$88), { K„stchen }
  154. ($18,$24,$42,$81,$81,$42,$24,$18), { Rauten }
  155. ($cc,$33,$cc,$33,$cc,$33,$cc,$33), { "Mauermuster" }
  156. ($80,$00,$08,$00,$80,$00,$08,$00), { weit auseinanderliegende Punkte }
  157. ($88,$00,$22,$00,$88,$00,$22,$00), { dichte Punkte}
  158. (0,0,0,0,0,0,0,0) { benutzerdefiniert }
  159. );
  160. {
  161. $Log$
  162. Revision 1.2 1998-03-26 10:41:15 florian
  163. * some warnings fixed
  164. Revision 1.1.1.1 1998/03/25 11:18:42 root
  165. * Restored version
  166. Revision 1.4 1998/03/03 22:48:42 florian
  167. + graph.drawpoly procedure
  168. + putimage with xorput uses mmx if available
  169. Revision 1.3 1998/01/26 11:58:05 michael
  170. + Added log at the end
  171. Working file: rtl/dos/ppi/global.ppi
  172. description:
  173. ----------------------------
  174. revision 1.2
  175. date: 1997/12/01 12:21:30; author: michael; state: Exp; lines: +13 -0
  176. + added copyright reference in header.
  177. ----------------------------
  178. revision 1.1
  179. date: 1997/11/27 08:33:51; author: michael; state: Exp;
  180. Initial revision
  181. ----------------------------
  182. revision 1.1.1.1
  183. date: 1997/11/27 08:33:51; author: michael; state: Exp; lines: +0 -0
  184. FPC RTL CVS start
  185. =============================================================================
  186. }