graph.xml 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896
  1. <?xml version="1.0" encoding="ISO8859-1"?>
  2. <fpdoc-descriptions>
  3. <!--
  4. $Id$
  5. This file is part of the FPC documentation.
  6. Copyright (C) 1997, by Michael Van Canneyt
  7. The FPC documentation is free text; you can redistribute it and/or
  8. modify it under the terms of the GNU Library General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. The FPC Documentation is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with the FPC documentation; see the file COPYING.LIB. If not,
  17. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. Boston, MA 02111-1307, USA.
  19. -->
  20. <package name="rtl">
  21. <module name="graph">
  22. <short>TP compatible unit to handle screen graphics.</short>
  23. <!-- \FPCexampledir{graphex} -->
  24. <descr>
  25. <p>
  26. This document describes the <var>GRAPH</var> unit for Free Pascal, for all
  27. platforms. The unit was first written for dos by Florian kl\"ampfl, but was
  28. later completely rewritten by Carl-Eric Codere to be completely portable.
  29. The unit is provided for compatibility only: It is recommended to use more
  30. modern graphical systems. The graph unit will allow to recompile old
  31. programs, they will work to some extent, but if the application has
  32. heavy graphical needs, it's recommended to use another set of graphical
  33. routines, suited to the platform the program should work on.
  34. </p>
  35. </descr>
  36. <topic name="Requirements">
  37. <short>Requirements</short>
  38. <descr>
  39. <p>
  40. The unit Graph exports functions and procedures for graphical output.
  41. It requires at least a VGA-compatible Card or a VGA-Card with software-driver
  42. (min. <b>512Kb</b> video memory).
  43. </descr>
  44. </topic>
  45. <topic name="Modes">
  46. <short>A word about mode selection</short>
  47. <descr>
  48. <p>
  49. The graph unit was implemented for compatibility with the old Turbo Pascal graph
  50. unit. For this reason, the mode constants as they were defined in the
  51. Turbo Pascal graph unit are retained.
  52. </p>
  53. <p>
  54. However, since
  55. </p>
  56. <ol>
  57. <li> Video cards have evolved very much</li>
  58. <li> Free Pascal runs on multiple platforms</li>
  59. </ol>
  60. <p>
  61. it was decided to implement new mode and graphic driver constants,
  62. which are more independent of the specific platform the program runs on.
  63. </p>
  64. <p>
  65. In this section we give a short explanation of the new mode system. the
  66. following drivers were defined:
  67. </p>
  68. <code>
  69. D1bit = 11;
  70. D2bit = 12;
  71. D4bit = 13;
  72. D6bit = 14; { 64 colors Half-brite mode - Amiga }
  73. D8bit = 15;
  74. D12bit = 16; { 4096 color modes HAM mode - Amiga }
  75. D15bit = 17;
  76. D16bit = 18;
  77. D24bit = 19; { not yet supported }
  78. D32bit = 20; { not yet supported }
  79. D64bit = 21; { not yet supported }
  80. lowNewDriver = 11;
  81. highNewDriver = 21;
  82. </code>
  83. <p>
  84. Each of these drivers specifies a desired color-depth.
  85. </p>
  86. <p>
  87. The following modes have been defined:
  88. </p>
  89. <code>
  90. detectMode = 30000;
  91. m320x200 = 30001;
  92. m320x256 = 30002; { amiga resolution (PAL) }
  93. m320x400 = 30003; { amiga/atari resolution }
  94. m512x384 = 30004; { mac resolution }
  95. m640x200 = 30005; { vga resolution }
  96. m640x256 = 30006; { amiga resolution (PAL) }
  97. m640x350 = 30007; { vga resolution }
  98. m640x400 = 30008;
  99. m640x480 = 30009;
  100. m800x600 = 30010;
  101. m832x624 = 30011; { mac resolution }
  102. m1024x768 = 30012;
  103. m1280x1024 = 30013;
  104. m1600x1200 = 30014;
  105. m2048x1536 = 30015;
  106. lowNewMode = 30001;
  107. highNewMode = 30015;
  108. </code>
  109. <p>
  110. These modes start at 30000 because Borland specified that the mode number
  111. should be ascending with increasing X resolution, and the new constants
  112. shouldn't interfere with the old ones.
  113. </p>
  114. <p>
  115. The above constants can be used to set a certain color depth and resultion,
  116. as demonstrated in the below example.
  117. </p>
  118. <p>
  119. If other modes than the ones above are supported by the graphics card,
  120. you will not be able to select them with this mechanism.
  121. </p>
  122. <p>
  123. For this reason, there is also a 'dynamic' mode number, which is assigned at
  124. run-time. This number increases with increasing X resolution. It can be
  125. queried with the <var>getmoderange</var> call. This call will return the range
  126. of modes which are valid for a certain graphics driver. The numbers are
  127. guaranteed to be consecutive, and can be used to search for a certain
  128. resolution, as in the second example below.
  129. </p>
  130. <p>
  131. Thus, the <var>getmoderange</var> function can be used to detect all available
  132. modes and drivers, as in the third example below:
  133. </p>
  134. </descr>
  135. <example file="inigraph1"/>
  136. <example file="inigraph2"/>
  137. <example file="modrange"/>
  138. </topic>
  139. <topic name="TargetIssuesDos">
  140. <short>Target specific issues: DOS</short>
  141. <descr>
  142. <p>
  143. VESA modes (i.e., anything but 320x200x256 and 640x480x16) do not work
  144. under most installations of Windows NT, Windows 2000 and Windows XP.
  145. They also do not work for some people under Windows 98 and Windows ME,
  146. depending on their graphics drivers. However, the graph unit cannot
  147. detect this, because no errors are returned from the system.
  148. In such cases, the screen simply turns black, or will show garbage.
  149. </p>
  150. <p>
  151. Nothing can be done about this, the reason is missing or buggy
  152. support in the graphics drivers of the operating system.
  153. </p>
  154. </descr>
  155. </topic>
  156. <topic name="TargetIssuesWindows">
  157. <short>Target specific issues: Windows</short>
  158. <descr>
  159. <p>
  160. The windows version of the Graph units is not very performant. It works,
  161. thus allowing to port old TP programs to Windows, but that is all what can
  162. be expected from it. Further, it is windowed only: A separate window is
  163. opened in which the graphics are displayed. This means that the normal
  164. keyboard/mouse handling as provided by the crt and/or keyboard/mouse units
  165. wil not work in the graphical window. If keyboard and mouse input are needed
  166. the winmouse and the wincrt unit should be used instead.
  167. To hide the console window, compile with the
  168. </p>
  169. <code>
  170. {$apptype gui}
  171. </code>
  172. <p>
  173. switch.
  174. </p>
  175. <p>
  176. Further, the following extra modes are available:
  177. </p>
  178. <code>
  179. mLargestWindow16 = $f0;
  180. mLargestWindow256 = $f1;
  181. mLargestWindow32k = $f2;
  182. mLargestWindow64k = $f3;
  183. mLargestWindow16M = $f4;
  184. mMaximizedWindow16 = $f5;
  185. mMaximizedWindow256 = $f6;
  186. mMaximizedWindow32k = $f7;
  187. mMaximizedWindow64k = $f8;
  188. mMaximizedWindow16M = $f9;
  189. </code>
  190. </descr>
  191. </topic>
  192. <topic name="TargetIssuesWindows">
  193. <short>Target specific issues: Linux</short>
  194. <descr>
  195. <p>
  196. There are several issues on Linux that need to be taken care of:
  197. </p>
  198. <p>
  199. The Linux version of the <file>Graph</file> unit uses the <file>libvga</file>
  200. library. This library works on the console, not under X.
  201. </p>
  202. <p>
  203. If you get an error similar to
  204. </p>
  205. <code>
  206. /usr/bin/ld: cannot find -lvga
  207. </code>
  208. <p>
  209. This can mean one of two things: either libvga and it's development package
  210. is not installed properly, or the directory where it is installed is not in
  211. the linker path.
  212. </p>
  213. <p>
  214. To remedy the former, you should install both the libvga
  215. package and libvga-devel package (or compile and install from scratch).
  216. </p>
  217. <p>
  218. To remedy the latter, you should add the path to the compiler command-line
  219. using the <var>-Fl</var> option.
  220. </p>
  221. <p>
  222. Programs using <file>libvga</file> need root privileges to run.
  223. You can make them setuid root with the following command:
  224. </p>
  225. <code>
  226. chown root.root myprogram
  227. chmod u+s myprogram
  228. </code>
  229. <p>
  230. The libvga library will give up the root privileges after it is initialized.
  231. </p>
  232. <p>
  233. there is an experimental version of the Graphics library available that
  234. uses GGI to do all the drawing, but it is not well tested. It's called
  235. <file>ggigraph</file> and is distributed in source form only.
  236. </p>
  237. <p>
  238. Do not use the CRT unit together with the Graph unit: the console may
  239. end up in an unusable state. Instead, the <file>ncurses</file> unit may function
  240. fine.
  241. </p>
  242. </descr>
  243. </topic>
  244. <topic name="category">
  245. <short>Function list by category</short>
  246. <descr>
  247. What follows is a listing of the available functions, grouped by category.
  248. For each function there is a reference to the page where you can find the
  249. function.
  250. <topic name="FuncInitializion">
  251. <short>Categorized functions: Initialization</short>
  252. <descr>
  253. <p>
  254. Initialization of the graphics screen.
  255. </p>
  256. <table>
  257. <th><td>Name</td><td>Description</td></th>
  258. <tr><td><link id="ClearDevice"/></td><td>Empty the graphics screen</td></tr>
  259. <tr><td><link id="CloseGraph"/></td><td>Finish drawing session, return to text mode</td></tr>
  260. <tr><td><link id="DetectGraph"/></td><td>Detect graphical modes</td></tr>
  261. <tr><td><link id="GetAspectRatio"/></td><td>Get aspect ratio of screen</td></tr>
  262. <tr><td><link id="GetModeRange"/></td><td>Get range of valid modes for current driver</td></tr>
  263. <tr><td><link id="GraphDefaults"/></td><td>Set defaults</td></tr>
  264. <tr><td><link id="GetDriverName"/></td><td>Return name of graphical driver</td></tr>
  265. <tr><td><link id="GetGraphMode"/></td><td>Return current or last used graphics mode</td></tr>
  266. <tr><td><link id="GetMaxMode"/></td><td>Get maximum mode for current driver</td></tr>
  267. <tr><td><link id="GetModeName"/></td><td>Get name of current mode</td></tr>
  268. <tr><td><link id="GraphErrorMsg"/></td><td>String representation of graphical error</td></tr>
  269. <tr><td><link id="GraphResult"/></td><td>Result of last drawing operation</td></tr>
  270. <tr><td><link id="InitGraph"/></td><td>Initialize graphics drivers</td></tr>
  271. <tr><td><link id="InstallUserDriver"/></td><td>Install a new driver</td></tr>
  272. <tr><td><link id="RegisterBGIDriver"/></td><td>Register a new driver</td></tr>
  273. <tr><td><link id="RestoreCRTMode"/></td><td>Go back to text mode</td></tr>
  274. <tr><td><link id="SetGraphBufSize"/></td><td>Set buffer size for graphical operations</td></tr>
  275. <tr><td><link id="SetGraphMode"/></td><td>Set graphical mode</td></tr>
  276. </table>
  277. </descr>
  278. </topic>
  279. <topic name="FuncScreen">
  280. <short>Categorized functions: Screen management</short>
  281. <descr>
  282. <p>
  283. General drawing screen management functions.
  284. </p>
  285. <table>
  286. <th><td>Name</td><td>Description</td></th>
  287. <tr><td><link id="ClearViewPort"/></td><td>Clear the current viewport</td></tr>
  288. <tr><td><link id="GetImage"/></td><td>Copy image from screen to memory</td></tr>
  289. <tr><td><link id="GetMaxX"/></td><td>Get maximum X coordinate</td></tr>
  290. <tr><td><link id="GetMaxY"/></td><td>Get maximum Y coordinate</td></tr>
  291. <tr><td><link id="GetX"/></td><td>Get current X position</td></tr>
  292. <tr><td><link id="GetY"/></td><td>Get current Y position</td></tr>
  293. <tr><td><link id="ImageSize"/></td><td>Get size of selected image</td></tr>
  294. <tr><td><link id="GetViewSettings"/></td><td>Get current viewport settings</td></tr>
  295. <tr><td><link id="PutImage"/></td><td>Copy image from memory to screen</td></tr>
  296. <tr><td><link id="SetActivePage"/></td><td>Set active video page</td></tr>
  297. <tr><td><link id="SetAspectRatio"/></td><td>Set aspect ratio for drawing routines</td></tr>
  298. <tr><td><link id="SetViewPort"/></td><td>Set current viewport</td></tr>
  299. <tr><td><link id="SetVisualPage"/></td><td>Set visual page</td></tr>
  300. <tr><td><link id="SetWriteMode"/></td><td>Set write mode for screen operations</td></tr>
  301. </table>
  302. </descr>
  303. </topic>
  304. <topic name="FuncColorManagement">
  305. <short>Categorized functions: Color management</short>
  306. <descr>
  307. <p>
  308. All functions related to color management.
  309. </p<
  310. <table>
  311. <th><td>Name</td><td>Description</td></th>
  312. <tr><td><link id="GetBkColor"/></td><td>Get current background color</td></tr>
  313. <tr><td><link id="GetColor"/></td><td>Get current foreground color</td></tr>
  314. <tr><td><link id="GetDefaultPalette"/></td><td>Get default palette entries</td></tr>
  315. <tr><td><link id="GetMaxColor"/></td><td>Get maximum valid color</td></tr>
  316. <tr><td><link id="GetPaletteSize"/></td><td>Get size of palette for current mode</td></tr>
  317. <tr><td><link id="GetPixel"/></td><td>Get color of selected pixel</td></tr>
  318. <tr><td><link id="GetPalette"/></td><td>Get palette entry</td></tr>
  319. <tr><td><link id="SetAllPallette"/></td><td>Set all colors in palette</td></tr>
  320. <tr><td><link id="SetBkColor"/></td><td>Set background color</td></tr>
  321. <tr><td><link id="SetColor"/></td><td>Set foreground color</td></tr>
  322. <tr><td><link id="SetPalette"/></td><td>Set palette entry</td></tr>
  323. <tr><td><link id="SetRGBPalette"/></td><td>Set palette entry with RGB values</td></tr>
  324. </table>
  325. </descr>
  326. </topic>
  327. <topic name="FuncDrawing">
  328. <short>Categorized functions: Drawing primitives</short>
  329. <descr>
  330. <p>
  331. Functions for simple drawing.
  332. </p>
  333. <table>
  334. <th><td>Name</td><td>Description</td></th>
  335. <tr><td><link id="Arc"/></td><td>Draw an arc</td></tr>
  336. <tr><td><link id="Circle"/></td><td>Draw a complete circle</td></tr>
  337. <tr><td><link id="DrawPoly"/></td><td>Draw a polygone with N points</td></tr>
  338. <tr><td><link id="Ellipse"/></td><td>Draw an ellipse</td></tr>
  339. <tr><td><link id="GetArcCoords"/></td><td>Get arc coordinates</td></tr>
  340. <tr><td><link id="GetLineSettings"/></td><td>Get current line drawing settings</td></tr>
  341. <tr><td><link id="Line"/></td><td>Draw line between 2 points</td></tr>
  342. <tr><td><link id="LineRel"/></td><td>Draw line relative to current position</td></tr>
  343. <tr><td><link id="LineTo"/></td><td>Draw line from current position to absolute position</td></tr>
  344. <tr><td><link id="MoveRel"/></td><td>Move cursor relative to current position</td></tr>
  345. <tr><td><link id="MoveTo"/></td><td>Move cursor to absolute position</td></tr>
  346. <tr><td><link id="PieSlice"/></td><td>Draw a pie slice</td></tr>
  347. <tr><td><link id="PutPixel"/></td><td>Draw 1 pixel</td></tr>
  348. <tr><td><link id="Rectangle"/></td><td>Draw a non-filled rectangle</td></tr>
  349. <tr><td><link id="Sector"/></td><td>Draw a sector</td></tr>
  350. <tr><td><link id="SetLineStyle"/></td><td>Set current line drawing style</td></tr>
  351. </table>
  352. </descr>
  353. </topic>
  354. <topic name="FuncFilledDrawing">
  355. <short>Categorized functions: Filled drawings</short>
  356. <descr>
  357. <p>
  358. Functions for drawing filled regions.
  359. </p>
  360. <table>
  361. <th><td>Name</td><td>Description</td></th>
  362. <tr><td><link id="Bar3D"/></td><td>Draw a filled 3D-style bar</td></tr>
  363. <tr><td><link id="Bar"/></td><td>Draw a filled rectangle</td></tr>
  364. <tr><td><link id="FloodFill"/></td><td>Fill starting from coordinate</td></tr>
  365. <tr><td><link id="FillEllipse"/></td><td>Draw a filled ellipse</td></tr>
  366. <tr><td><link id="FillPoly"/></td><td>Draw a filled polygone</td></tr>
  367. <tr><td><link id="GetFillPattern"/></td><td>Get current fill pattern</td></tr>
  368. <tr><td><link id="GetFillSettings"/></td><td>Get current fill settings</td></tr>
  369. <tr><td><link id="SetFillPattern"/></td><td>Set current fill pattern</td></tr>
  370. <tr><td><link id="SetFillStyle"/></td><td>Set current fill settings</td></tr>
  371. </table>
  372. </descr>
  373. </topic>
  374. <topic name="FuncTextHandling">
  375. <short>Categorized functions: Text and font handling</short>
  376. <descr>
  377. <p>
  378. Functions to set texts on the screen.
  379. </p>
  380. <table>
  381. <th><td>Name</td><td>Description</td></th>
  382. <tr><td><link id="GetTextSettings"/></td><td>Get current text settings</td></tr>
  383. <tr><td><link id="InstallUserFont"/></td><td>Install a new font</td></tr>
  384. <tr><td><link id="OutText"/></td><td>Write text at current cursor position</td></tr>
  385. <tr><td><link id="OutTextXY"/></td><td>Write text at coordinates X,Y</td></tr>
  386. <tr><td><link id="RegisterBGIFont"/></td><td>Register a new font</td></tr>
  387. <tr><td><link id="SetTextJustify"/></td><td>Set text justification</td></tr>
  388. <tr><td><link id="SetTextStyle"/></td><td>Set text style</td></tr>
  389. <tr><td><link id="SetUserCharSize"/></td><td>Set text size</td></tr>
  390. <tr><td><link id="TextHeight"/></td><td>Calculate height of text</td></tr>
  391. <tr><td><link id="TextWidth"/></td><td>Calculate width of text</td></tr>
  392. </table>
  393. </descr>
  394. </topic>
  395. <element name="ArcCoordsType">
  396. <short>Describe the last arc which was drawn on screen</short>
  397. </element>
  398. <element name="ArcCoordsType.X">
  399. <short>Center X coordinate</short>
  400. </element>
  401. <element name="ArcCoordsType.Y">
  402. <short>Center Y coordinate</short>
  403. </element>
  404. <element name="ArcCoordsType.XStart">
  405. <short>Drawing segment start X coordinate</short>
  406. </element>
  407. <element name="ArcCoordsType.YStart">
  408. <short>Drawing segment start Y coordinate</short>
  409. </element>
  410. <element name="ArcCoordsType.XEnd">
  411. <short>Drawing segment end X coordinate</short>
  412. </element>
  413. <element name="ArcCoordsType.YEnd">
  414. <short>Drawing segment end Y coordinate</short>
  415. </element>
  416. <element name="FillPatternType">
  417. <short>Bit pattern used when drawing lines. Set bits are drawn.</short>
  418. </element>
  419. <element name="FillSettingsType">
  420. <short>Record describing fill mode</short>
  421. </element>
  422. <element name="FillSettingsType.Pattern">
  423. <short>Fill bit pattern. Set bits are drawn..</short>
  424. </element>
  425. <element name="FillSettingsType.Color">
  426. <short>Color used to fill</short>
  427. </element>
  428. <element name="LineSettingsType">
  429. <short>Record describing current line drawing mode</short>
  430. </element>
  431. <element name="LineSettingsType.LineStyle">
  432. <short>Line style used when drawing.</short>
  433. </element>
  434. <element name="LineSettingsType.Pattern">
  435. <short>Pattern used when drawing.</short>
  436. </element>
  437. <element name="LineSettingsType.Width">
  438. <short>Line width used when drawing.</short>
  439. </element>
  440. <element name="RGBRec">
  441. <short>Record describing palette RGB color</short>
  442. </element>
  443. <element name="RGBRec.Red">
  444. <short>Red component of color</short>
  445. </element>
  446. <element name="RGBRec.Green">
  447. <short>Green component of color</short>
  448. </element>
  449. <element name="RGBRec.Blue">
  450. <short>Blue component of color</short>
  451. </element>
  452. <element name="PaletteType">
  453. <short>Record describing palette.</short>
  454. </element>
  455. <element name="PaletteType.Size">
  456. <short>Actual size of palette (number of entries)</short>
  457. </element>
  458. <element name="PaletteType.Colors">
  459. <short>Color entries in palette.</short>
  460. </element>
  461. <element name="PointType">
  462. <short>Record describing a point in a 2 dimensional plane</short>
  463. </element>
  464. <element name="PointType.X">
  465. <short>X coordinate</short>
  466. </element>
  467. <element name="PointType.Y">
  468. <short>Y coordinate</short>
  469. </element>
  470. <element name="TextSettingsType">
  471. <short>Record describing how texts are drawn.</short>
  472. </element>
  473. TextSettingsType = Record
  474. Font,Direction, CharSize, Horiz, Vert : Word
  475. end;
  476. <element name="TextSettingsType.Font">
  477. <short>Font used.</short>
  478. </element>
  479. <element name="TextSettingsType.Direction">
  480. <short>Direction in which to write.</short>
  481. </element>
  482. <element name="TextSettingsType.CharSize">
  483. <short>Font size</short>
  484. </element>
  485. <element name="TextSettingsType.Horiz">
  486. <short>Horizontal justification</short>
  487. </element>
  488. <element name="TextSettingsType.Vert">
  489. <short>Vertical justification</short>
  490. </element>
  491. <element name="ViewPortType">
  492. <short>Record describing a viewport</short>
  493. </element>
  494. <element name="ViewPortType.X1">
  495. <short>X coordinate of upper-left corner.</short>
  496. </element>
  497. <element name="ViewPortType.X2">
  498. <short>X coordinate of lower-right corner.</short>
  499. </element>
  500. <element name="ViewPortType.Y1">
  501. <short>Y coordinate of upper-left corner.</short>
  502. </element>
  503. <element name="ViewPortType.Y2">
  504. <short>Y coordinate of lower-right corner.</short>
  505. </element>
  506. <element name="ViewPortType.Clip">
  507. <short>Should drawing be clipped to the current rectangle?</short>
  508. </element>
  509. <element name="Arc">
  510. <short>Draw part of a circle</short>
  511. <descr>
  512. <var>Arc</var> draws part of a circle with center at <var>(X,Y)</var>, radius
  513. <var>radius</var>, starting from angle <var>start</var>, stopping at angle <var>stop</var>.
  514. These angles are measured
  515. counterclockwise.
  516. </descr>
  517. <errors>
  518. None.
  519. </errors>
  520. <seealso>
  521. <link id="Circle"/>
  522. <link id="Ellipse"/>
  523. <link id="GetArcCoords"/>
  524. <link id="PieSlice"/>
  525. <link id="Sector"/>
  526. </seealso>
  527. </element>
  528. <element name="Bar">
  529. <short>Draw filled rectangle</short>
  530. <descr>
  531. Draws a rectangle with corners at <var>(X1,Y1)</var> and <var>(X2,Y2)</var>
  532. and fills it with the current color and fill-style.
  533. </descr>
  534. <errors>
  535. None.
  536. </errors>
  537. <seealso>
  538. <link id="Bar3D"/>,
  539. <link id="Rectangle"/>
  540. </seealso>
  541. </element>
  542. <element name="Bar3D">
  543. <short>Draw filled 3-dimensional rectangle</short>
  544. <descr>
  545. <p>
  546. <var>Bar3d</var> draws a 3-dimensional Bar with corners at <var>(X1,Y1)</var> and <var>(X2,Y2)</var>
  547. and fills it with the current color and fill-style.
  548. <var>Depth</var> specifies the number of pixels used to show the depth of the
  549. bar.
  550. </p>
  551. <p>
  552. If <var>Top</var> is true; then a 3-dimensional top is drawn.
  553. </p>
  554. </descr>
  555. <errors>
  556. None.
  557. </errors>
  558. <seealso>
  559. <link id="Bar"/>
  560. <link id="Rectangle"/>
  561. </seealso>
  562. </element>
  563. <element name="Circle">
  564. <short>Draw a complete circle</short>
  565. <descr>
  566. <var>Circle</var> draws a complete circle with center at <var>(X,Y)</var>, radius
  567. <var>radius</var>.
  568. </descr>
  569. <errors>
  570. None.
  571. </errors>
  572. <seealso>
  573. <link id="Ellipse"/>
  574. <link id="Arc"/>
  575. <link id="GetArcCoords"/>
  576. <link id="PieSlice"/>
  577. <link id="Sector"/>
  578. </seealso>
  579. </element>
  580. <element name="ClearDevice">
  581. <short>Clear the complete screen</short>
  582. <descr>
  583. Clears the graphical screen (with the current
  584. background color), and sets the pointer at <var>(0,0)</var>.
  585. </descr>
  586. <errors>
  587. None.
  588. </errors>
  589. <seealso>
  590. <link id="ClearViewPort"/>
  591. <link id="SetBkColor"/>
  592. </seealso>
  593. </element>
  594. <element name="ClearViewPort">
  595. <short>Clear the current viewport</short>
  596. <descr>
  597. Clears the current viewport. The current background color is used as filling
  598. color. The pointer is set at <var>(0,0)</var>.
  599. </descr>
  600. <errors>
  601. None.
  602. </errors>
  603. <seealso>
  604. <link id="ClearDevice"/>
  605. <link id="SetViewPort"/>
  606. <link id="SetBkColor"/>
  607. </seealso>
  608. </element>
  609. <element name="CloseGraph">
  610. <short>Close graphical system.</short>
  611. <descr>
  612. Closes the graphical system, and restores the
  613. screen modus which was active before the graphical modus was
  614. activated.
  615. </descr>
  616. <errors>
  617. None.
  618. </errors>
  619. <seealso>
  620. <link id="InitGraph"/>
  621. </seealso>
  622. </element>
  623. <element name="DetectGraph">
  624. <short>Detect correct graphical driver to use</short>
  625. <descr>
  626. <var>DetectGraph</var> checks the hardware in the PC and determines the driver and screen-modus to
  627. be used. These are returned in <var>Driver</var> and <var>Modus</var>, and can be fed
  628. to <var>InitGraph</var>.
  629. See the <var>InitGraph</var> for a list of drivers and modi.
  630. </descr>
  631. <errors>
  632. None.
  633. </errors>
  634. <seealso>
  635. <link id="InitGraph"/>
  636. </seealso>
  637. </element>
  638. <element name="DrawPoly">
  639. <short>Draw a polygone</short>
  640. <descr>
  641. <var>DrawPoly</var> draws a polygone with <var>NumberOfPoints</var> corner points, using the
  642. current color and line-style. PolyPoints is an array of type <link id="PointType">.
  643. </descr>
  644. <errors>
  645. None.
  646. </errors>
  647. <seealso>
  648. <link id="Bar"/>
  649. <link id="Bar3D">
  650. <link id="Rectangle"/>
  651. </seealso>
  652. </element>
  653. <element name="Ellipse">
  654. <short>Draw an ellipse</short>
  655. <descr>
  656. <var>Ellipse</var> draws part of an ellipse with center at <var>(X,Y)</var>.
  657. <var>XRadius</var> and <var>Yradius</var> are the horizontal and vertical radii of the
  658. ellipse. <var>Start</var> and <var>Stop</var> are the starting and stopping angles of
  659. the part of the ellipse. They are measured counterclockwise from the X-axis
  660. (3 o'clock is equal to 0 degrees). Only positive angles can be specified.
  661. </descr>
  662. <errors>
  663. None.
  664. </errors>
  665. <seealso>
  666. <link id="Arc"/>
  667. <link id="Circle"/>
  668. <link id="FillEllipse"/>
  669. </seealso>
  670. </element>
  671. <element name="FillEllipse">
  672. <short></short>
  673. <descr>
  674. <var>Ellipse</var> draws an ellipse with center at <var>(X,Y)</var>.
  675. <var>XRadius</var> and <var>Yradius</var> are the horizontal and vertical radii of the
  676. ellipse. The ellipse is filled with the current color and fill-style.
  677. </descr>
  678. <errors>
  679. None.
  680. </errors>
  681. <seealso>
  682. <link id="Arc"/>
  683. <link id="Circle"/>
  684. <link id="GetArcCoords"/>
  685. <link id="PieSlice"/>
  686. <link id="Sector"/>
  687. </seealso>
  688. </element>
  689. <element name="FillPoly">
  690. <short>Draw, close and fill a polygone</short>
  691. <descr>
  692. <var>FillPoly</var> draws a polygone with <var>NumberOfPoints</var> corner points and fills it
  693. using the current color and line-style.
  694. PolyPoints is an array of type <var>PointType</var>.
  695. </descr>
  696. <errors>
  697. None.
  698. </errors>
  699. <seealso>
  700. <link id="Bar"/>
  701. <link id="Bar3D">
  702. <link id="Rectangle"/>
  703. </seealso>
  704. </element>
  705. <element name="FloodFill">
  706. <short>Fill an area with a given color</short>
  707. <descr>
  708. Fills the area containing the point <var>(X,Y)</var>, bounded by the color
  709. <var>BorderColor</var>.
  710. </descr>
  711. <errors>
  712. None
  713. </errors>
  714. <seealso>
  715. <link id="SetColor"/>
  716. <link id="SetBkColor"/>
  717. </seealso>
  718. </element>
  719. <element name="GetArcCoords">
  720. <short>Return coordinates of last drawn arc or ellipse.</short>
  721. <descr>
  722. <var>GetArcCoords</var> returns the coordinates of the latest <var>Arc</var> or
  723. <var>Ellipse</var> call.
  724. </descr>
  725. <errors>
  726. None.
  727. </errors>
  728. <seealso>
  729. <link id="Arc"/>
  730. <link id="Ellipse"/>
  731. </seealso>
  732. </element>
  733. <element name="GetAspectRatio">
  734. <short>Return screen resolution</short>
  735. <descr>
  736. <var>GetAspectRatio</var> determines the effective resolution of the screen. The aspect ration can
  737. then be calculated as <var>Xasp/Yasp</var>.
  738. </descr>
  739. <errors>
  740. None.
  741. </errors>
  742. <seealso>
  743. <link id="InitGraph"/>
  744. <link id="SetAspectRatio"/>
  745. </seealso>
  746. </element>
  747. <element name="GetBkColor">
  748. <short>Return current background color</short>
  749. <descr>
  750. <var>GetBkColor</var> returns the current background color (the palette
  751. entry).
  752. </descr>
  753. <errors>
  754. None.
  755. </errors>
  756. <seealso>
  757. <link id="GetColor"/>
  758. <link id="SetBkColor"/>
  759. </seealso>
  760. </element>
  761. <element name="GetColor">
  762. <short>Return current drawing color</short>
  763. <descr>
  764. <var>GetColor</var> returns the current drawing color (the palette
  765. entry).
  766. </descr>
  767. <errors>
  768. None.
  769. </errors>
  770. <seealso>
  771. <link id="GetColor"/>
  772. <link id="SetBkColor"/>
  773. </seealso>
  774. </element>
  775. <element name="GetDefaultPalette">
  776. <short>Return default palette</short>
  777. <descr>
  778. <var>GetDefaultPalette</var> returns the current palette in <var>Palette</var>.
  779. </descr>
  780. <errors>
  781. None.
  782. </errors>
  783. <seealso>
  784. <link id="GetColor"/>
  785. <link id="GetBkColor"/>
  786. </seealso>
  787. </element>
  788. <element name="GetDriverName">
  789. <short>Return current driver name</short>
  790. <descr>
  791. <var>GetDriverName</var> returns a string containing the name of the
  792. current driver.
  793. </descr>
  794. <errors>
  795. None.
  796. </errors>
  797. <seealso>
  798. <link id="GetModeName"/>
  799. <link id="InitGraph"/>
  800. </seealso>
  801. </element>
  802. <element name="GetFillPattern">
  803. <short>Return current fill pattern</short>
  804. <descr>
  805. <var>GetFillPattern</var> returns an array with the current fill-pattern in <var>FillPattern</var>
  806. </descr>
  807. <errors>
  808. None
  809. </errors>
  810. <seealso>
  811. <link id="SetFillPattern"/>
  812. </seealso>
  813. </element>
  814. <element name="GetFillSettings">
  815. <short>Return current fill settings</short>
  816. <descr>
  817. <var>GetFillSettings</var> returns the current fill-settings in
  818. <var>FillInfo</var>
  819. </descr>
  820. <errors>
  821. None.
  822. </errors>
  823. <seealso>
  824. <link id="SetFillPattern"/>
  825. </seealso>
  826. </element>
  827. <element name="GetGraphMode">
  828. <short>Get current graphical modus</short>
  829. <descr>
  830. <var>GetGraphMode</var> returns the current graphical modus
  831. </descr>
  832. <errors>
  833. None.
  834. </errors>
  835. <seealso>
  836. <link id="InitGraph"/>
  837. </seealso>
  838. </element>
  839. <element name="GetImage">
  840. <short>Return a copy of a screen area</short>
  841. <descr>
  842. <var>GetImage</var>
  843. Places a copy of the screen area <var>(X1,Y1)</var> to <var>X2,Y2</var> in <var>BitMap</var>
  844. </descr>
  845. <errors>
  846. Bitmap must have enough room to contain the image.
  847. </errors>
  848. <seealso>
  849. <link id="ImageSize"/>,
  850. <link id="PutImage"/>
  851. </seealso>
  852. </element>
  853. <element name="GetLineSettings">
  854. <short>Get current line drawing settings</short>
  855. <descr>
  856. <var>GetLineSettings</var> returns the current Line settings in
  857. <var>LineInfo</var>
  858. </descr>
  859. <errors>
  860. None.
  861. </errors>
  862. <seealso>
  863. <link id="SetLineStyle"/>
  864. </seealso>
  865. </element>
  866. <element name="GetMaxColor">
  867. <short>return maximum number of colors</short>
  868. <descr>
  869. <var>GetMaxColor</var> returns the maximum color-number which can be
  870. set with <var>SetColor</var>. Contrary to Turbo Pascal, this color isn't always
  871. guaranteed to be white (for instance in 256+ color modes).
  872. </descr>
  873. <errors>
  874. None.
  875. </errors>
  876. <seealso>
  877. <link id="SetColor"/>,
  878. <link id="GetPaletteSize"/>
  879. </seealso>
  880. </element>
  881. <element name="GetMaxMode">
  882. <short>Return biggest mode for the current driver</short>
  883. <descr>
  884. <var>GetMaxMode</var> returns the highest modus for
  885. the current driver.
  886. </descr>
  887. <errors>
  888. None.
  889. </errors>
  890. <seealso>
  891. <link id="InitGraph"/>
  892. </seealso>
  893. </element>
  894. <element name="GetMaxX">
  895. <short>Return maximal X coordinate</short>
  896. <descr>
  897. <var>GetMaxX</var> returns the maximum horizontal screen
  898. length
  899. </descr>
  900. <errors>
  901. None.
  902. </errors>
  903. <seealso>
  904. <link id="GetMaxY"/>
  905. </seealso>
  906. </element>
  907. <element name="GetMaxY">
  908. <short>Return maximal Y coordinate</short>
  909. <descr>
  910. <var>GetMaxY</var> returns the maximum number of screen
  911. lines
  912. </descr>
  913. <errors>
  914. None.
  915. </errors>
  916. <seealso>
  917. <link id="GetMaxY"/>
  918. </seealso>
  919. </element>
  920. <element name="GetModeName">
  921. <short>Return description a modus</short>
  922. <descr>
  923. <var>GetModeName</var> Returns a string with the name of modus
  924. <var>Modus</var>
  925. </descr>
  926. <errors>
  927. None.
  928. </errors>
  929. <seealso>
  930. <link id="GetDriverName"/>
  931. <link id="InitGraph"/>
  932. </seealso>
  933. </element>
  934. <element name="GetModeRange">
  935. <short>Return lowest and highest modus of current driver</short>
  936. <descr>
  937. <var>GetModeRange</var> returns the Lowest and Highest modus of the currently
  938. installed driver. If no modes are supported for this driver, HiModus
  939. will be -1.
  940. </descr>
  941. <errors>
  942. None.
  943. </errors>
  944. <seealso>
  945. <link id="InitGraph"/>
  946. </seealso>
  947. </element>
  948. <element name="GetPalette">
  949. <short>Return current palette</short>
  950. <descr>
  951. <var>GetPalette</var> returns in <var>Palette</var> the current palette.
  952. </descr>
  953. <errors>
  954. None.
  955. </errors>
  956. <seealso>
  957. <link id="GetPaletteSize"/>
  958. <link id="SetPalette"/>
  959. </seealso>
  960. </element>
  961. <element name="GetPaletteSize">
  962. <short>Return maximal number of entries in current palette </short>
  963. <descr>
  964. <var>GetPaletteSize</var> returns the maximum
  965. number of entries in the current palette.
  966. </descr>
  967. <errors>
  968. None.
  969. </errors>
  970. <seealso>
  971. <link id="GetPalette"/>,
  972. <link id="SetPalette"/>
  973. </seealso>
  974. </element>
  975. <element name="GetPixel">
  976. <short>Return color of pixel</short>
  977. <descr>
  978. <var>GetPixel</var> returns the color of the point at <var>(X,Y)</var>
  979. </descr>
  980. <errors>
  981. None.
  982. </errors>
  983. <seealso>
  984. <link id="PutPixel"/>
  985. </seealso>
  986. </element>
  987. <element name="GetTextSettings">
  988. <short>Return current text style</short>
  989. <descr>
  990. <var>GetTextSettings</var> returns the current text style settings : The font,
  991. direction, size and placement as set with <var>SetTextStyle</var> and
  992. <var>SetTextJustify</var>
  993. </descr>
  994. <errors>
  995. None.
  996. </errors>
  997. <seealso>
  998. <link id="SetTextStyle"/>
  999. <link id="SetTextJustify"/>
  1000. </seealso>
  1001. </element>
  1002. <element name="GetViewSettings">
  1003. <short>Return current viewport</short>
  1004. <descr>
  1005. <var>GetViewSettings</var> returns the current viewport and clipping settings in
  1006. <var>ViewPort</var>.
  1007. </descr>
  1008. <errors>
  1009. None.
  1010. </errors>
  1011. <seealso>
  1012. <link id="SetViewPort"/>
  1013. </seealso>
  1014. </element>
  1015. <element name="GetX">
  1016. <short>Return current cursor X position</short>
  1017. <descr>
  1018. <var>GetX</var> returns the X-coordinate of the current position of
  1019. the graphical pointer
  1020. </descr>
  1021. <errors>
  1022. None.
  1023. </errors>
  1024. <seealso>
  1025. <link id="GetY"/>
  1026. </seealso>
  1027. </element>
  1028. <element name="GetY">
  1029. <short>Return current cursor Y position</short>
  1030. <descr>
  1031. <var>GetY</var> returns the Y-coordinate of the current position of
  1032. the graphical pointer
  1033. </descr>
  1034. <errors>
  1035. None.
  1036. </errors>
  1037. <seealso>
  1038. <link id="GetX"/>
  1039. </seealso>
  1040. </element>
  1041. <element name="GraphDefaults">
  1042. <short>Reset graphical mode to defaults</short>
  1043. <descr>
  1044. <var>GraphDefaults</var> resets all settings for viewport, palette,
  1045. foreground and background pattern, line-style and pattern, filling style,
  1046. filling color and pattern, font, text-placement and
  1047. text size.
  1048. </descr>
  1049. <errors>
  1050. None.
  1051. </errors>
  1052. <seealso>
  1053. <link id="SetViewPort"/>
  1054. <link id="SetFillStyle"/>
  1055. <link id="SetColor"/>,
  1056. <link id="SetBkColor"/>
  1057. <link id="SetLineStyle"/>
  1058. </seealso>
  1059. </element>
  1060. <element name="GraphErrorMsg">
  1061. <short>Return a description of an error</short>
  1062. <descr>
  1063. <var>GraphErrorMsg</var>
  1064. returns a string describing the error <var>Errorcode</var>. This string can be
  1065. used to let the user know what went wrong.
  1066. </descr>
  1067. <errors>
  1068. None.
  1069. </errors>
  1070. <seealso>
  1071. <link id="GraphResult"/>
  1072. </seealso>
  1073. </element>
  1074. <element name="GraphResult">
  1075. <short>Result of last graphical operation</short>
  1076. <descr>
  1077. <p>
  1078. <var>GraphResult</var> returns an error-code for
  1079. the last graphical operation. If the returned value is zero, all went well.
  1080. A value different from zero means an error has occurred.
  1081. besides all operations which draw something on the screen,
  1082. the following procedures also can produce a <var>GraphResult</var> different from
  1083. zero:
  1084. </p>
  1085. <ul>
  1086. <li><link id="InstallUserFont"/></li>
  1087. <li><link id="SetLineStyle"/></li>
  1088. <li><link id="SetWriteMode"/></li>
  1089. <li><link id="SetFillStyle"/></li>
  1090. <li><link id="SetTextJustify"/></li>
  1091. <li><link id="SetGraphMode"/></li>
  1092. <li><link id="SetTextStyle"/></li>
  1093. </ul>
  1094. </descr>
  1095. <errors>
  1096. None.
  1097. </errors>
  1098. <seealso>
  1099. <link id="GraphErrorMsg"/>
  1100. </seealso>
  1101. </element>
  1102. <element name="ImageSize">
  1103. <short>Return size to store image</short>
  1104. <descr>
  1105. <var>ImageSize</var> returns
  1106. the number of bytes needed to store the image in the rectangle defined by
  1107. <var>(X1,Y1)</var> and <var>(X2,Y2)</var>.
  1108. </descr>
  1109. <errors>
  1110. None.
  1111. </errors>
  1112. <seealso>
  1113. <link id="GetImage"/>
  1114. </seealso>
  1115. </element>
  1116. <element name="InitGraph">
  1117. <short>Initialize grpahical system</short>
  1118. <descr>
  1119. <p>
  1120. <var>InitGraph</var> initializes the <var>graph</var> package.
  1121. <var>GraphDriver</var> has two valid values: <var>GraphDriver=0</var> which
  1122. performs an auto detect and initializes the highest possible mode with the most
  1123. colors. 1024x768x64K is the highest possible resolution supported by the
  1124. driver, if you need a higher resolution, you must edit <file>MODES.PPI</file>.
  1125. If you need another mode, then set <var>GraphDriver</var> to a value different
  1126. from zero
  1127. and <var>graphmode</var> to the mode you wish (VESA modes where 640x480x256
  1128. is <var>101h</var> etc.).
  1129. <var>PathToDriver</var> is only needed, if you use the BGI fonts from
  1130. Borland. Free Pascal does not offer BGI fonts like Borland, these must be
  1131. obtained separately.
  1132. </p>
  1133. <p>
  1134. Example code:
  1135. </p>
  1136. <code>
  1137. var
  1138. gd,gm : integer;
  1139. PathToDriver : string;
  1140. begin
  1141. gd:=detect; { highest possible resolution }
  1142. gm:=0; { not needed, auto detection }
  1143. PathToDriver:='C:\PP\BGI'; { path to BGI fonts,
  1144. drivers aren't needed }
  1145. InitGraph(gd,gm,PathToDriver);
  1146. if GraphResult&lt;&gt;grok then
  1147. halt; ..... { whatever you need }
  1148. CloseGraph; { restores the old graphics mode }
  1149. end.
  1150. </code>
  1151. </descr>
  1152. <errors>
  1153. None.
  1154. </errors>
  1155. <seealso>
  1156. <link id="Modes">
  1157. <link id="DetectGraph"/>
  1158. <link id="CloseGraph"/>
  1159. <link id="GraphResult"/>
  1160. </seealso>
  1161. </element>
  1162. <element name="InstallUserDriver">
  1163. <short>Install a user driver</short>
  1164. <descr>
  1165. <var>InstallUserDriver</var>
  1166. adds the device-driver <var>DriverPath</var> to the list of .BGI
  1167. drivers. <var>AutoDetectPtr</var> is a pointer to a possible auto-detect function.
  1168. </descr>
  1169. <errors>
  1170. None.
  1171. </errors>
  1172. <seealso>
  1173. <link id="InitGraph"/>
  1174. <link id="InstallUserFont"/>
  1175. </seealso>
  1176. </element>
  1177. <element name="InstallUserFont">
  1178. <short>Install a user-defined font</short>
  1179. <descr>
  1180. <var>InstallUserFont</var> adds the font in <var>FontPath</var> to the list of fonts
  1181. of the .BGI system.
  1182. </descr>
  1183. <errors>
  1184. None.
  1185. </errors>
  1186. <seealso>
  1187. <link id="InitGraph"/>
  1188. <link id="InstallUserDriver"/>
  1189. </seealso>
  1190. </element>
  1191. <element name="Line">
  1192. <short>Draw a line between 2 points</short>
  1193. <descr>
  1194. <var>Line</var> draws a line starting from
  1195. <var>(X1,Y1</var> to <var>(X2,Y2)</var>, in the current line style and color. The
  1196. current position is put to <var>(X2,Y2)</var>
  1197. </descr>
  1198. <errors>
  1199. None.
  1200. </errors>
  1201. <seealso>
  1202. <link id="LineRel"/>
  1203. <link id="LineTo"/>
  1204. </seealso>
  1205. </element>
  1206. <element name="LineRel">
  1207. <short>Draw a line starting from current position in given direction</short>
  1208. <descr>
  1209. <var>LineRel</var> draws a line starting from
  1210. the current pointer position to the point<var>(DX,DY)</var>, \textbf{relative} to the
  1211. current position, in the current line style and color. The Current Position
  1212. is set to the endpoint of the line.
  1213. </descr>
  1214. <errors>
  1215. None.
  1216. </errors>
  1217. <seealso>
  1218. <link id="Line"/>
  1219. <link id="LineTo"/>
  1220. </seealso>
  1221. </element>
  1222. <element name="LineTo">
  1223. <short>Draw a line starting from current position to a given point</short>
  1224. <descr>
  1225. <var>LineTo</var> draws a line starting from
  1226. the current pointer position to the point<var>(DX,DY</var>, \textbf{relative} to the
  1227. current position, in the current line style and color. The Current position
  1228. is set to the end of the line.
  1229. </descr>
  1230. <errors>
  1231. None.
  1232. </errors>
  1233. <seealso>
  1234. <link id="LineRel"/>
  1235. <link id="Line"/>
  1236. </seealso>
  1237. </element>
  1238. <element name="MoveRel">
  1239. <short>Move cursor relative to current position</short>
  1240. <descr>
  1241. <var>MoveRel</var> moves the pointer to the
  1242. point <var>(DX,DY)</var>, relative to the current pointer
  1243. position
  1244. </descr>
  1245. <errors>
  1246. None.
  1247. </errors>
  1248. <seealso>
  1249. <link id="MoveTo"/>
  1250. </seealso>
  1251. </element>
  1252. <element name="MoveTo">
  1253. <short>Move cursor to absolute position.</short>
  1254. <descr>
  1255. <var>MoveTo</var> moves the pointer to the
  1256. point <var>(X,Y)</var>.
  1257. </descr>
  1258. <errors>
  1259. None.
  1260. </errors>
  1261. <seealso>
  1262. <link id="MoveRel"/>
  1263. </seealso>
  1264. </element>
  1265. <element name="OutText">
  1266. <short>Write text on the screen at the current location.</short>
  1267. <descr>
  1268. <var>OutText</var> puts <var>TextString</var> on the screen, at the current pointer
  1269. position, using the current font and text settings. The current position is
  1270. moved to the end of the text.
  1271. </descr>
  1272. <errors>
  1273. None.
  1274. </errors>
  1275. <seealso>
  1276. <link id="OutTextXY"/>
  1277. </seealso>
  1278. </element>
  1279. <element name="OutTextXY">
  1280. <short>Write text on the screen on given position</short>
  1281. <descr>
  1282. <var>OutText</var> puts <var>TextString</var> on the screen, at position <var>(X,Y)</var>,
  1283. using the current font and text settings. The current position is
  1284. moved to the end of the text.
  1285. </descr>
  1286. <errors>
  1287. None.
  1288. </errors>
  1289. <seealso>
  1290. <link id="OutText"/>
  1291. </seealso>
  1292. </element>
  1293. <element name="PieSlice">
  1294. <short>Draw a pie-slice</short>
  1295. <descr>
  1296. <var>PieSlice</var>
  1297. draws and fills a sector of a circle with center <var>(X,Y)</var> and radius
  1298. <var>Radius</var>, starting at angle <var>Start</var> and ending at angle <var>Stop</var>.
  1299. </descr>
  1300. <errors>
  1301. None.
  1302. </errors>
  1303. <seealso>
  1304. <link id="Arc"/>
  1305. <link id="Circle"/>
  1306. <link id="Sector"/>
  1307. </seealso>
  1308. </element>
  1309. <element name="PutImage">
  1310. <short>Draw an in-memory image to the screen</short>
  1311. <descr>
  1312. <p>
  1313. <var>PutImage</var>
  1314. Places the bitmap in <var>Bitmap</var> on the screen at <var>(X1,Y1)</var>. <var>How</var>
  1315. determines how the bitmap will be placed on the screen. Possible values are :
  1316. </p>
  1317. <ul>
  1318. <li>CopyPut</li>
  1319. <li>XORPut</li>
  1320. <li>ORPut</li>
  1321. <li>AndPut</li>
  1322. <li>NotPut</li>
  1323. </ul>
  1324. </descr>
  1325. <errors>
  1326. None
  1327. </errors>
  1328. <seealso>
  1329. <link id="ImageSize"/>
  1330. <link id="GetImage"/>
  1331. </seealso>
  1332. </element>
  1333. <element name="PutPixel">
  1334. <short>Draw a pixel on the screen</short>
  1335. <descr>
  1336. Puts a point at
  1337. <var>(X,Y)</var> using color <var>Color</var>
  1338. </descr>
  1339. <errors>
  1340. None.
  1341. </errors>
  1342. <seealso>
  1343. <link id="GetPixel"/>
  1344. </seealso>
  1345. </element>
  1346. <element name="Rectangle">
  1347. <short>Draw a rectangle on the screen.</short>
  1348. <descr>
  1349. Draws a rectangle with
  1350. corners at <var>(X1,Y1)</var> and <var>(X2,Y2)</var>, using the current color and
  1351. style.
  1352. </descr>
  1353. <errors>
  1354. None.
  1355. </errors>
  1356. <seealso>
  1357. <link id="Bar"/>
  1358. <link id="Bar3D"/>
  1359. </seealso>
  1360. </element>
  1361. <element name="RegisterBGIDriver">
  1362. <short>Register a new BGI driver.</short>
  1363. <descr>
  1364. Registers a user-defined BGI driver
  1365. </descr>
  1366. <errors>
  1367. None.
  1368. </errors>
  1369. <seealso>
  1370. <link id="InstallUserDriver"/>,
  1371. <link id="RegisterBGIFont"/>
  1372. </seealso>
  1373. </element>
  1374. <element name="RegisterBGIFont">
  1375. <short>Register a new BGI font</short>
  1376. <descr>
  1377. Registers a user-defined BGI driver
  1378. </descr>
  1379. <errors>
  1380. None.
  1381. </errors>
  1382. <seealso>
  1383. <link id="InstallUserFont"/>,
  1384. <link id="RegisterBGIDriver"/>
  1385. </seealso>
  1386. </element>
  1387. <element name="RestoreCRTMode">
  1388. <short>Restore text screen</short>
  1389. <descr>
  1390. <p>
  1391. Restores the screen modus which was active before
  1392. the graphical modus was started.
  1393. </p>
  1394. <p>
  1395. To get back to the graph mode you were last in, you can use
  1396. <var>SetGraphMode(GetGraphMode)</var>
  1397. </p>
  1398. </descr>
  1399. <errors>
  1400. None.
  1401. </errors>
  1402. <seealso>
  1403. <link id="InitGraph"/>
  1404. </seealso>
  1405. </element>
  1406. <element name="Sector">
  1407. <short>Draw and fill a sector of an ellipse</short>
  1408. <descr>
  1409. <var>Sector</var>
  1410. draws and fills a sector of an ellipse with center <var>(X,Y)</var> and radii
  1411. <var>XRadius</var> and <var>YRadius</var>, starting at angle <var>Start</var> and ending at angle <var>Stop</var>.
  1412. </descr>
  1413. <errors>
  1414. None.
  1415. </errors>
  1416. <seealso>
  1417. <link id="Arc"/>
  1418. <link id="Circle"/>
  1419. <link id="PieSlice"/>
  1420. </seealso>
  1421. </element>
  1422. <element name="SetActivePage">
  1423. <short>Set active graphical page</short>
  1424. <descr>
  1425. Sets <var>Page</var> as the active page
  1426. for all graphical output.
  1427. </descr>
  1428. <errors>
  1429. None.
  1430. </errors>
  1431. <seealso>
  1432. </seealso>
  1433. </element>
  1434. <element name="SetAllPallette">
  1435. <short>Specify a complete new palette</short>
  1436. <descr>
  1437. Sets the current palette to
  1438. <var>Palette</var>. <var>Palette</var> is an untyped variable, usually pointing to a
  1439. record of type <var>PaletteType</var>
  1440. </descr>
  1441. <errors>
  1442. None.
  1443. </errors>
  1444. <seealso>
  1445. <link id="GetPalette"/>
  1446. </seealso>
  1447. </element>
  1448. <element name="SetAspectRatio">
  1449. <short>Set aspect ration of the screen</short>
  1450. <descr>
  1451. Sets the aspect ratio of the
  1452. current screen to <var>Xasp/Yasp</var>.
  1453. </descr>
  1454. <errors>
  1455. None
  1456. </errors>
  1457. <seealso>
  1458. <link id="InitGraph"/>
  1459. <link id="GetAspectRatio"/>
  1460. </seealso>
  1461. </element>
  1462. <element name="SetBkColor">
  1463. <short>Set background drawing color</short>
  1464. <descr>
  1465. Sets the background color to <var>Color</var>.
  1466. </descr>
  1467. <errors>
  1468. None.
  1469. </errors>
  1470. <seealso>
  1471. <link id="GetBkColor"/>
  1472. <link id="SetColor"/>
  1473. <link id="SetWriteMode"/>
  1474. </seealso>
  1475. </element>
  1476. <element name="SetColor">
  1477. <short>Set foreground drawing color</short>
  1478. <descr>
  1479. Sets the foreground color to <var>Color</var>.
  1480. </descr>
  1481. <errors>
  1482. None.
  1483. </errors>
  1484. <seealso>
  1485. <link id="GetColor"/>
  1486. <link id="SetBkColor"/>
  1487. <link id="SetWriteMode"/>
  1488. </seealso>
  1489. </element>
  1490. <element name="SetFillPattern">
  1491. <short>Set drawing fill pattern</short>
  1492. <descr>
  1493. <var>SetFillPattern</var> sets the current fill-pattern to <var>FillPattern</var>, and
  1494. the filling color to <var>Color</var>
  1495. The pattern is an 8x8 raster, corresponding to the 64 bits in
  1496. <var>FillPattern</var>.
  1497. </descr>
  1498. <errors>
  1499. None
  1500. </errors>
  1501. <seealso>
  1502. <link id="GetFillPattern"/>
  1503. <link id="SetFillStyle"/>
  1504. <link id="SetWriteMode"/>
  1505. </seealso>
  1506. </element>
  1507. <element name="SetFillStyle">
  1508. <short>Set drawing fill style</short>
  1509. <p>
  1510. <descr>
  1511. <var>SetFillStyle</var> sets the filling pattern and color to one of the
  1512. predefined filling patterns. <var>Pattern</var> can be one of the following predefined
  1513. constants :
  1514. </p>
  1515. <dl>
  1516. <dt>EmptyFill</dt><dd>Uses backgroundcolor.</dd>
  1517. <dt>SolidFill</dt> Uses filling color</dd>
  1518. <dt>LineFill</dt><dd> Fills with horizontal lines.</dd>
  1519. <dt>ltSlashFill</dt><dd> Fills with lines from left-under to top-right.</dd>
  1520. <dt>SlashFill</dt><dd> Idem as previous, thick lines.</dd>
  1521. <dt>BkSlashFill</dt><dd> Fills with thick lines from left-Top to bottom-right.</dd>
  1522. <dt>LtBkSlashFill</dt><dd> Idem as previous, normal lines.</dd>
  1523. <dt>HatchFill</dt><dd> Fills with a hatch-like pattern.</dd>
  1524. <dt>XHatchFill</dt><dd> Fills with a hatch pattern, rotated 45 degrees.</dd>
  1525. <dt>InterLeaveFill</dt><dd> </dd>
  1526. <dt>WideDotFill</dt><dd> Fills with dots, wide spacing.</dd>
  1527. <dt>CloseDotFill</dt><dd> Fills with dots, narrow spacing.</dd>
  1528. <dt>UserFill</dt><dd> Fills with a user-defined pattern.</dd>
  1529. </dl>
  1530. </descr>
  1531. <errors>
  1532. None.
  1533. </errors>
  1534. <seealso>
  1535. <link id="SetFillPattern"/>
  1536. <link id="SetWriteMode"/>
  1537. </seealso>
  1538. </element>
  1539. <element name="SetGraphBufSize">
  1540. <short>Set the graphical buffer size (do not use)</short>
  1541. <descr>
  1542. <var>SetGraphBufSize</var> is a dummy function which does not do
  1543. anything; it is no longer needed.
  1544. </descr>
  1545. <errors>
  1546. None.
  1547. </errors>
  1548. <seealso>
  1549. </seealso>
  1550. </element>
  1551. <element name="SetGraphMode">
  1552. <short>Set graphical mode</short>
  1553. <descr>
  1554. <var>SetGraphMode</var> sets the graphical mode and clears the screen.
  1555. </descr>
  1556. <errors>
  1557. None.
  1558. </errors>
  1559. <seealso>
  1560. <link id="InitGraph"/>
  1561. </seealso>
  1562. </element>
  1563. <element name="SetLineStyle">
  1564. <short>Set line drawing style</short>
  1565. <descr>
  1566. <p>
  1567. <var>SetLineStyle</var>
  1568. sets the drawing style for lines. You can specify a <var>LineStyle</var> which is
  1569. one of the following pre-defined constants:
  1570. </p>
  1571. <dl>
  1572. <dt>Solidln</dt><dd> draws a solid line.</dd>
  1573. <dt>Dottedln</dt><dd> Draws a dotted line.</dd>
  1574. <dt>Centerln</dt><dd> draws a non-broken centered line.</dd>
  1575. <dt>Dashedln</dt><dd> draws a dashed line.</dd>
  1576. <dt>UserBitln</dt><dd> Draws a User-defined bit pattern.</dd>
  1577. </dl>
  1578. <p>
  1579. If <var>UserBitln</var> is specified then <var>Pattern</var> contains the bit pattern.
  1580. In all another cases, <var>Pattern</var> is ignored. The parameter <var>Width</var>
  1581. indicates how thick the line should be. You can specify one of the following
  1582. pre-defined constants:
  1583. </p>
  1584. <dl>
  1585. <dt>NormWidth</dt><dd>Normal line width</dd>
  1586. <dt>ThickWidth</dt><dd>Double line width</dd>
  1587. </dl>
  1588. </descr>
  1589. <errors>
  1590. None.
  1591. </errors>
  1592. <seealso>
  1593. <link id="GetLineSettings"/>
  1594. <link id="SetWriteMode"/>
  1595. </seealso>
  1596. </element>
  1597. <element name="SetPalette">
  1598. <short>Set palette entry using color constant</short>
  1599. <descr>
  1600. <var>SetPalette</var> changes the <var>ColorNr</var>-th entry in the palette to
  1601. <var>NewColor</var>
  1602. </descr>
  1603. <errors>
  1604. None.
  1605. </errors>
  1606. <seealso>
  1607. <link id="SetAllPallette"/>
  1608. <link id="SetRGBPalette"/>
  1609. </seealso>
  1610. </element>
  1611. <element name="SetRGBPalette">
  1612. <short>Set palette entry using RGB value</short>
  1613. <descr>
  1614. <var>SetRGBPalette</var> sets the <var>ColorNr</var>-th entry in the palette to the
  1615. color with RGB-values <var>Red, Green Blue</var>.
  1616. </descr>
  1617. <errors>
  1618. None.
  1619. </errors>
  1620. <seealso>
  1621. <link id="SetAllPallette"/>,
  1622. <link id="SetPalette"/>
  1623. </seealso>
  1624. </element>
  1625. <element name="SetTextJustify">
  1626. <short>Set text placement style</short>
  1627. <descr>
  1628. <p>
  1629. <var>SetTextJustify</var> controls the placement of new text, relative to the
  1630. (graphical) cursor position. <var>Horizontal</var> controls horizontal placement, and can be
  1631. one of the following pre-defined constants:
  1632. </p>
  1633. <dl>
  1634. <dt>LeftText</dt><dd>Text is set left of the pointer.</dd>
  1635. <dt>CenterText</dt><dd>Text is set centered horizontally on the pointer.</dd>
  1636. <dt>RightText</dt><dd>Text is set to the right of the pointer.</dd>
  1637. </dl>
  1638. <p>
  1639. <var>Vertical</var> controls the vertical placement of the text, relative to the
  1640. (graphical) cursor position. Its value can be one of the following
  1641. pre-defined constants :
  1642. </p>
  1643. <dl>
  1644. <dt>BottomText</dt><dd>Text is placed under the pointer.</dd>
  1645. <dt>CenterText</dt><dd>Text is placed centered vertically on the pointer.</dd>
  1646. <dt>TopText</dt><dd>Text is placed above the pointer.</dd>
  1647. </dl>
  1648. </descr>
  1649. <errors>
  1650. None.
  1651. </errors>
  1652. <seealso>
  1653. <link id="OutText"/>
  1654. <link id="OutTextXY"/>
  1655. </seealso>
  1656. </element>
  1657. <element name="SetTextStyle">
  1658. <short>Set text style</short>
  1659. <descr>
  1660. <p>
  1661. <var>SetTextStyle</var> controls the style of text to be put on the screen.
  1662. pre-defined constants for <var>Font</var> are:
  1663. </p>
  1664. <dl>
  1665. <dt>DefaultFont</dt><dd>The default font</dd>
  1666. <dt>TriplexFont</dt><dd>A special font</dd>
  1667. <dt>SmallFont</dt><dd>A smaller font</dd>
  1668. <dt>SansSerifFont</dt><dd>A sans-serif font (like Arial)</dd>
  1669. <dt>GothicFont</dt><dd>A gothic font</dd>
  1670. <dt>ScriptFont</dt><dd>A script font</dd>
  1671. <dt>SimpleFont</dt><dd>A simple font</dd>
  1672. <dt>TSCRFont</dt><dd>Terminal screen font</dd>
  1673. <dt>LCOMFont</dt><dd>?</dd>
  1674. <dt>EuroFont</dt><dd>?</dd>
  1675. <dt>BoldFont</dt><dd>A bold typeface font</dd>
  1676. </dl>
  1677. <p>
  1678. Pre-defined constants for <var>Direction</var> are :
  1679. </p>
  1680. <dl>
  1681. <dt>HorizDir</dt><dd>Write horizontal</dd>
  1682. <dt>VertDir</dt><dd>Write vertical</dd>
  1683. </dl>
  1684. </descr>
  1685. <errors>
  1686. None.
  1687. </errors>
  1688. <seealso>
  1689. <link id="GetTextSettings"/>
  1690. </seealso>
  1691. </element>
  1692. <element name="SetUserCharSize">
  1693. <short>Set user character size for vector font</short>
  1694. <descr>
  1695. Sets the width and height of vector-fonts. The horizontal size is given
  1696. by <var>Xasp1/Xasp2</var>, and the vertical size by <var>Yasp1/Yasp2</var>.
  1697. </descr>
  1698. <errors>
  1699. None.
  1700. </errors>
  1701. <seealso>
  1702. <link id="SetTextStyle"/>
  1703. </seealso>
  1704. </element>
  1705. <element name="SetViewPort">
  1706. <short>Set the graphical drawing window</short>
  1707. <descr>
  1708. Sets the current graphical viewport (window) to the rectangle defined by
  1709. the top-left corner <var>(X1,Y1)</var> and the bottom-right corner <var>(X2,Y2)</var>.
  1710. If <var>Clip</var> is true, anything drawn outside the viewport (window) will be
  1711. clipped (i.e. not drawn). Coordinates specified after this call are relative
  1712. to the top-left corner of the viewport.
  1713. </descr>
  1714. <errors>
  1715. None.
  1716. </errors>
  1717. <seealso>
  1718. <link id="GetViewSettings"/>
  1719. </seealso>
  1720. </element>
  1721. <element name="SetVisualPage">
  1722. <short>Set video page which is displayed.</short>
  1723. <descr>
  1724. <var>SetVisualPage</var> sets the video page to page number <var>Page</var>.
  1725. </descr>
  1726. <errors>
  1727. None
  1728. </errors>
  1729. <seealso>
  1730. <link id="SetActivePage"/>
  1731. </seealso>
  1732. </element>
  1733. <element name="SetWriteMode">
  1734. <short>Specify binary operation to perform when drawing on screen</short>
  1735. <descr>
  1736. <p>
  1737. <var>SetWriteMode</var> controls the drawing of lines on the screen. It controls
  1738. the binary operation used when drawing lines on the screen. <var>Mode</var> can
  1739. be one of the following pre-defined constants:
  1740. </p>
  1741. <dl>
  1742. <dt>CopyPut</dt><dd>Draw as specified using current bitmask and color</dd>
  1743. <dt>XORPut</dt><dd>Draw XOR-ing current bitmask and color</dd>
  1744. </dl>
  1745. </descr>
  1746. <errors>
  1747. None.
  1748. </errors>
  1749. <seealso>
  1750. <link id="SetColor"/>
  1751. <link id="SetBkColor"/>
  1752. <link id="SetLineStyle"/>
  1753. <link id="SetFillStyle"/>
  1754. </seealso>
  1755. </element>
  1756. <element name="TextHeight">
  1757. <short>Return height (in pixels) of the given string</short>
  1758. <descr>
  1759. <var>TextHeight</var> returns the height (in pixels) of the string <var>S</var> in
  1760. the current font and text-size.
  1761. </descr>
  1762. <errors>
  1763. None.
  1764. </errors>
  1765. <seealso>
  1766. <link id="TextWidth"/>
  1767. </seealso>
  1768. </element>
  1769. <element name="TextWidth">
  1770. <short>Return width (in pixels) of the given string</short>
  1771. <descr>
  1772. <var>TextHeight</var> returns the width (in pixels) of the string <var>S</var> in
  1773. the current font and text-size.
  1774. </descr>
  1775. <errors>
  1776. None.
  1777. </errors>
  1778. <seealso>
  1779. <link id="TextHeight"/>
  1780. </seealso>
  1781. </element>
  1782. </module>
  1783. </package>
  1784. </fpdoc-descriptions>