home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / graphx11 / graphx11.doc < prev    next >
Text File  |  1993-10-23  |  80KB  |  1,747 lines

  1. 066030303030000132006006006006000
  2. 1Graphics Library v1.0Turbo C v2.0 Compatible0
  3. 2Copyright (c) 1992Page #0
  4. F0110030001
  5. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....]0110
  6. Ç
  7.  
  8.  
  9.  
  10.  
  11. GraphicsLibraryv1.1
  12. =====================
  13.  
  14.  
  15. for
  16.  
  17.  
  18. LatticeCv5.06,SozobonCv2.0and
  19. Heat&ServeSozobonCv1.33i
  20.  
  21.  
  22. ü**FREEWARE**
  23. Ç
  24.  
  25. Copyright(c)1992
  26.  
  27.  
  28. by
  29.  
  30. KennethW.Hartlen
  31.  
  32. Box37,Site6,RR#3,Armdale,NovaScotia
  33. B3L4J3Canada
  34.  
  35.  
  36. Internetaddress:hartlenk@newton.ccs.tuns.ca
  37.  
  38.  
  39.  
  40.  
  41.  
  42. August6,1992
  43.  
  44.  
  45.  
  46.  
  47.  
  48. TurboCv2.0isaregisteredtrademarkofBorlandInternational,
  49. Inc.Copyright(c)1988.
  50.  
  51. LatticeCv5.06isatrademarkorregisteredtrademarkofHiSoft
  52. andLattice,Inc.Copyright(c)1990-91.
  53.  
  54. SozobonCversionmadepossiblewiththeuseof:
  55.  
  56.      IanLepore's .......GEMFASTVDI&AESLibrary
  57.  
  58.      DavidW.Brooks'...FloatingPointLibraryforSozobonC
  59.  
  60. Ç__________________________________________________________________
  61.  
  62. üPurpose
  63. Ç__________________________________________________________________
  64.  
  65.      DoyouhaveanyTurboCcodethatyou'dliketorunonyour
  66. ST/STe/TT,butitusesthegraphicslibrary?Wouldyouliketobe
  67. abletodisplaygraphicswithoutexploringGEM'sVDIfunctions?If
  68. yousaid"Yes!!!"toeitherofthesequestions,thenmygraphics
  69. libraryisforyou.
  70.  
  71.      ThisisagraphicslibraryforLatticeCv5.06,SozobonC
  72. v2.0andIanLepore'sHeat&ServeSozobonCcompilersthat
  73. providesgraphicfunctionswithouthavingtodelveintotheVDI
  74. functionsofGEM.Ratherthancomeupwithmyowngraphicfunction
  75. names,IusedthesamenamesasinTurboCv2.0andprovidedthe
  76. samefunctionality.ThiswaytheCcodeyouwriteonyour
  77. ST/STe/TTcanbeeasilyportedtothePCandcompiledwithTurboC
  78. withlittleornomodification.Andofcourse,portingTurboC
  79. codetoyourST/STe/TTwillbemucheasier.
  80.  
  81.      Althoughthelibraryisnot100%compatiblewithTurboC's
  82. library,itstillprovidesavaluablestartingpointinthetask
  83. ofportinggraphicintensiveTurboCcodebetweentheST/STe/TT
  84. andPC.Ofthe93graphicsfunctionsinTurboCv2.0,notallhave
  85. beenimplemented.Functionsnotimplementedarestilldocumented
  86. andhaveanbriefexplanationofwhyitisnotprovided.
  87.  
  88.      Ifthelibrarydoesn'tprovideallthefunctionalitydesired
  89. itisbecauseIdidn'tthinkitwasawidelyusedfunctionorit
  90. wasnotapplicabletotheSTorIdidn'thavethetechnical
  91. informationtoimplementit.Feelfreetosendanycommentsor
  92. suggestionsyouhaveforimprovingthelibrary.Mymailingaddress
  93. ande-mailaddressareonthetitlepage.I'mnotsurehowlong
  94. I'llhavetheInternetaddress,butitwon'thurttotryInternet.
  95.  
  96. __________________________________________________________________
  97.  
  98. üFREEWARENotice
  99. Ç__________________________________________________________________
  100.  
  101.      Ihadoriginallystartedbuildingthegraphicslibraryformy
  102. ownusesinceIhadalotofTurboCcodearoundthatwouldbe
  103. usefulonmyMEGAST2.SoIcreatedthislibrarytohelpportthe
  104. sourcecodetomyMEGAST2.Ifoundthegraphicslibrarysouseful
  105. thatIthoughtotherswouldbeinterestedanddecidedtorefine
  106. thelibraryandincludesomedetaileddocumentation.
  107.  
  108.      GraphicsLibraryv1.1isprovideasëFREEWAREÇ!!Youshouldnot
  109. havepaidmoney,withtheexceptionofmediacost,forthis
  110. graphicslibrary.
  111.  
  112.      GraphicsLibraryv1.1canbedistributedandusedëfreeof
  113. chargeÇandmayüNOTÇbesold,orusedin,ordistributedwith,a
  114. Çcommercialproductwithoutpriorwrittenconsentfromme.
  115.  
  116. __________________________________________________________________
  117.  
  118. üDisclaimer
  119. Ç__________________________________________________________________
  120.  
  121.      AlthoughI'vetestedthelibraryonmyexistingTurboCcode
  122. andwrittennumeroustestcasesthatexercisedallthefunctions,I
  123. can'tguaranteethatthisgraphicslibraryisbugfree.Therefore:
  124.  
  125.      GraphicsLibraryv1.1isprovidedüASISÇ.Imakeno
  126. warranties,eitherexpressedorimplied,withrespecttothe
  127. software,documentation,itslevelofcompatibility,quality,
  128. performance,orfitness.Iwillnotbeliablefordirect,
  129. indirect,orconsequentialdamagesresultingfromanydefectsin
  130. ormisuseofthesoftware.
  131.  
  132.      Havingsaidthat,IhopeyoufindGraphicsLibraryv1.1as
  133. usefulasIdo.
  134.  
  135. __________________________________________________________________
  136.  
  137. üManifest
  138. Ç__________________________________________________________________
  139.  
  140.      Thearchivefileügraphx11.zooÇcontainsseveralfilesin
  141. directoriesasfollows:
  142.  
  143. übgidemo\  
  144.           bgidemo.prgÇTurboC'sBGIdemoprogramcompiledwith
  145. LatticeCv5.0andGraphicsLibraryv1.1.
  146. Itcanberuninallresolutions.
  147.  
  148. üdemos\
  149. Çü         lines.cÇasmalldemoprogramthatproducesaQix
  150. likeobjectonthescreen.Thisfilecan
  151. becompiledbyLattice,SozobonandTurbo
  152. C.
  153. ü
  154.           sort.cÇasmalldemoprogramthatsortsalistof
  155. randomnumberusingshell,insertion,
  156. selectionandquicksortmethods.The
  157. processofsortingisshowngraphically.
  158. ThisfilecanbecompiledbyLattice,
  159. SozobonandTurboC.
  160.  
  161. üdocs\Ç
  162.           ügraphx11.docÇa1ÉSTÇWordPlusdocumentfilecontaining
  163. thegraphicslibrarymanual.
  164.  
  165.      ü     graphx11.txtÇapureASCIIversionoftheabove.This
  166. isprovidedsothemanualcanbeprinted
  167. withyourfavouritehardcopyutility.
  168. Ç
  169. ülc_lib\Ç
  170.           ügraphics.libÇtheLatticeCobjectmodulelibraryfile,
  171. builtwithLattice'süoml.ttpÇ,thatmust
  172. belinkedwithyourobjectfiles.
  173.  
  174.           ügraphics.hdrÇacompressedgraphicsheaderfileusedby
  175. LatticeCandcreatedusingLattice's
  176. ülcompact.ttpÇutilityprovidedwith
  177. LatticeC.
  178.  
  179.           ügraphics.hlcÇthegraphicslibraryheaderfileusedby
  180. LatticeCinpureASCII.
  181.  
  182. üsoz_lib\  Ç
  183.           ügraphics.aÇtheHeat&ServeSozobonCv1.33iand
  184. SozobonCv2.0objectmodulelibrary
  185. file,builtwithüar.ttpÇ,thatmustbe
  186. linkedwithyourobjectfiles.
  187.  
  188.           ügraphics.hszÇthegraphicslibraryheaderfileusedby
  189. SozobonCandHeat&ServeSozobonC.
  190.  
  191. üextras\Ç
  192.           ügemfst17.lzhÇSozobonCv2.0userswillhavetoinstall
  193. IanLepore'sGEMFASTVDI&AESlibraries
  194. beforemygraphicslibrarycanbeused.
  195. IfusingHeat&ServeSozobonCv1.33i
  196. youalreadyhavethislibrary.
  197.  
  198.           üfplib10b.arcÇSozobonCv2.0userswillhavetoinstall
  199. DavidW.Brooks'replacementfloating
  200. pointlibrarybeforemygraphicslibrary
  201. canbeused.IfusingHeat&Serve
  202. SozobonCv1.33iyoudon'tneedthis
  203. libray.
  204.  
  205.  
  206.      Ifanyofthesefilesaremissing,theoriginalügraphx11.zooÇ
  207. filehasbeentamperedwith.Pleaselocateacompleteügraphx11.zooÇ
  208. file.Ifyougiveacopytosomeoneelse,pleasedistributethe
  209. completearchiveandnotbitsandpieces.Thanks.
  210.  
  211. __________________________________________________________________
  212.  
  213. üInstallation
  214. Ç__________________________________________________________________
  215.  
  216.      Theinstallationprocedureisreallyquitesimple.There
  217. are twowaysthatthegraphicslibrarycanbeutilizedbyyourC
  218. compiler.Youcanplacethefilesintheappropriatedirectories
  219. usedbyCyourcompilerorsimplycopythemtoyourworking
  220. directorywhereyourCsourcecoderesides.Personally,Iprefer
  221. thefilestobeinthecompiler'sdirectoriessoyoudon'thaveto
  222. Çcopythefilesallovertheplacebeforeusingit.
  223.  
  224.  
  225.      InstallationforLatticeCv5.06
  226.  
  227.      Fromülc_lib\Çofügraphx11.zooÇ
  228.      1)   copyügraphics.libÇ   to   \lc\lib\graphics.lib
  229.      2)   copyügraphics.hlcÇ   to   \lc\headers\graphics.h
  230.      3)   copyügraphics.hdrÇ   to   \lc\h\graphics.h
  231.  
  232.  
  233.      InstallationforSozobonCv2.0
  234.  
  235.      Fromüsoz_lib\Çofügraphx11.zooÇ
  236.      1)   copyügraphics.aÇ   to   \sozo_20\lib\graphics.a
  237.      2)   copyügraphics.hszÇ   to   \sozo_20\include\graphics.h
  238.      3)InstalltheGEMFASTlibrariesasoutlinedintheGEMFAST
  239. documentation.
  240.      4)Installthereplacementfloatingpointlibrariesas
  241. outlinedinthedocumentation.
  242.  
  243.  
  244.      InstallationforHeat&ServeSozobonCv1.33i
  245.  
  246.      Fromüsoz_lib\Çofügraphx11.zooÇ
  247.      1)   copyügraphics.aÇ   üÇto   \sozo_133i\lib\graphics.a
  248.      2)   copyügraphics.hszÇ   to   \sozo_133i\include\graphics.h
  249.  
  250.      Pleaseensurethatthecorrectobjectfileiscopiedintothe
  251. \libdirectorybecausetheyarenotinterchangeable.The
  252. ügraphics.libÇfileisaLatticeCspecificobjectmodulelibrary
  253. fileandtheügraphics.aÇfileisaDRIobjectmodulelibraryfile
  254. usedbySozobonC.
  255.  
  256. __________________________________________________________________
  257.  
  258. üUsingtheGraphicsLibrary
  259. Ç__________________________________________________________________
  260.  
  261.      Tousethegraphicslibrary,allonemustdoisplacethe
  262. appropriateü#includeÇstatementinyourCcodesourcecodethat
  263. willusegraphicfunctions.Ifyouhaveinstalledthegraphics
  264. libraryintheCcompiler'sdirectoriesthensimplyinsertthe
  265. ü#include<graphics.h>Çstatementinyoursourcefile.
  266.  
  267.      Ifhowever,youdecidednottoinstallthegraphicslibrary
  268. inthecompiler'sdirectories,thenuseü#include"graphics.h"Ç
  269. (notethedoublequotes).Thiscausesthepreprocessortolookin
  270. thecurrentdirectoryfortheheaderfile.Ifnotfound,the
  271. compiler'sdirectory(\lc\hor\sozobon\include)issearched.
  272.  
  273.      êSozobonCuserspleasenote:ÇDuetoaproblemIencountered
  274. whencreatingthelibraryforSozobonC,youwillalsohavetoadd
  275. aü#defineÇtoyoursourcefile.ü#define__MAIN_SRC__Çmustbeplaced
  276. Çinthesourcefile,beforeü#include<graphics.h>Ç,thatcontains
  277. theümain()Çfunction.Thisisnecessarysothatthefourfunctions
  278. intheheaderfilearecompiledwithyoursourcecode.Forsome
  279. strangereasonthesefunctionscauseasystemcrashincludedin
  280. ügraphics.aÇ.Itriedseveralwaystoovercomethisproblemandthis
  281. isthesolutionIcameupwith.Itseemsabitmessy,butitworks
  282. fine.I'lltrytofindasolutiontothisproblem.
  283.  
  284.      êLatticeCuserspleasenote:ÇThegraphics.hfiledefines
  285. enumeratedtypesthatcontainduplicatevalues.LatticeC
  286. generateswarning#79whenduplicatevaluesareencounteredin
  287. enumeratedtypes.Toeliminatethesemessagessimplyincludethe
  288. argument-j79iwhenusinglc.ttp,asshownbelow,oraddittothe
  289. LC_OPTenvironmentvariable.
  290.  
  291.      Onceyoursourcecodehasbeencompiledintoobjectfiles,
  292. thegraphicslibrarymustbelinkedwithyourobjectfilesas
  293. follows:
  294.  
  295.      CompilingandlinkingwithLatticeC
  296.  
  297.      1)lc.ttp-fm-j79imyprog.c
  298.      2)clinkc.o+myprog.o
  299.                LIBgraphics.lib+lcm.lib+lcg.lib+lc.lib
  300.                TOmyprog.prg
  301.      3)   runmyprog.prg
  302.  
  303.  
  304.      CompilingandlinkingwithSozobonCv2.0
  305.  
  306.      1)cc-omyprog.prg-rmyprog.cgraphics.avdifast.a
  307.                aesfast.a
  308.      2)   runmyprog.prg
  309.  
  310.  
  311.      CompilingandlinkingwithHeat&ServerSozobonCv1.33i
  312.  
  313.      1)cc-omyprog.prgmyprog.cgraphics.alibm.avdifast.a
  314.                aesfast.a
  315.      2)   runmyprog.prg
  316.  
  317.  
  318.      IfyoudecidetoüfreelyÇdistributeaprogramofyoursthat
  319. wascreatedwiththehelpofthislibraryhowaboutmentioning
  320. KennethW.Hartlen,IanLeporeandDavidW.Brooksinthecredits.
  321. Wearen'treceivinganymoneyforoureffortssoitwouldbenice
  322. toatleastseeournamesinlights!Thanks.
  323.  
  324.     ü**WARNING!!**ÇIfprogramsareabortedbeforeüclosegraph()Ç
  325. iscalledunpredicableresultswilloccurwhenyoutriedtorun
  326. anotherprogram.Makesurethataüclosegraph()Çisperformedbefore
  327. theprogramendsotherwiseyoushouldre-bootyoursystem.
  328.  
  329. __________________________________________________________________
  330. Ç
  331. üFutureEnhancements
  332. Ç__________________________________________________________________
  333.  
  334.      Atthemomentthisgraphicslibrarysuitsmyneedsquite
  335. well.IwasabletocompileandrunallmyTurboCv2.0graphics
  336. code,writtenwhileinuniversity,onmyMEGAST2!Theonlyreal
  337. deviationfromTurboCisthefontcapabilitywiththe
  338. üinstalluserfontÇfunction.Thisgraphicslibrarysimplyuses
  339. variationsofthesystemfontusingüsettextstyleÇratherthan
  340. loadingdifferenttypefaces.Ihadconsideredallowingtheuseof
  341. GDOS,butI'munsureifitisreallynecessaryanditwouldlimit
  342. theuseofthelibrary.
  343.  
  344.      Ifyou'dliketoseesomethingadded,orchanged,toenhance
  345. compatiblitywithTurboC'sgraphicslibraryjustletmeknow.
  346.  
  347. __________________________________________________________________
  348.  
  349. üWhat'sChanged?
  350. Ç__________________________________________________________________
  351.  
  352. July      16/92
  353. Version1.0:UnleashedGraphicsLibraryonthemasses.
  354.  
  355. August    6/92
  356. Version 1.1:ü#defineÇswereaddedtoügraphics.hszÇtoprevent
  357. 'doubledefine'duringlinking.Thisproblemwas
  358. encounteredwhenM.A.Rahinattemptedtousethe
  359. librarywithHeat&ServeSozobonCv1.33i.Turbo
  360. C'sgraphicfunctionshaveverylongnamesandwhen
  361. truncatedto8characterscausedsomeduplicate
  362. functionnames.Forexample,üsettextjustifyÇand
  363. üsettextstyleÇtruncatedtoü_settextÇ.Someinternal
  364. variableswerealsorenamedtoavoidthe'double
  365. define'.
  366.  
  367. __________________________________________________________________
  368.  
  369. üTheGraphicFunctions
  370. Ç__________________________________________________________________
  371.  
  372.      Asmentionedearlier,thegraphicslibraryisTurboCv2.0
  373. compatible,butnot100%compatibleandsomeminorvariations
  374. exist.
  375.  
  376.      êAside:ÇForthosefamiliarwithTurboC,IhadtheBGIDEMO.C
  377. filecompiledandrunningwithLatticeCinlessthananhour!
  378. Onlyminormodificationsusingü#ifdefÇswereneededtothe45K
  379. sourcefilesoitcouldbecompiledinLatticeorTurboC!
  380.  
  381.      Whatfollowsisacompletedescriptionofeachgraphic
  382. functionavailableinthelibrary.Functionsnotimplementedwill
  383. stillhaveabriefdescriptionandareasonwhyitwasnot
  384. Çimplemented.Ifyoudon'tagreewithmyreasoning,letmeknowwhy
  385. andI'llseewhatIcandoaboutimplementingitinafuture
  386. release.
  387.  
  388. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....]0110
  389. __________________________________________________________________
  390.  
  391. üarcÇ            Draws a circular arc
  392. __________________________________________________________________
  393. üSyntaxÇ         voidfar arc(int äxÇ,int äyÇ,int ästangleÇ,int äendangleÇ,
  394.                             int äradiusÇ);
  395.  
  396. üPurposearcÇdrawsanarcat(äxÇ,äyÇ)withthegivenäradiusÇ.
  397. ThearcisdrawnfromästangleÇtoäendangleÇ.If
  398. ästangleÇequalsäendangleÇacompletecircleisdrawn.
  399.  
  400. ästangleÇandäendangleÇareanglesmeasuredindegrees
  401. goingcounterclockwise,with0degreesbeingat3
  402. o'clock,90degreesat12o'clock,andsoon.The
  403. arcisdrawninthecurrentcolour,linestyleand
  404. thickness.
  405.  
  406. __________________________________________________________________
  407.  
  408. übarÇ            Draws a two-dimensional bar
  409. __________________________________________________________________
  410. üSyntaxÇ         void far bar(int äleftÇ, int ätopÇ, int ärightÇ,
  411.                           int äbottomÇ);
  412.  
  413. üPurposebarÇdrawsafilled-inrectangular,two-dimensional
  414. barusingthecurrentfillstyleandfillcolour.
  415. Thebarisnotoutlined,anoutlinedbarcanbe
  416. drawnusingtheübar3DÇfunctionswithaädepthÇof
  417. zero.
  418.  
  419. Theupperleftcornerisdefinedby(äleftÇ,ätopÇ)and
  420. thelowerrightcornerby(ärightÇ,äbottomÇ).
  421.  
  422. __________________________________________________________________
  423.  
  424. übar3dÇ          Draws a 3-D bar
  425. __________________________________________________________________
  426. üSyntaxÇ         void far bar3d(int äleftÇ, int ätopÇ, int ärightÇ,
  427.                               int äbottomÇ,int ädepthÇ, int ätopflagÇ);
  428.  
  429. üPurposeÇübar3dÇdrawsathree-dimensionalrectangularbar
  430. usingthecurrentfillstyleandfillcolour,then
  431. outlinesitwiththecurrentcolour,linestyleand
  432. thickness.The3DeffectisgovernedbyädepthÇand
  433. iftheätopflagÇisnonzero,the3Dbarwithbedrawn
  434. withatop.
  435.  
  436. Theupperleftcornerisdefinedby(äleftÇ,ätopÇ)and
  437. thelowerrightcornerby(ärightÇ,äbottomÇ).
  438.  
  439. Ç__________________________________________________________________
  440.  
  441. ücircleÇ         Draws a circle
  442. __________________________________________________________________
  443. üSyntaxÇ         void circle(int äxÇ, int äyÇ, int äradiusÇ);
  444.  
  445. üPurposecircleÇdrawsacircleusingthecurrentcolour,
  446. linestyleandthicknessat(äxÇ,äyÇ)witharadius
  447. givenbyäradiusÇ.Thecircledrawnwillbeatrue
  448. circleinanyresolution,unlikethePCwherethe
  449. aspectratiohastobeadjustedappropriately.
  450.  
  451. __________________________________________________________________
  452.  
  453. ücleardeviceÇ    Clears the graphics screen
  454. __________________________________________________________________
  455. üSyntaxÇ         void far cleardevice(void);
  456.  
  457. üPurposecleardeviceÇerasestheentiregraphicsscreenand
  458. setsthecurrentposition(CP)to(0,0).
  459.  
  460. __________________________________________________________________
  461.  
  462. üclearviewportÇ  Clears the current viewport
  463. __________________________________________________________________
  464. üSyntaxÇ         void far clearviewport(void);
  465.  
  466. üPurposeÇüclearviewportÇerasestheviewportandsetscurrent
  467. position(CP)to(0,0)relativetotheviewport.
  468.  
  469. __________________________________________________________________
  470.  
  471. üclosegraphÇ     Shuts down the graphics system
  472. __________________________________________________________________
  473. üSyntaxÇ         void far closegraph(void);
  474.  
  475. üPurposeclosegraphÇrestorestheoriginalcolourpalette,
  476. andclearsthescreen.
  477.  
  478. __________________________________________________________________
  479.  
  480. üdetectgraphÇ    Determinesgraphicsdriverandmodetouseby
  481.                checkingthehardware
  482. __________________________________________________________________
  483. üSyntaxÇ         void far detectgraph(int far *ägraphdriverÇ,
  484.                                     int far *ägraphmodeÇ);
  485.  
  486. üPurposedetectgraphÇreturnsthemonitortypeinägraphdriverÇ
  487. andthegraphicsmodeinägraphmodeÇwhichindicates
  488. thehighestresolutionpossible.Ifnographics
  489. hardwareisdetected,ä*graphdriverÇissetto
  490. ägrNotDetectedÇandügraphresultÇwillreturn
  491. ägrNotDetectedÇ.
  492.  
  493. Çä*graphdriverÇisanintegerthatindicatesthe
  494. drivertobeused.Youcanuseconstantsdefinedby
  495. theägraphics_driverÇenumerationtypeasshown
  496. below.               
  497.  
  498.                ägraphics_driver
  499. Ç               constant                 Numericvalue
  500.                --------------------------------------
  501.                DETECT                   0(autodetection)
  502.                ...                      ..(CGA,EGA,VGA,etc)
  503.                SC1224                   11
  504.                SM124                    12
  505.                TTC1432                  13
  506.                TTM194                   14
  507.                UNKNOWN_DRIVER           15
  508.  
  509. ä*graphmodeÇisanintegerthatindicatesthescreen
  510. modetobeused.Youcanuseconstantsdefinedby
  511. theägraphics_modeÇenumerationtypeasshownbelow.
  512.                
  513.  
  514.                ägraphics_mode
  515. Ç               constant                 Numericvalue
  516.                --------------------------------------
  517.                CGAC0                    0
  518.                ...                      ..(CGA,EGA,VGA,etc)
  519.                SC1224LO                  0
  520.                SC1224MED                 1
  521.                SM124HI                   0
  522.                TTC1434LO                0
  523.                TTC1434MED               1
  524.                TTM194HI                 1
  525.                UNKNOWN_MODE             0
  526.  
  527. __________________________________________________________________
  528.  
  529. üdrawpolyÇ       Draws the outline of a polygon
  530. __________________________________________________________________
  531. üSyntaxÇ         voidfar drawpoly(int änumpointsÇ,
  532.                                  int far ä*polypointsÇ);
  533.  
  534. üPurposeÇüdrawpolyÇdrawsapolygonhavingänumpointsÇpoints
  535. usingthecurrentcolour,linestyleandthickness.
  536.  
  537. äpolypointsÇseriesofänumpointsÇx2integers
  538. definingtheverticesforthepolygon.Eachpairof
  539. integersrepresentsan(x,y)coordinateofa
  540. vertex.Inordertodrawanenclosedpolygonhaving
  541. nverticesyoumustusepassn+1coordinates,
  542. wherethenÉthÇcoordinateequalsthe0ÉthÇ.
  543.  
  544. ügraphresultÇwillreturnägrNoScanMemÇifanerror
  545. occursdrawingthepolygon.
  546.  
  547. Ç__________________________________________________________________
  548.  
  549. üellipseÇ        Draws an elliptical arc
  550. __________________________________________________________________
  551. üSyntax         Çvoid far ellipse(int äxÇ, int äyÇ,
  552.                                int ästangleÇ, int äendangleÇ,
  553.                                 int äxradiusÇ, int äyradiusÇ);
  554.  
  555. üPurposeÇüellipseÇdrawsanellipticalarccenteredat(äxÇ,äyÇ)
  556. withahorizontalandverticalradiigivenby
  557. äxradiusÇandäyradiusÇusingthecurrentcolour,line
  558. styleandthickness.Theellipseisdrawnfrom
  559. ästangleÇtoäendangleÇ.IfästangleÇequalsäendangleÇa
  560. completeellipseisdrawn.
  561.  
  562. ästangleÇandäendangleÇareanglesmeasuredindegrees
  563. goingcounterclockwise,with0degreesbeingat3
  564. o'clock,90degreesat12o'clock,andsoon.
  565.  
  566. __________________________________________________________________
  567.  
  568. üfillellipseÇ    Draws and fills an ellipse
  569. __________________________________________________________________
  570. üSyntaxÇvoid far fillellipse(int äxÇ, int äyÇ,
  571.                                    int äxradiusÇ, int äyradiusÇ);
  572.  
  573. üPurposeÇüfillellipseÇdrawsanellipsecenteredat(äxÇ,äyÇ)with
  574. ahorizontalandverticalradiigivenbyäxradiusÇ
  575. andäyradiusÇ.Theellipseisfilledwiththecurrent
  576. fillstyleandcolour,thenoutlinedwiththe
  577. currentcolour,linestyleandthickness.
  578.  
  579. __________________________________________________________________
  580.  
  581. üfillpolyÇ       Draw and fill a polygon
  582. __________________________________________________________________
  583. üSyntaxÇ         void far fillpoly(int änumpointsÇ,
  584.                                  int far ä*polypointsÇ);
  585.  
  586. üPurposefillpolyÇdrawsapolygonhavingänumpointsÇpoints,
  587. fillsitwiththecurrentfillstyleandcolourand
  588. outlinesitusingthecurrentcolour,linestyle
  589. andthickness.
  590.  
  591. äpolypointsÇisseriesofänumpointsÇx2integers
  592. definingtheverticesforthepolygon.Eachpairof
  593. integersrepresentsan(x,y)coordinateofa
  594. vertex.UnlikeüdrawpolyÇ,onlynverticesareneeded
  595. andüfillpolyÇtakescareofcreatinganadditional
  596. vertextoclosethepolygon.
  597.  
  598. ügraphresultÇwillreturnägrNoScanMemÇifanerror
  599. occursdrawingthepolygon.
  600.  
  601. Ç__________________________________________________________________
  602.  
  603. üfloodfillÇ      Flood-fills a bounded region
  604. __________________________________________________________________
  605. üSyntaxÇ         void far floodfill(int äxÇ, int äyÇ, int äborderÇ);
  606.  
  607. üPurposefloodfillÇfillsaboundedregiononthescreen
  608. startingfrom(äxÇ,äyÇ).Theboundedregionisdefined
  609. bythecolourspecifiedbyäborderÇ.Theregionis
  610. filledwiththecurrentfillstyleandcolour.
  611.  
  612. __________________________________________________________________
  613.  
  614. ügetarccoordsÇ   Gets coordinates of the last call to arc
  615. __________________________________________________________________
  616. üSyntaxÇ         void far getarccoords(struct arccoordstype
  617.                                     far ä*arccoordsÇ);
  618.  
  619. üPurposegetarccoordsÇfillsintheüarccoordstypeÇstructure
  620. pointedtobyäarccoordsÇwiththeinformationabout
  621. thelastcalltoüarcÇ.üarccoordstypeÇisdefinedin
  622. graphics.handhasthefollowingstructure:
  623.  
  624.                     structarccoordstype{
  625.                          intx,y;
  626.                          intxstart,ystart,xend,yend;
  627.                     };
  628.  
  629. Thisinformationisespeciallyusefulifwanta
  630. linetomeetattheendofthearcortoconnect
  631. theendpointsofthearcwithastraightline.
  632.  
  633. __________________________________________________________________
  634.  
  635. ügetaspectratioÇ Retrieves the current graphic mode's aspect ratio
  636. __________________________________________________________________
  637. üSyntaxÇ         void far getaspectratio(int far ä*xaspÇ,
  638.                                        int far ä*yaspÇ);
  639.  
  640. üPurposegetaspectratioÇplacesthewidthofascreenpixel
  641. inäxaspÇandtheheightofascreenpixelinäyaspÇ.
  642. Usingthesevaluesyoucancalculatethescreen's
  643. aspectratiobyäxaspÇ/äyaspÇ.Theaspectratiocan
  644. thenbeusedtodrawtruesquaresinany
  645. resolution.
  646.  
  647. ägraphics_mode       xasp      yasp
  648. Ç----------------------------------
  649. SC1224LO            338       372
  650. SC1224MED           169       372
  651. SM124HI             372       372
  652.                TTC1434LO           ???       ???
  653.                TTC1434MED          ???       ???
  654.                TTM194HI            ???       ???
  655. Ç
  656. __________________________________________________________________
  657.  
  658. ügetbkcolorÇ     Returns the current background colour
  659. __________________________________________________________________
  660. üSyntaxÇ         int far getbkcolor(void);
  661.  
  662. üPurposegetbkcolorÇreturnsthecurrentbackgroundcolourof
  663. thescreen.(SeeüsetbkcolorÇformoreinformation.)
  664.  
  665. __________________________________________________________________
  666.  
  667. ügetcolorÇ       Returns the current drawing colour
  668. __________________________________________________________________
  669. üSyntaxÇ         int far getcolor(void);
  670.  
  671. üPurposegetcolorÇreturnthecurrentlinedrawingcolour.
  672.  
  673. __________________________________________________________________
  674.  
  675. ügetdefaultpalette
  676. ÇReturns the palette definition structure
  677. __________________________________________________________________
  678. üSyntaxÇ         struct palettetype *far getdefaultpalette(void);
  679.  
  680. üPurposegetdefaultpaletteÇreturnsapointertoüpalettetypeÇ
  681. structurethatcontainsthedefaultcolours.
  682.  
  683. __________________________________________________________________
  684.  
  685. ügetdrivernameÇReturnsapointertoastringcontainingthename
  686. ofthecurrentgraphicsdriver
  687. __________________________________________________________________
  688. üSyntaxÇ         char *far getdrivername(void);
  689.  
  690. üPurposegetdrivernameÇreturnsapointertoastringthat
  691. containsthenameofthegraphicsdriverbeing
  692. used.
  693.  
  694. __________________________________________________________________
  695.  
  696. ügetfillpatternÇCopies a user-defined fill pattern into memory
  697. __________________________________________________________________
  698. üSyntaxÇ         void far getfillpattern(charfar ä*patternÇ);
  699.  
  700. üPurposegetfillpatternÇcopiesthecurrentlyusedfill
  701. patternintomemorypointedtobyäpatternÇ.
  702.  
  703. äpatternÇpointstoasequenceof8byteswitheach
  704. bytedefiningthepatternforalineinthe
  705. pattern.A1bitindicateswhichpixelsaretobe
  706. drawn.
  707.  
  708.                byte#    charcontents       patterntodraw
  709. Ç               ---------------------------------------------
  710.                0             0xF0           11110000
  711.                1      0x8E           10001110
  712.                2             0xF4           11110100
  713.                3      0x14           00010100
  714.                4             0xF4           11110100
  715.                5      0x04           00000100
  716.                6             0x04           00000100
  717.                7      0x00           00000000
  718.  
  719. __________________________________________________________________
  720.  
  721. ügetfillsettings
  722. ÇGetsinformationaboutthecurrentfillpatternand
  723. colour
  724. __________________________________________________________________
  725. üSyntaxÇ         void far getfillsettings(struct fillsettingstype
  726.                                         far ä*fillinfoÇ);
  727.  
  728. üPurposegetfillsettingsÇfillsintheüfillsettingstypeÇ
  729. structurepointedtobyäfillinfoÇwiththe
  730. informationaboutthecurrentfillstyleand
  731. colour.üfillsettingstypeÇisdefinedingraphics.h
  732. andhasthefollowingstructure:
  733.  
  734.                     structfillsettingstype{
  735.                          intpattern;
  736.                          intcolor;
  737.                     };
  738.  
  739. Thereare39fillpatternsavailableforuse.Some
  740. arepredefinedintheenumeratedtypeäfill_patternsÇ
  741. andcorrespondascloselyaspossiblewithTurboC.
  742.  
  743.                äfill_patternsÇNumeric
  744.                constant        value 
  745.                --------------------------------------------------
  746.                EMPTY_FILL        0   fills with background colour
  747.                SOLID_FILL        1   fills with fill colour
  748.                LINE_FILL        2   --- fill
  749.                LTSLASH_FILL     3   /// fill
  750.                SLASH_FILL       4   /// fill with thick lines
  751.                BKSLASH_FILL     5   \\\ fill with thick lines
  752.                LTBKSLASH_FILL   6   \\\ fill
  753.                HATCH_FILL       7   light hatch fill
  754.                XHATCH_FILL      8   heavy cross hatch fill
  755.                INTERLEAVE_FILL   9   interleaving line fill
  756.                WIDE_DOT_FILL    10   widely spaced dot fill
  757.                CLOSE_DOT_FILL   11   closely spaced dot fill
  758.                USER_FILL        12   use user defined fill
  759.  
  760. __________________________________________________________________
  761.  
  762. ügetgraphmodeÇ   Returns the current graphics mode
  763. Ç__________________________________________________________________
  764. üSyntaxÇ         int fargetgraphmode(void);
  765.  
  766. üPurposegetgraphmodeÇreturnsthecurrentgraphicsmode.
  767. Namesforthevaluesaredefinedingraphics.hin
  768. theenumerationtypeägraph_modesÇ.
  769.  
  770. __________________________________________________________________
  771.  
  772. ügetimageÇSavesabitimageofthespecifiedregioninto
  773. memory
  774. __________________________________________________________________
  775. üSyntaxÇ         void far getimage(int äleftÇ, int ätopÇ,
  776.                                  int ärightÇ, int äbottomÇ,
  777.                                  void far ä*bitmapÇ);
  778.  
  779. üPurposegetimageÇsavesarectangularportionofthescreen,
  780. definedby(äleftÇ,ätopÇ)to(ärightÇ,äbottomÇ),tomemory
  781. pointedtobyäbitmapÇ.
  782.  
  783. Thisfunctionisparticularlyusefulincombination
  784. whichüputimageÇtoanimatesomethingonthescreen.
  785.  
  786. __________________________________________________________________
  787.  
  788. ügetlinesettings
  789. ÇGetsthecurrentlinestyle,patternandthickness
  790. __________________________________________________________________
  791. üSyntaxÇ         void far getlinesettings(struct linesettingstype
  792.                                         far ä*lineinfoÇ);
  793.  
  794. üPurposegetlinesettingsÇfillsintheülinesettingstypeÇ
  795. structurepointedtobyälineinfoÇwiththe
  796. informationaboutthecurrentlinestyle,user
  797. definedpatternandthickness.ülinesettingstypeÇis
  798. definedingraphics.handhasthefollowing
  799. structure:
  800.  
  801.                     structlinesettingstype{
  802.                          intlinestyle;
  803.                          unsignedupattern;
  804.                          intthickness;
  805.                     };
  806.  
  807. Thelinestylesnamesarepredefinedinthe
  808. enumeratedtypeäline_stylesÇandcorrespondas
  809. closelyaspossiblewithTurboC.
  810.  
  811.                äline_stylesÇ   Numeric
  812.                constant        value 
  813.                -----------------------
  814.                SOLID_LINE     0
  815.                DOTTED_LINE    1
  816.                CENTER_LINE    2
  817. Ç               DASHED_LINE    3
  818.                USERBIT_LINE   4
  819.  
  820. __________________________________________________________________
  821.  
  822. ügetmaxcolorÇReturnsmaximumcolourvaluethatcanbepassedto
  823. setcolor
  824. __________________________________________________________________
  825. üSyntaxÇ         int far getmaxcolor(void);
  826.  
  827. üPurposegetmaxcolorÇsimplyreturnsthehighestvalidpen
  828. numberthatcanbepassedtoüsetcolorÇ.
  829.  
  830. Thereturnedvaluesare:1forSM124HI,3for
  831. SC1224MEDand15forSC1224LO,255forTTC1434LO,
  832. 15forTTC1434MEDand2forTTM194HI.
  833.  
  834. __________________________________________________________________
  835.  
  836. ügetmaxmodeÇ     Returnsthemaximummodenumberforthecurrent
  837.                driver
  838. __________________________________________________________________
  839. üSyntaxÇ         int far getmaxmode(void);
  840.  
  841. üPurposegetmaxmodeÇreturnsthemaximummodenumberforthe
  842. currentdriver.
  843.  
  844. __________________________________________________________________
  845.  
  846. ügetmaxxÇ        Returns maximum x screen coordinate
  847. __________________________________________________________________
  848. üSyntaxÇ         int far getmaxx(void);
  849.  
  850. üPurposegetmaxxÇreturnsthemaximumxcoordinateforthe
  851. currentgraphicsmode.Forexample,theresolution
  852. forSM124HIis640x400soügetmaxxÇreturns639.
  853.  
  854. __________________________________________________________________
  855.  
  856. ügetmaxyÇ        Returns maximum y screen coordinate
  857. __________________________________________________________________
  858. üSyntaxÇ         int far getmaxy(void);
  859.  
  860. üPurposegetmaxyÇreturnsthemaximumycoordinateforthe
  861. currentgraphicsmode.Forexample,theresolution
  862. forSM124HIis640x400soügetmaxyÇreturns399.
  863.  
  864. __________________________________________________________________
  865.  
  866. ügetmodenameÇReturnsapointertoastringcontainingthename
  867. ofaspecifiedgraphicsmode
  868. __________________________________________________________________
  869. üSyntaxÇ         char *far getmodename(int ämode_numberÇ);
  870.  
  871. üPurposegetmodenameÇreturnsapointertoastringthat
  872. containsthename,specifiedbyämode_numberÇ,ofthe
  873. graphicsmodebeingused.
  874.  
  875. __________________________________________________________________
  876.  
  877. ügetmoderange   ÇGetstherangeofmodesforagivengraphicsdriver
  878. __________________________________________________________________
  879. üSyntaxÇ         void far getmoderange(int ägraphdriverÇ,
  880.                                    int far ä*lomodeÇ,
  881.                                    int far ä*himodeÇ);
  882.  
  883. üPurposegetmoderangeÇreturnstherangeofvalidmodesfor
  884. thespecifieddriver.IfägraphdriverÇisinvalid
  885. thenä*lomodeÇandä*himodeÇaresetto-1.If
  886. ägraphdriverÇis-1thenthecurrentmodeisreturned
  887. inä*lomodeÇandä*himodeÇ.
  888.  
  889. __________________________________________________________________
  890.  
  891. ügetpaletteÇ     Gets information about the current palette
  892. __________________________________________________________________
  893. üSyntaxÇ         void far getpalette(struct palettetype
  894.                                    far ü*paletteÇ);
  895.  
  896. üPurposegetpaletteÇfillsintheüpalettetypeÇstructure
  897. pointedtobyäpaletteÇwiththeinformationabout
  898. thecurrentcolourpalettebeingused.üpalettetypeÇ
  899. isdefinedingraphics.handhasthefollowing
  900. structure:
  901.  
  902.                    #defineMAXCOLORS15;
  903.  
  904.                     structpalettetype{
  905.                          unsignedsize;
  906.                          charcolors[MAXCOLORS+1];
  907.                     };
  908.  
  909.  
  910.  äsizeÇcontainsthenumberofentriesbeingusedin
  911. äcolorsÇ.EachentryinäcolorsÇstoresthecolorfor
  912. thatdrawingpen.
  913.  
  914. __________________________________________________________________
  915.  
  916. ügetpalettesizeÇ Returns size of palette colour lookup table
  917. __________________________________________________________________
  918. üSyntaxÇ         int far getpalettesize(void);
  919.  
  920. üPurposegetpalettesizeÇreturnsthenumberofpalette
  921. entriesforthecurrentgraphicsmode.
  922.  
  923. __________________________________________________________________
  924.  
  925. ügetpixelÇ       Gets the colour of a specified pixel
  926. __________________________________________________________________
  927. üSyntaxÇ         unsigned far getpixel(int äxÇ, int äyÇ);
  928.  
  929. üPurposegetpixelÇreturnsthepennumberthatwasusedto
  930. drawthepixelonthescreenatthe(äxÇ,äyÇ)
  931. coordinate.
  932.  
  933. __________________________________________________________________
  934.  
  935. ügettextsettings
  936.                ÇGetsinformationaboutthecurrentgraphicstext
  937.                font 
  938. __________________________________________________________________
  939. üSyntaxÇ         void far gettextsettings(struct textsettingstype
  940.                                         far ä*texttypeinfoÇ);
  941.  
  942. üPurposegettextinfoÇfillsintheütextsettingstypeÇstructure
  943. pointedtobyätexttypeinfoÇwiththeinformation
  944. aboutthecurrenttextfont,direction,size,
  945. effectsandjustification.ütextsettingstypeÇis
  946. definedingraphics.handhasthefollowing
  947. structure:
  948.  
  949.                     struct textsettingstype {
  950.                          int font;
  951.                          int direction;
  952.                          int charsize;
  953.                          int horiz;
  954.                          int vert;
  955.                     };
  956.  
  957. __________________________________________________________________
  958.  
  959. ügetviewportsettings
  960.                ÇGets information about the current viewport
  961. __________________________________________________________________
  962. üSyntaxÇ         void far getviewsettings(struct viewporttype
  963.                                         far ä*viewportÇ);
  964.  
  965. üPurposegetviewportsettingsÇfillsintheüviewporttypeÇ
  966. structurepointedtobyäviewportÇwiththe
  967. informationaboutthecurrentviewport.ü
  968. viewporttypeÇisdefinedingraphics.handhasthe
  969. followingstructure:
  970.  
  971.                     struct viewporttype {
  972.                          int left, top, right, bottom;
  973.                          int clip;
  974.                     };
  975.  
  976. __________________________________________________________________
  977.  
  978. ügetxÇ           Returnsthecurrentgraphicsposition'sx
  979. Ç               coordinate
  980. __________________________________________________________________
  981. üSyntax         Çint far getx(void);
  982.  
  983. üPurposegetxÇreturnsthecurrentposition's(CP)äxÇ
  984. coordinate.Thisvalueisviewportrelative.
  985.  
  986. __________________________________________________________________
  987.  
  988. ügetyÇ           Returnsthecurrentgraphicsposition'sy
  989.                coordinate
  990. __________________________________________________________________
  991. üSyntax         Çint far gety(void);
  992.  
  993. üPurposegetyÇreturnsthecurrentposition's(CP)äyÇ
  994. coordinate.Thisvalueisviewportrelative.
  995.  
  996. __________________________________________________________________
  997.  
  998. ügraphdefaultsÇ  Resets all graphics settings to their defaults
  999. __________________________________________________________________
  1000. üSyntaxÇ         void far graphdefaults(void);
  1001.  
  1002. üPurposegraphdefaultÇresetsallgraphicssettingsthe
  1003. appropriatedefaults:
  1004.  
  1005. setsdefaultpalettecoloursanddrawingcolour.
  1006.  
  1007. setsdefaultfillstyleandcolour.
  1008.  
  1009. setsdefaultlinestyle.
  1010.  
  1011. setsdefaulttextstyleandjustification.
  1012.  
  1013. setsviewporttoentirescreenwithclippingon.
  1014.  
  1015. __________________________________________________________________
  1016.  
  1017. ügrapherrormsgÇ  Returns a pointer to an error message string
  1018. __________________________________________________________________
  1019. üSyntaxÇ         char * far grapherrormsg(int äerrorcodeÇ);
  1020.  
  1021. üPurposegrapherrormsgÇreturnsapointertotheerror
  1022. messagetextassociatedwithäerrorcodeÇvalue
  1023. returnedbyügraphresultÇ.
  1024.  
  1025. __________________________________________________________________
  1026.  
  1027. ü_graphfreememÇ  User hook into graphics memory allocation
  1028. __________________________________________________________________
  1029. üSyntaxÇ         void far _graphfreemem(void far ä*ptrÇ,
  1030.                                     unsigned äsizeÇ);
  1031.  
  1032. üPurpose_graphfreememÇisamemorymanagementroutineused
  1033. ÇbyTurboCtofreeallocatedgraphicsmemoryand
  1034. hasnotbeimplementedontheST/STe/TT.Aftera
  1035. calltoü_graphfreememÇ,ügraphresultÇwillreturn
  1036. ägrNotImplementedÇ.
  1037.  
  1038. __________________________________________________________________
  1039.  
  1040. ü_graphgetmemÇ   User hook into graphics memory allocation
  1041. __________________________________________________________________
  1042. üSyntaxÇ         void far _graphgetmem(unsigned äsizeÇ);
  1043.  
  1044. üPurpose_graphgetmemÇisamemorymanagementroutineusedby
  1045. TurboCtoallocategraphicsmemoryandhasnotbe
  1046. implementedontheST/STe/TT.Afteracallto
  1047. ü_graphgetmemÇ,ügraphresultÇwillreturn
  1048. ägrNotImplementedÇ.
  1049.  
  1050. __________________________________________________________________
  1051.  
  1052. ügraphresultÇ    Returnsanerrorcodeforthelastunsuccessful
  1053.                graphicsoperation
  1054. __________________________________________________________________
  1055. üSyntaxÇ         int far graphresult(void);
  1056.  
  1057. üPurposegraphresultÇreturnstheerrorcodethatwas
  1058. reportedforthelastgraphicsoperation.Theerror
  1059. statusisresettoägrOkÇ.
  1060.  
  1061. Allgraphicsfunctionswillsettheerrorstatusto
  1062. ägrOkÇunlesssomethinghasgonewrong.
  1063.  
  1064.            Error     ägraphics_errors
  1065. Ç           code      constant           messagestring
  1066.            -------------------------------------------------------
  1067.            0       grOk               No error
  1068.            -1       grNoInitGraphGraphicsnotinitia⑨
  1069. lized(use'initgraph')
  1070.             -2       grNotDetectedGraphicshardwarenotde⑨
  1071. tected
  1072.            -3       grFileNotFoundDevicedriverfilenotfo⑨
  1073. und
  1074.           -4      grInvalidDriverInvaliddevicedriverfile
  1075.           -5      grNoLoadMemNotenoughmemorytoload
  1076. driver
  1077.           -6       grNoScanMemOutofmemoryinscanfill
  1078.           -7       grNoFloodMemOutofmemoryinflood
  1079. fill
  1080.           -8       grFontNotFoundFontfilenotfound
  1081.           -9       grNoFontMemNotenoughmemorytoload
  1082. font
  1083.           -10       grInvalidModeInvalidgraphicsmodefor
  1084. selecteddriver
  1085.           -11       grErrorGraphicserror
  1086.           -12       grIOerrorGraphicsI/Oerror
  1087. Ç          -13       grInvalidFontInvalidfontfile
  1088.           -14       grInvalidFontNumInvalidfontnumber
  1089.           -15      grInvalidDeviceNumInvaliddevicenumber
  1090.           -16       grInvalidFontSizeInvalidfontsize
  1091.           -17       grNotImplementedNotimplementedonAtari
  1092. ST/STe/TT
  1093.           -18       grInvalidVersionInvalidversionnumber
  1094.  
  1095. __________________________________________________________________
  1096.  
  1097. üimagesizeÇ      Returnsthenumberofbytesrequiredtostoreabit
  1098.                image
  1099. __________________________________________________________________
  1100. üSyntaxÇ         unsigned far imagesize(int äleftÇ, int ätopÇ,
  1101.                                     int räightÇ, int äbottomÇ);
  1102.  
  1103. üPurposeimagesizeÇdeterminesthenumberofbytesofmemory
  1104. requiredtostoreabitimage.
  1105.  
  1106. __________________________________________________________________
  1107.  
  1108. üinitgraphÇ      Initializes the graphics system
  1109. __________________________________________________________________
  1110. üSyntaxÇ         void far initgraph(int  far ä*graphdriverÇ,
  1111.                                   int  far *ägraphmodeÇ,
  1112.                                   char far *äpathtodriverÇ);
  1113.  
  1114. üPurposeinitgraphÇinitializationsthegraphicssystemand
  1115. mustbecalledbeforeanygraphicsfunctionsare
  1116. attempted.Ifagraphicfunctioniscalledbefore
  1117. üinitgraphÇanerrormessagewillbedisplayedand
  1118. theprogramwillterminate.
  1119.  
  1120. ä*graphdriverÇisanintegerthatindicatesthe
  1121. drivertobeused.Youcanuseconstantsdefinedby
  1122. theägraphics_driverÇenumerationtypeasshown
  1123. below.               
  1124.  
  1125.                ägraphics_driver
  1126. Ç               constant                 Numericvalue
  1127.                --------------------------------------
  1128.                DETECT                   0(autodetection)
  1129.                ...                      ..(CGA,EGA,VGA,etc)
  1130.                SC1224                   11
  1131.                SM124                    12
  1132.                TTC1434                  13
  1133.                TTM194                   14
  1134.                UNKNOWN_DRIVER           15
  1135.  
  1136. ä*graphmodeÇisanintegerthatindicatesthescreen
  1137. modetobeused.Youcanuseconstantsdefinedby
  1138. theägraphics_modeÇenumerationtypeasshownbelow.
  1139.  
  1140.                ägraphics_mode
  1141. Ç               constant                 Numericvalue
  1142.                --------------------------------------
  1143.                CGAC0                    0
  1144.                ...                      ..(CGA,EGA,VGA,etc)
  1145.                SC1224LO                  0
  1146.                SC1224MED                 1
  1147.                SM124HI                   0
  1148.                TTC1434LO                0
  1149.                TTC1434MED               1
  1150.                TTM194HI                 0
  1151.                UNKNOWN_MODE             0
  1152.  
  1153. êNote:ÇRefertographics.hforacompletelistof
  1154. values.OnlyST/STe/TTspecificvaluesareused.
  1155.  
  1156. AfterüinitgraphÇiscalled,ägraphdriverÇand
  1157. ägraphmodeÇwillbeupdatedtotheappropriatevalues
  1158. toindicatedtheactualgraphicsmodeset.
  1159. äpathtodriverÇhasnoeffectontheST/STe/TTsince
  1160. graphicdriverscannotbeloaded.
  1161.  
  1162. Ifnographicshardwareisdetected,ä*graphdriverÇ
  1163. issettoägrNotDetectedÇandügraphresultÇwillalso
  1164. returnägrNotDetectedÇ.
  1165.  
  1166. __________________________________________________________________
  1167.  
  1168. üinstalluserdriver
  1169.                ÇInstallsavendor-addeddevicedrivertotheBGI
  1170. ü          Ç     devicedrivertable
  1171. __________________________________________________________________
  1172. üSyntaxÇ         int far installuserdriver(char far ä*nameÇ,
  1173.                                         int huge (ä*detectÇ)(void));
  1174.  
  1175. üPurposeinstalluserdriverÇisusedtoloadalternative
  1176. graphicsdriversandhasnotbeimplementedonthe
  1177. ST/STe/TT.Afteracalltoü_graphgetmemÇ,
  1178. ügraphresultÇwillreturnägrNotImplementedÇ.
  1179.  
  1180. __________________________________________________________________
  1181.  
  1182. üinstalluserfont
  1183. Ç               LoadsafontfilethatisnotbuiltintotheBGI
  1184.                system
  1185. __________________________________________________________________
  1186. üSyntaxÇ         int far installuserfont(char far ä*nameÇ);
  1187.  
  1188. üPurposeinstalluserfontÇisusedtoloada"stroked"font
  1189. andhasnotbeenimplementedontheST/STe/TT.
  1190. AfteracalltoüinstalluserfontÇ,ügraphresultÇwill
  1191. returnägrNotImplementedÇ.
  1192.  
  1193. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....]0110
  1194. __________________________________________________________________
  1195.  
  1196. ülineÇ           Draws a line between two specified points
  1197. __________________________________________________________________
  1198. üSyntaxÇ         void far line(int äx1Ç, int äy1Ç, int äx2Ç, int äy2Ç);
  1199.  
  1200. üPurposelineÇdrawsalineusingthecurrentcolour,line
  1201. style,thicknessbetweenthe(äx1Ç,äy1Ç)and(äx2Ç,äy2Ç)
  1202. points.
  1203.  
  1204. __________________________________________________________________
  1205.  
  1206. ülinerelÇDrawsalinearelativedistancefromthecurrent
  1207. position(CP)
  1208. __________________________________________________________________
  1209. üSyntaxÇ         void far linerel(int ädxÇ, int ädyÇ);
  1210.  
  1211. üPurposelinerelÇdrawsalinefromthecurrentposition(CP)
  1212. tothepoint(ädxÇ,ädyÇ)whichisarelativedistance
  1213. fromCP.CPisadjustedby(ädxÇ,ädyÇ).Thecurrent
  1214. colour,linestyleandthicknessareused.
  1215.  
  1216. __________________________________________________________________
  1217.  
  1218. ülinetoÇDrawsalinefromthecurrentposition(CP)to
  1219. (x,y)
  1220. __________________________________________________________________
  1221. üSyntaxÇ         void far lineto(int äxÇ, int äyÇ);
  1222.  
  1223. üPurposelinetoÇdrawsalinefromthecurrentposition(CP)
  1224. tothepoint(äxÇ,äyÇ).CPismovedto(äxÇ,äyÇ).The
  1225. currentcolour,linestyleandthicknessareused.
  1226.  
  1227. __________________________________________________________________
  1228.  
  1229. ümoverel        ÇMoves the current position (CP) a relative distance
  1230. __________________________________________________________________
  1231. üSyntaxÇ         void far moverel(int ädxÇ, int ädyÇ);
  1232.  
  1233. üPurposemoverelÇmovesthecurrentposition(CP)byädxÇin
  1234. thehorizontaldirectionandädyÇinthevertical
  1235. direction.
  1236.  
  1237. __________________________________________________________________
  1238.  
  1239. ümovetoÇ         Moves the current position (CP) to (x,y)
  1240. __________________________________________________________________
  1241. üSyntaxÇ         void far moveto(int äxÇ, int äyÇ);
  1242.  
  1243. üPurposemovetoÇmovesthecurrentposition(CP)tothepoint
  1244. specifiedby(äxÇ,äyÇ).
  1245.  
  1246. __________________________________________________________________
  1247.  
  1248. üouttextÇ        Displays a string in the viewport
  1249. __________________________________________________________________
  1250. üSyntaxÇ         void far outtext(char far ä*textstringÇ);
  1251.  
  1252. üPurposeouttextÇdisplaysatextstringintheviewport
  1253. usingthecurrenttextstyle,size,justification
  1254. anddirection.
  1255.  
  1256. üouttextÇdisplaysätextstringÇatthecurrentposition
  1257. (CP).Ifthehorizontaljustificationissetto
  1258. LEFT_TEXTandtheverticaljustificationto
  1259. HORIZ_TEXT,thenCP'sxcoordinateisadjustedby
  1260. ütextwidthÇ(ätextstringÇ).OtherwiseCPisunchanged.
  1261.  
  1262. __________________________________________________________________
  1263.  
  1264. üouttextxyÇ      Displays a string at a specified location
  1265. __________________________________________________________________
  1266. üSyntaxÇ         void far outtextxy(int äxÇ, int äyÇ,
  1267.                                   char far ä*textstringÇ);
  1268.  
  1269. üPurposeouttextxyÇdisplaysatextstringintheviewport
  1270. usingthecurrenttextstyle,size,justification
  1271. anddirectionat(äxÇ,äyÇ).
  1272.  
  1273. Thecurrentposition(CP)isnotchanged.
  1274.  
  1275. __________________________________________________________________
  1276.  
  1277. üpiesliceÇ       Draws and fills in pie slice
  1278. __________________________________________________________________
  1279. üSyntaxÇ         void far pieslice(int äxÇ, int äyÇ, int ästangleÇ,
  1280.                                  int äendangleÇ, int äradiusÇ);
  1281.  
  1282. üPurposepiesliceÇdrawsapiesliceat(äxÇ,äyÇ)witharadius
  1283. givenbyäradiusÇ.Thepiesliceisdrawnfromthe
  1284. ästangleÇtotheäendangleÇ.ästangleÇandäendangleÇare
  1285. givenindegreesandmeasuredcounterclockwisewith
  1286. 0degreesbeingat3o'clock.
  1287.  
  1288. Thepiesliceisfilledwiththecurrentfillstyle
  1289. andcolour,thenoutlinedwiththecurrentcolour,
  1290. linestyleandthickness.
  1291.  
  1292. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆..◆.]0110
  1293. __________________________________________________________________
  1294.  
  1295. üputimageÇ       Outputs a bit image onto the screen
  1296. __________________________________________________________________
  1297. üSyntaxÇ         void far putimage(int äleftÇ, int ätopÇ,
  1298.                                  void far ä*bitmapÇ, int äopÇ);
  1299.  
  1300. üPurposeputimageÇdrawsthebitimagesavedbyügetimageÇon
  1301. thescreenwiththeupperrightcornerbeing
  1302. positionedat(äleftÇ,ätopÇ).äbitmapÇpointstothe
  1303. locationinmemorywheretheimageisstored.
  1304.  
  1305. ÇäopÇindicateswhotheimageistobedrawnonthe
  1306. screen.Theenumerationtypeäputimage_opsÇ,asfound
  1307. ingraphics.h,givesnamefortheäopÇvalues.
  1308.  
  1309. äputimage_ops
  1310. Ç               constant       value     description
  1311.                -----------------------------------------
  1312.                COPY_PUT       0       copy
  1313.                XOR_PUT        1       exclusiveor
  1314.                OR_PUT           2       inclusiveor
  1315.                AND_PUT        3       and
  1316.                NOT_PUT        4       copytheinverse
  1317.  
  1318. __________________________________________________________________
  1319.  
  1320. üputpixelÇ       Plots a pixel at a specific point
  1321. __________________________________________________________________
  1322. üSyntaxÇ         void far putpixel(int äxÇ, int äyÇ, int äcolorÇ);
  1323.  
  1324. üPurposeputpixelÇdrawsasinglepointat(äxÇ,äyÇ)usingthe
  1325. givenäcolorÇ.
  1326.  
  1327. __________________________________________________________________
  1328.  
  1329. ürectangleÇ      Draws a rectangle
  1330. __________________________________________________________________
  1331. üSyntaxÇ         void far rectangle(int äleftÇ, int ätopÇ,
  1332.                                   int ärightÇ, int äbottomÇ);
  1333.  
  1334. üPurposerectangleÇdrawsarectanglefromtheupperleft
  1335. corner(äleftÇ,ätopÇ)tothelowerrightcorner
  1336. (ärightÇ,äbottomÇ)usingthecurrentcolour,linestyle
  1337. andthickness.
  1338.  
  1339. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆..◆.]0110
  1340. __________________________________________________________________
  1341.  
  1342. üregisterbgidriverÇandüregisterfarbgidriver
  1343. ÇRegistersauser-loadedorlinked-ingraphics
  1344. drivercodewiththegraphicssystem
  1345. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆..◆.]0110
  1346. __________________________________________________________________
  1347. üSyntaxÇ         int registerbgidriver(void (ä*driverÇ)(void));
  1348.                int registerfarbgidriver(void (*driver)(void));
  1349.  
  1350. üPurposeregisterbgidriverÇandüregisterfarbgidriverÇhavenot
  1351. beenimplementedinthisgraphicslibrary.
  1352. ügraphresultÇwillreportaägrNotImplementedÇerror.
  1353.  
  1354. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆..◆.]0110
  1355. __________________________________________________________________
  1356.  
  1357. üregisterbgifontÇandüregisterfarbgifont
  1358. ÇRegistersauser-loadedorlinked-ingraphicsfont
  1359. codewiththegraphicssystem
  1360. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆..◆.]0110
  1361. __________________________________________________________________
  1362. üSyntaxÇ         int registerbgifont(void (ä*fontÇ)(void));
  1363. Ç               int registerfarbgifont(void (ä*fontÇ)(void));
  1364.  
  1365. üPurposeregisterbgifontÇandüregisterfarbgifontÇhavenot
  1366. beenimplementedinthisgraphicslibrary.
  1367. ügraphresultÇwillreportaägrNotImplementedÇerror.
  1368.  
  1369. __________________________________________________________________
  1370.  
  1371. ürestorecrtmodeÇRestoresthescreenmodetoitspre-initgraph
  1372. setting
  1373. __________________________________________________________________
  1374. üSyntaxÇ         void far restorecrtmode(void);
  1375.  
  1376. üPurposerestorecrtmodeÇreturnsthescreentotextmode.The
  1377. screenisclearedandthecursorreturnstothe
  1378. homeposition(0,0).Thisfunctioncanbeusedin
  1379. conjuctionwithüsetgraphmodeÇtoswitchbetweentext
  1380. andgraphicmodes.
  1381.  
  1382. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....]0110
  1383. __________________________________________________________________
  1384.  
  1385. üsectorÇ         Draw and fills an elliptical pie slice
  1386. __________________________________________________________________
  1387. üSyntaxÇ         void far sector(int äxÇ, int äyÇ,
  1388.                                int ästangleÇ, int äendangleÇ,
  1389.                                int äxradiusÇ, int äyradiusÇ );
  1390. ä
  1391. üPurposesectorÇdrawsanellipticalpieslicelocatedat
  1392. (äxÇ,äyÇ)withahorizontalradiusofäxradiusÇanda
  1393. verticalradiusofäyradiusÇ.Thesectorisdrawn
  1394. fromästangleÇandendsatäendangleÇ.Thesectoris
  1395. filledwiththecurrentfillstyleandcolour,then
  1396. outlinedwiththecurrentlinecolour,styleand
  1397. thickness.
  1398. ä
  1399. stangleÇandäendangleÇaregivenindegrees.The
  1400. angleismeasuredcounterclockwisewith0degrees
  1401. beingat3o'clock.
  1402.  
  1403. __________________________________________________________________
  1404.  
  1405. üsetactivepageÇSets active page for graphics output
  1406. __________________________________________________________________
  1407. üSyntaxÇ         void far setactivepage(int äpageÇ);
  1408.  
  1409. üPurposesetactivepageÇhasnoeffectontheST/STe/TT
  1410. implementationsinceonlyONEpageisused.IfäpageÇ
  1411. isnon-zeroügraphresultÇreturnsägrErrorÇ.
  1412.  
  1413. __________________________________________________________________
  1414.  
  1415. üsetallpaletteÇ  Changes all palette colours as specified
  1416. __________________________________________________________________
  1417. üSyntaxÇ         void far setallpalette(struct palettetype
  1418. Ç                                    far ä*paletteÇ);
  1419.  
  1420. üPurposesetallpaletteÇsetsthecolourpalettetothecolour
  1421. valuescontainedintheüpalettetypeÇstructure
  1422. pointedtobyäpaletteÇ.
  1423.  
  1424. üpalettetypeÇasthefollowingstructuredefinein
  1425. graphics.h.
  1426.  
  1427.                #defineMAXCOLORS15
  1428.  
  1429.                structpalettetype{
  1430.                     unsignedcharsize;
  1431.                     signedcharcolors[MAXCOLORS+1];
  1432.                };
  1433.  
  1434. äsizeÇindicateshowmanyentriesintheäcolorsÇarray
  1435. exist.äcolorsÇholdsthecolornumbers.
  1436.  
  1437. __________________________________________________________________
  1438.  
  1439. üsetaspectratioÇ Changes the default aspect ratio correction factor
  1440. __________________________________________________________________
  1441. üSyntaxÇ         void far setaspectratio(int äxaspÇ, int äyaspÇ);
  1442.  
  1443. üPurposesetaspectratioÇhasnotbeenimplementedsincethe
  1444. VDIroutinescorrectlyhandletheaspectratio.The
  1445. purposeofüsetaspectratioÇforthePCistocorrect
  1446. theaspectratioforaddongraphicsdrivers.
  1447.  
  1448. ügraphresultÇwillreturnägrNotImplementedÇif
  1449. üsetaspectratioÇiscalled.
  1450.  
  1451. __________________________________________________________________
  1452. ü
  1453. setbkcolorÇSetsthecurrentbackgroundcolourusingthe
  1454. palette
  1455. __________________________________________________________________
  1456. üSyntaxÇ         void far setbkcolor(int äcolorÇ)ü;
  1457. Ç
  1458. üPurposesetbkcolorÇsetsthebackgroundcolor(pen0)to
  1459. äcolorÇ.
  1460.  
  1461.                Number    Colour
  1462.                ------------------------               
  1463.                   0      BLACK
  1464.                   1      BLUE
  1465.                   2      GREEN
  1466.                3      CYAN
  1467.                4      RED
  1468.                5      MAGENTA
  1469.                6      BROWN
  1470.                   7      LIGHTGRAY
  1471.                8      DARKGRAY
  1472. Ç               9      LIGHTBLUE
  1473.                10      LIGHTGREEN
  1474.                11      LIGHTCYAN
  1475.                  12      LIGHTRED
  1476.                13      LIGHTMAGENTA
  1477.                14      YELLOW
  1478.                15      WHITE
  1479.  
  1480. __________________________________________________________________
  1481.  
  1482. üsetcolorÇ       Sets the current drawing colour using the palette
  1483. __________________________________________________________________
  1484. üSyntaxÇ         void far setcolor(int äcolorÇ);
  1485.  
  1486. üPurposesetcolorÇsetsthecurrentdrawingcolourtoäcolorÇ.
  1487. äcolorÇcanrangefrom0toügetmaxcolorÇ.See
  1488. üsetbkcolorÇ.
  1489.  
  1490. üsetcolorÇalsoeffectsthecolourofgraphictext
  1491. drawnonthescreen.
  1492.  
  1493. __________________________________________________________________
  1494.  
  1495. üsetfillpatternÇ Selects a user-defined fill pattern
  1496. __________________________________________________________________
  1497. üSyntaxÇ         void far setfillpattern(char far ä*upatternÇ,
  1498.                                        int äcolorÇ);
  1499.  
  1500. üPurposesetfillpatternÇallowstheprogrammertodefineuser
  1501. definedfillpatternsthatwillbeusedbygraphic
  1502. functionsthatfillshapes.Thepatternisdefined
  1503. with8bytes,pointedtobyäupatternÇ,eachbyte
  1504. representsthebitpatternperrow.See
  1505. ügetfillpatternÇformoreinformation.Thefill
  1506. colourissettoäcolor.
  1507. Ç
  1508. __________________________________________________________________
  1509.  
  1510. üsetfillstyleÇ   Sets the fill pattern and colour
  1511. __________________________________________________________________
  1512. üSyntaxÇ         void far setfillstyle(int äpatternÇ, int äcolorÇ);
  1513.  
  1514. üPurposesetfillstyleÇsetsthefillpatterntoäpatternÇ,one
  1515. ofthepredefinedfillpatternsandsetsthefill
  1516. colourtoäcolorÇ.üÇSeeügetfillsettingsÇformore
  1517. information.
  1518.  
  1519. DonotuseaäpatternÇofUSER_FILLwith
  1520. üsetfillstyleÇ,useüsetfillpatternÇtodefineanduse
  1521. auserdefinedfillpattern
  1522.  
  1523. __________________________________________________________________
  1524.  
  1525. üsetgraphbufsize
  1526. Ç               Changes the size of the internal graphics buffer
  1527. __________________________________________________________________
  1528. üSyntax         Çunsigned far setgraphbufsize(unsigned äbufsizeÇ);
  1529.  
  1530. üPurposesetgraphbufsizeÇhasnotbeenimplementedinthis
  1531. graphicslibrary.ügraphresultÇwillreporta
  1532. ägrNotImplementedÇerror.
  1533.  
  1534. __________________________________________________________________
  1535.  
  1536. üsetgraphmodeÇ   Sets the system to graphics mode, clears the screen
  1537. __________________________________________________________________
  1538. üSyntax         Çvoid far setgraphmode(int ämodeÇ);
  1539.  
  1540. üPurposesetgraphmodeÇreturnsthescreentographicsmode
  1541. andresetsallgraphicssettingstotheirdefault
  1542. values.Thisfunctioncanbeusedinconjuction
  1543. withürestorecrtmodeÇtoswitchbetweentextand
  1544. graphicmodes.
  1545.  
  1546. __________________________________________________________________
  1547.  
  1548. üsetlinestyleÇ   Sets the current line width and style
  1549. __________________________________________________________________
  1550. üSyntaxÇ         void far setlinestyle(int älinestyleÇ,
  1551.                                     unsigned äupatternÇ,
  1552.                                     int äthicknessÇ);
  1553.  
  1554. üPurposesetlinestyleÇsetsthecurrentlinestyleto
  1555. älinestyleÇandthicknesstoäthicknessÇ.See
  1556. ügetlinesettingsÇformoreinformationabout
  1557. älinestyleÇvalues.
  1558.  
  1559. Auser-definedlinestylecanalsobespecifiedby
  1560. requestingaUSERBIT_LINEinasälinestyleÇand
  1561. specifyingthebitpatterninäupatternÇ.Ifauser
  1562. definedpatternisnotwanted,äupatternÇmuststill
  1563. beprovided,butissimplyignored.
  1564.  
  1565. êNote:ÇtheälinestyleÇsettingisonlyeffectwhenthe
  1566. äthicknessÇis1.
  1567.  
  1568. __________________________________________________________________
  1569.  
  1570. üsetpaletteÇ     Changes one palette colour
  1571. __________________________________________________________________
  1572. üSyntaxÇ         void far setpalette(int äcolornumÇ, int äcolorÇ);
  1573.  
  1574. üPurposesetpaletteÇisnotimplementedsinceüsetrgbpaletteÇ
  1575. willhandleallchangestothecolourpalette.
  1576. ügraphresultÇwillreturnägrNotImplementedÇ.
  1577.  
  1578. __________________________________________________________________
  1579.  
  1580. üsetrgbpaletteÇ  Allows user to define colour for the IBM8514
  1581. __________________________________________________________________
  1582. üSyntaxÇ         void far setrgbpalette(int äcolornumÇ,
  1583.                                     int äredÇ, int ägreenÇ,
  1584.                                     int äblueÇ);
  1585.  
  1586. üPurposesetrgbpaletteÇsetstheäcolornumÇentryinthecolour
  1587. palettetotheäredÇ,ägreenÇ,äblueÇvalues.Onthe
  1588. ST/STethesevaluescanrangefrom0to7and0to
  1589. 15ontheTT.
  1590.  
  1591. TheTTandthirdpartygraphiccardsarecapableof
  1592. morethan16coloursonthescreen.üsetrgbpaletteÇ
  1593. canchangeanyofthemandthefirstsixteen
  1594. entriesinthepalettearesettothedefaultTurbo
  1595. CcoloursshowninüsetbkcolorÇ.
  1596.  
  1597. __________________________________________________________________
  1598.  
  1599. üsettextjustifyÇ Sets text justification for graphics functions
  1600. __________________________________________________________________
  1601. üSyntaxÇ         void far settextjustify(int ähorizÇ, int ävertÇ);
  1602.  
  1603. üPurposesettextjustifyÇdetermineshowtextisdisplayed
  1604. withreferencetothecurrentposition(CP).
  1605.  
  1606.                ätext_just
  1607. Ç               constant       value
  1608.                ---------------------               LEFT_TEXT      
  1609. 0   
  1610.                CENTER_TEXT      1   
  1611.                RIGHT_TEXT     2 
  1612.  
  1613.                BOTTOM_TEXT      0
  1614.                CENTER_TEXT  1
  1615.               TOP_TEXT       2
  1616.  
  1617. __________________________________________________________________
  1618.  
  1619. üsettextstyleÇSetsthecurrenttextcharacteristicsforgraphic
  1620. output
  1621. __________________________________________________________________
  1622. üSyntaxÇ         void far settextstyle(int äfontÇ, int ädirectionÇ,
  1623.                                      int ächarsizeÇ);
  1624.  
  1625. üPurposesettextstyleÇsetsthetextäfontÇ,ädirectionÇ,and
  1626. ächarsizeÇthatwillbeusedbyüouttextÇand
  1627. üouttextxyÇ.
  1628.  
  1629. äfontÇcanhaveseveralvalues:
  1630.  
  1631.                value     result
  1632.                ---------------------               0x00      sytem
  1633. font
  1634. Ç               0x01      boldfont
  1635.                0x02      grayedfont
  1636.                0x04      italicizedfont
  1637.                0x08      underlinedfont
  1638.                0x10      outlinedfont
  1639.  
  1640. TheseäfontÇvaluescanbeANDedtogethertocombine
  1641. thefonts.Forexample,ifäfontÇis0x14thefontis
  1642. shownitalicizedandoutlied.
  1643.  
  1644. ächarsizeÇdiffersfromTurboCisthatitrepresents
  1645. thefontpointsizeandnotamagnificationfactor.
  1646. Thesystemfontcanbedisplayedinsixsizes:
  1647.  
  1648.                value     pointsize
  1649.                --------------------                 0            8
  1650.                1            9
  1651.                  2           10
  1652.                3           16
  1653.                4           18
  1654.                  5andup    20
  1655. 9[....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....◆....]0110
  1656.  
  1657. __________________________________________________________________
  1658.  
  1659. üsetusercharsize
  1660. ÇAllowstheusertovarythecharacterwidthand
  1661. heightforfonts
  1662. __________________________________________________________________
  1663. üSyntaxÇ         void far setusercharsize(int ämultxÇ, int ädivxÇ,
  1664.                                         int ämultyÇ, int ädivyÇ);
  1665.  
  1666. üPurposesetusercharsizeÇhasnotbeenimplementedinthis
  1667. graphicslibrary.ügraphresultÇwillreporta
  1668. ägrNotImplementedÇerror.
  1669.  
  1670. __________________________________________________________________
  1671.  
  1672. üsetviewportÇ    Sets the current viewport for graphics output
  1673. __________________________________________________________________
  1674. üSyntaxÇ         void far setviewport(int äleftÇ, int ätopÇ,
  1675.                                     int ärightÇ, int äbottomÇ,
  1676.                                    int äclipÇ);
  1677.  
  1678. üPurposesetviewportÇdefinesaportionofthescreenthat
  1679. willbecomethenewviewportforgraphicsoutput.
  1680.  
  1681. Theupperleftcorner(äleftÇ,ätopÇ)andlowerright
  1682. corner(ärightÇ,äbottomÇ)aregiveninabsolutescreen
  1683. coordinates.Thecurrentposition(CP)ismovedto
  1684. (0,0)andcorrespondstotheupperleftcorner.
  1685.  
  1686. äclipÇdetermineswhetherornotgraphicoperations
  1687. areclippedattheviewportsperimeter.IfäclipÇis
  1688. nonzero,allgraphicoperationswillbeclipped.
  1689. Ç
  1690. êNote:Çallgraphicoperationsareviewportrelative.
  1691. WhenüsetviewportÇisused,(0,0)willmovetothe
  1692. upperleftcorner(äleftÇ,ätopÇ)ofthenewviewport.
  1693.  
  1694. __________________________________________________________________
  1695.  
  1696. üsetvisualpageÇ  Sets the visual graphics page number
  1697. __________________________________________________________________
  1698. üSyntaxÇ         void far setvisualpage(int äpageÇ);
  1699.  
  1700. üPurposesetvisualpageÇhasnoeffectontheST/STe/TT
  1701. implementationsinceonlyONEpageisused.IfäpageÇ
  1702. isnon-zeroügraphresultÇreturnsägrErrorÇ.
  1703.  
  1704. __________________________________________________________________
  1705.  
  1706. üsetwritemodeÇSetsthewritingmodeforlinedrawing
  1707. __________________________________________________________________
  1708. üSyntaxÇ         void far setwritemode(int ämodeÇ);
  1709.  
  1710. üPurposesetwritemodeÇeffectshowtheoutputofthegraphic
  1711. functionsappearsusingbinaryoperations.
  1712.  
  1713. COPY_PUTsimplycopiesthenewoutputtothescreen
  1714. andXOR_PUTperformsanexclusiveORoperation
  1715. betweentheoutputandtheexistingscreenimage.
  1716.  
  1717. AsecondXOR_PUTofthesamegraphicoutputwill
  1718. erasetheresultofthefirstone.
  1719.  
  1720. __________________________________________________________________
  1721.  
  1722. ütextheightÇReturns the height of a string in pixels
  1723. __________________________________________________________________
  1724. üSyntaxÇ         int far textheight(char far ä*textstringÇ);
  1725.  
  1726. üPurpose        textheightÇdeterminestheheightofätextstringÇ,in
  1727. pixels,ofthecurrenttextfont.
  1728.  
  1729. Thisfunctionisveryusefulforcreating
  1730. resolutionindependentprogramsthatusetext.Use
  1731. ütextheightÇratherthandoingthecalculation
  1732. manually.
  1733. __________________________________________________________________
  1734.  
  1735. ütextwidthÇ Returns the width of a string in pixels
  1736. __________________________________________________________________
  1737. üSyntaxÇ         int far textwidth(char far ä*textstringÇ);
  1738.  
  1739. üPurposetextwidthÇdeterminesthewidthofätextstringÇ,in
  1740. pixels,ofthecurrenttextfont.
  1741.  
  1742. Thisfunctionisveryusefulforcreating
  1743. Çresolutionindependentprogramsthatusetext.Use
  1744. ütextwidthÇratherthandoingthecalculation
  1745. manually.
  1746.  
  1747.