home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PGL.ZIP / PGLSW.MAN < prev    next >
Encoding:
Text File  |  1991-12-15  |  437.1 KB  |  10,797 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                   PGL ToolKit
  12.                      Printer Graphics Interface Libraries
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                                   USER'S GUIDE
  25.                                        AND
  26.                                LIBRARY REFERENCE
  27.  
  28.  
  29.  
  30.  
  31.                             ************************
  32.                             **  LICENSE AGREEMENT **
  33.                             ************************
  34.  
  35. This is a license agreement between you, the end user, and AnSoft, Inc.
  36. Please read the following terms and conditions before opening the sealed
  37. diskette envelope.  For the purposes of this agreement "software" is defined
  38. as any source code, executables, object code libraries, and product docu-
  39. mentation included in this package.  Opening the diskette envelope and use
  40. of the software indicates your acceptance of these terms and conditions.  If
  41. you do not agree with the terms and conditions of the license agreement,
  42. promptly return the unopened diskette envelope and the package undamaged
  43. along with proof of purchase for a full refund.  AnSoft, Inc., a Maryland
  44. corporation, provides this software and licenses its use.
  45.  
  46.  
  47. LICENSE
  48.  
  49. You MAY use the software on any machine or machines in your possession, but
  50. you may not have a copy on more than one machine at any given time.  You MAY
  51. copy the software into any machine-readable form for the expressed of creating
  52. an archival backup copy only.  You MAY distribute any executable programs you
  53. create as long as it is not a derivative product based on this software.  A
  54. derivative product is one whereby the primary function is to provide graphics
  55. printer support.  You MAY distribute the FONT FILES, PRINTER DRIVERS, and
  56. PRINTER UTILITY PROGRAMS with any executable programs you create.  You MAY NOT
  57. translate, reverse compile, reverse assemble, or reverse engineer the software.
  58.  
  59. This software is sold as a single-user version.  You MAY install and use the
  60. software on a network provided only one network user at a time uses the
  61. software or any portion of it.  In order for the software to be used by
  62. multiple users, a separate SITE LICENSE must be purchased directly from
  63. AnSoft, Inc.
  64.  
  65. You MAY transfer the software and license to another party provided the other
  66. party agrees to accept the terms and conditions of this license agreement.  If
  67. you transfer the software, you must either transfer all copies whether in
  68. printed or machine readable form to the same party or destroy any copies not
  69. transferred.  When transferring the software to another party, please inform
  70. AnSoft, Inc. as to the name and address of the new registered owner.
  71.  
  72. YOU MAY NOT DISTRIBUTE ANY PORTIONS OF THE OBJECT CODE LIBRARIES TO ANOTHER
  73. PARTY UNDER ANY CIRCUMSTANCES.  YOU MAY NOT COPY, MODIFY, OR TRANSFER THE
  74. SOFTWARE, EITHER IN WHOLE OR IN PART, EXCEPT AS EXPRESSLY PROVIDED FOR IN THIS
  75. LICENSE AGREEMENT.
  76.  
  77. The license is effective until terminated.  You may terminate it any time by
  78. destroying the software together with all copies, modifications, and merged
  79. portions in any form.  It will also terminate upon conditions set forth
  80. elsewhere in this agreement or if you fail to comply with the terms and
  81. conditions of this agreement.  You agree, upon such termination, to destroy
  82. all copies, modifications, and merged portions in any form except for any
  83. executable programs you created.
  84.  
  85. LIMITED WARRANTY
  86.  
  87. AnSoft, Inc. warrants the diskette and documentation with respect to their
  88. physical condition to be free of defects in material and workmanship for a
  89. period of 30 days from the date of purchase.  AnSoft, Inc. agrees to replace
  90. any defective diskette or documentation within the warranty period upon
  91. notification to that effect.
  92.  
  93. AnSoft, Inc. specifically disclaims all other warranties, expressed or implied,
  94. including but not limited to implied warranties as to the suitability of the
  95. software to meet your requirements or that the software will operate
  96. uninterrupted or free of error.
  97.  
  98. AnSoft, Inc. SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO
  99. ANY LOSS OF PROFITS, LOSS OF SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL
  100. DAMAGES RESULTING FROM THE USE OR INABILITY TO USE THIS SOFTWARE.  YOU ASSUME
  101. ALL RISKS AND RESPONSIBILITIES AS TO THE RESULTS AND PERFORMANCE OF THE
  102. SOFTWARE AND MANUAL.
  103.  
  104. You acknowledge that you have read this agreement, understand it and agree to
  105. be bound by the terms and conditions listed herein.  You further agree that
  106. this is the complete and exclusive agreement between you, the user, and AnSoft,
  107. Inc. and that this agreement supersedes all prior agreements, written or oral.
  108.  
  109. COPYRIGHT
  110.  
  111. Information in this document is subject to change without notice and does not
  112. represent a commitment on the part of AnSoft, Inc.  The software described in
  113. this document is furnished under a license agreement.  The software may be
  114. used or copied only in accordance with the terms and conditions of the
  115. agreement.  This document is protected by federal copyright law.  No part of
  116. this manual may be copied or distributed, transmitted, transcribed, stored in
  117. a retrieval system, or translated in any human or computer language in any
  118. form or by any means, electronic, mechanical, magnetic, manual or otherwise,
  119. including photocopying and recording, for any purpose other than the
  120. purchaser's personal use without receiving prior written permission from
  121. AnSoft, Inc.
  122.  
  123. TRADEMARKS
  124.  
  125. WATCOM is a trademark of WATCOM Systems, Inc.
  126.  
  127. Microsoft, Microsoft Assembler, Microsoft Basic PDS, Quick Basic, Microsoft C,
  128. Quick C, Microsoft Fortran, and MS-DOS are trademarks of Microsoft Corporation.
  129.  
  130. IBM, IBM PC, and PS/2 are trademarks of International Business Machines, Inc.
  131.  
  132. Borland C++, Turbo Assembler, Turbo C/C++ and Turbo Pascal are trademarks of
  133. Borland International, Inc.
  134.  
  135. Clipper is a trademark of Nantucket Corporation.
  136.  
  137. PC Paintbrush is a trademark of ZSoft Corporation.
  138.  
  139. Lahey is a trademark of Lahey Computer Systems, Inc.
  140.  
  141. GX Graphics is a trademark of Genus Microprogramming, Inc.
  142.  
  143. MetaWINDOW is a trademark of Metagraphics Software Corporation.
  144.  
  145.  
  146.                            ***********************
  147.                            ** TABLE OF CONTENTS **
  148.                            ***********************
  149.  
  150.  
  151. CHAPTER 1:  INTRODUCTION
  152.  
  153.      PGL Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .
  154.      System Requirements. . . . . . . . . . . . . . . . . . . . . . . .
  155.      About This Manual. . . . . . . . . . . . . . . . . . . . . . . . .
  156.      Registration . . . . . . . . . . . . . . . . . . . . . . . . . . .
  157.      Technical Support. . . . . . . . . . . . . . . . . . . . . . . . .
  158.  
  159. CHAPTER 2:  INSTALLATION
  160.  
  161.      Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  162.      About the Distribution Disks . . . . . . . . . . . . . . . . . . .
  163.      Automatic Installation . . . . . . . . . . . . . . . . . . . . . .
  164.      Manual Installation. . . . . . . . . . . . . . . . . . . . . . . .
  165.      Languages and Archives . . . . . . . . . . . . . . . . . . . . . .
  166.           C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  167.           Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . .
  168.           Pascal. . . . . . . . . . . . . . . . . . . . . . . . . . . .
  169.           Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  170.           Clipper . . . . . . . . . . . . . . . . . . . . . . . . . . .
  171.  
  172. CHAPTER 3:  QUICKSTART
  173.  
  174.      Supported Compilers. . . . . . . . . . . . . . . . . . . . . . . .
  175.      Function Naming Convention . . . . . . . . . . . . . . . . . . . .
  176.      Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  177.      Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . .
  178.      Integrating the PGL Library. . . . . . . . . . . . . . . . . . . .
  179.      Include Files and Libraries. . . . . . . . . . . . . . . . . . . .
  180.           C Language. . . . . . . . . . . . . . . . . . . . . . . . . .
  181.           Fortran Language. . . . . . . . . . . . . . . . . . . . . . .
  182.           Pascal Language . . . . . . . . . . . . . . . . . . . . . . .
  183.           Basic Language. . . . . . . . . . . . . . . . . . . . . . . .
  184.           Clipper Language. . . . . . . . . . . . . . . . . . . . . . .
  185.           Assembly Language . . . . . . . . . . . . . . . . . . . . . .
  186.      Compiling and Linking. . . . . . . . . . . . . . . . . . . . . . .
  187.      Quick Libraries. . . . . . . . . . . . . . . . . . . . . . . . . .
  188.      Example Programs . . . . . . . . . . . . . . . . . . . . . . . . .
  189.      No Royalties . . . . . . . . . . . . . . . . . . . . . . . . . . .
  190.  
  191. CHAPTER 4:  PGL PHILOSOPHY
  192.  
  193.      Design Philosophy. . . . . . . . . . . . . . . . . . . . . . . . .
  194.      Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . .
  195.      Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . .
  196.  
  197. CHAPTER 5:  PROGRAMMING WITH PGL
  198.  
  199.      Supported Compilers. . . . . . . . . . . . . . . . . . . . . . . .
  200.      Function Naming Convention . . . . . . . . . . . . . . . . . . . .
  201.      Coordinate System. . . . . . . . . . . . . . . . . . . . . . . . .
  202.      Virtual Drawing Resolution . . . . . . . . . . . . . . . . . . . .
  203.      Aspect Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . .
  204.      Color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  205.           Color Palettes. . . . . . . . . . . . . . . . . . . . . . . .
  206.           HP PaintJet . . . . . . . . . . . . . . . . . . . . . . . . .
  207.           HP PaintJet/XL. . . . . . . . . . . . . . . . . . . . . . . .
  208.           Color PostScript Printers . . . . . . . . . . . . . . . . . .
  209.           Background Colors . . . . . . . . . . . . . . . . . . . . . .
  210.      Saving Your Graphics . . . . . . . . . . . . . . . . . . . . . . .
  211.      Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  212.      Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . .
  213.      Step-By-Step Example . . . . . . . . . . . . . . . . . . . . . . .
  214.           Example Program . . . . . . . . . . . . . . . . . . . . . . .
  215.           Compiling, Linking, and Executing . . . . . . . . . . . . . .
  216.           Printing EXAMPLE.PGL Using GPU. . . . . . . . . . . . . . . .
  217.           Printing EXAMPLE.PGL Using GPMENU . . . . . . . . . . . . . .
  218.  
  219. CHAPTER 6:  WORKING WITH BITMAPS
  220.  
  221.      Saving Bitmap Images . . . . . . . . . . . . . . . . . . . . . . .
  222.      Building the Data Vector . . . . . . . . . . . . . . . . . . . . .
  223.      Color Conversions and Dithering. . . . . . . . . . . . . . . . . .
  224.      Bitmap Scaling . . . . . . . . . . . . . . . . . . . . . . . . . .
  225.      Bitmap Fill Direction. . . . . . . . . . . . . . . . . . . . . . .
  226.      Bitmap Fill Mode . . . . . . . . . . . . . . . . . . . . . . . . .
  227.      Bitmap Image Processing. . . . . . . . . . . . . . . . . . . . . .
  228.      Using Hardware Coordinates and Bitmaps . . . . . . . . . . . . . .
  229.  
  230. CHAPTER 7:  PRINTING
  231.  
  232.      The Printing Process . . . . . . . . . . . . . . . . . . . . . . .
  233.      Printing From Within Your Application. . . . . . . . . . . . . . .
  234.      Printing From Outside Your Application . . . . . . . . . . . . . .
  235.      GPU Command Summary. . . . . . . . . . . . . . . . . . . . . . . .
  236.      Printer Control Parameters . . . . . . . . . . . . . . . . . . . .
  237.           File Name . . . . . . . . . . . . . . . . . . . . . . . . . .
  238.           Output Device Destination (/U). . . . . . . . . . . . . . . .
  239.           Device Driver (/D). . . . . . . . . . . . . . . . . . . . . .
  240.           Resolution (/R) . . . . . . . . . . . . . . . . . . . . . . .
  241.           Page Margins (/M) . . . . . . . . . . . . . . . . . . . . . .
  242.           Page Orientation (/O) . . . . . . . . . . . . . . . . . . . .
  243.           Page Size (/Z). . . . . . . . . . . . . . . . . . . . . . . .
  244.           Invert Flag (/I). . . . . . . . . . . . . . . . . . . . . . .
  245.           EMM Usage (/E). . . . . . . . . . . . . . . . . . . . . . . .
  246.           Path (/P) . . . . . . . . . . . . . . . . . . . . . . . . . .
  247.           Copies (/C) . . . . . . . . . . . . . . . . . . . . . . . . .
  248.           Fill Density (/Y) . . . . . . . . . . . . . . . . . . . . . .
  249.           Form Feed (/F). . . . . . . . . . . . . . . . . . . . . . . .
  250.           Quiet Switch (/Q) . . . . . . . . . . . . . . . . . . . . . .
  251.           Buffer Size (/B). . . . . . . . . . . . . . . . . . . . . . .
  252.      System Files . . . . . . . . . . . . . . . . . . . . . . . . . . .
  253.      PGL2PS Utility . . . . . . . . . . . . . . . . . . . . . . . . . .
  254.      SCPY Utility . . . . . . . . . . . . . . . . . . . . . . . . . . .
  255.  
  256. CHAPTER 8:  SUPPORTED OUTPUT DEVICES
  257.  
  258.      Selecting A Raster Output Device . . . . . . . . . . . . . . . . .
  259.      Printer Emulations . . . . . . . . . . . . . . . . . . . . . . . .
  260.           Epson FX Emulation. . . . . . . . . . . . . . . . . . . . . .
  261.           Epson LQ Emulation. . . . . . . . . . . . . . . . . . . . . .
  262.           HP LaserJet Series II Emulation . . . . . . . . . . . . . . .
  263.           PostScript Emulation. . . . . . . . . . . . . . . . . . . . .
  264.           HP PaintJet Emulation . . . . . . . . . . . . . . . . . . . .
  265.      Device Driver Descriptions . . . . . . . . . . . . . . . . . . . .
  266.           EPFX - Epson FX Series. . . . . . . . . . . . . . . . . . . .
  267.           EPFXWC - Epson FX Wide Carriage Series. . . . . . . . . . . .
  268.           EPLQ - Epson LQ Series. . . . . . . . . . . . . . . . . . . .
  269.           EPLQWC - Epson LQ Wide Carriage Series. . . . . . . . . . . .
  270.           EPLQLO - Epson LQ Series (Low Resolution) . . . . . . . . . .
  271.           EPLQLOWC - Epson LQ Wide Carriage Series (Low Resolution) . .
  272.           CITMSP10 - Citizen MSP-10 . . . . . . . . . . . . . . . . . .
  273.           CITMSP15 - Citizen MSP-15 . . . . . . . . . . . . . . . . . .
  274.           CITGSX140 - Citizen GSX 140 . . . . . . . . . . . . . . . . .
  275.           HPLJET - HP LaserJet Series . . . . . . . . . . . . . . . . .
  276.           HPLJET2P - HP LaserJet IIP  . . . . . . . . . . . . . . . . .
  277.           HPLJET3 - HP LaserJet III . . . . . . . . . . . . . . . . . .
  278.           HPLJET3P - HP LaserJet IIIP . . . . . . . . . . . . . . . . .
  279.           HPDJET - HP DeskJet, DeskJet Plus, DeskJet 500. . . . . . . .
  280.           HPDJETC - HP DeskJet 500C . . . . . . . . . . . . . . . . . .
  281.           HPPJET - HP PaintJet. . . . . . . . . . . . . . . . . . . . .
  282.           HPPJETXL - HP PaintJet/XL . . . . . . . . . . . . . . . . . .
  283.           HPTJET - HP ThinkJet. . . . . . . . . . . . . . . . . . . . .
  284.           EPS - PostScript. . . . . . . . . . . . . . . . . . . . . . .
  285.           PCX - PCX Monochrome File Format. . . . . . . . . . . . . . .
  286.           PCXC - PCX Color File Format. . . . . . . . . . . . . . . . .
  287.           PCXEGA - PCX EGA Monochrome File Format . . . . . . . . . . .
  288.           PCXEGAC - PCX EGA Color File Format . . . . . . . . . . . . .
  289.           PCXVGA - PCX VGA Monochrome File Format . . . . . . . . . . .
  290.           PCXVGAC - PCX VGA Color File Format . . . . . . . . . . . . .
  291.           PCXHERC - PCX Hercules Monochrome File Format . . . . . . . .
  292.           PCXSVGA - PCX Super-VGA Monochrome File Format. . . . . . . .
  293.           PCXSVGAC - PCX Super-VGA Color File Format. . . . . . . . . .
  294.           PCX8514 - PCX 8514 Monochrome File Format . . . . . . . . . .
  295.           PCX8514C - PCX 8514 Color File Format . . . . . . . . . . . .
  296.           EGA - EGA Monitor Driver. . . . . . . . . . . . . . . . . . .
  297.           VGA - VGA Monitor Driver. . . . . . . . . . . . . . . . . . .
  298.           EGAMONO - EGAMONO Monitor Driver. . . . . . . . . . . . . . .
  299.           VGAMONO/MCGA - VGAMONO/MCGA Monitor Driver. . . . . . . . . .
  300.           HERC - HERC Monitor Driver. . . . . . . . . . . . . . . . . .
  301.  
  302. PGL TOOLKIT FUNCTION REFERENCE
  303.  
  304.      System Functions . . . . . . . . . . . . . . . . . . . . . . . . .
  305.      Device Information Functions . . . . . . . . . . . . . . . . . . .
  306.      Bitmap Output Functions. . . . . . . . . . . . . . . . . . . . . .
  307.      Drawing Functions. . . . . . . . . . . . . . . . . . . . . . . . .
  308.      Graphics Attribute Functions . . . . . . . . . . . . . . . . . . .
  309.      Graphics Text Functions. . . . . . . . . . . . . . . . . . . . . .
  310.      Description Format . . . . . . . . . . . . . . . . . . . . . . . .
  311.      Quick Reference: Functional Listing. . . . . . . . . . . . . . . .
  312.             System. . . . . . . . . . . . . . . . . . . . . . . . . . .
  313.             Device Info . . . . . . . . . . . . . . . . . . . . . . . .
  314.             Bitmap. . . . . . . . . . . . . . . . . . . . . . . . . . .
  315.             Drawing . . . . . . . . . . . . . . . . . . . . . . . . . .
  316.             Attributes. . . . . . . . . . . . . . . . . . . . . . . . .
  317.             Text. . . . . . . . . . . . . . . . . . . . . . . . . . . .
  318.      Quick Reference: Alphabetical Listing. . . . . . . . . . . . . . .
  319.      pgArc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  320.      pgBMData . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  321.      pgBMEnd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  322.      pgBMInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  323.      pgCircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  324.      pgClearDrw . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  325.      pgClearViewPort. . . . . . . . . . . . . . . . . . . . . . . . . .
  326.      pgDrawText . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  327.      pgDrawTextXY . . . . . . . . . . . . . . . . . . . . . . . . . . .
  328.      pgEllArc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  329.      pgEllipse. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  330.      pgEndDrw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  331.      pgGetAbsX. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  332.      pgGetAbsY. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  333.      pgGetCharSpacing . . . . . . . . . . . . . . . . . . . . . . . . .
  334.      pgGetClipArea. . . . . . . . . . . . . . . . . . . . . . . . . . .
  335.      pgGetClipping. . . . . . . . . . . . . . . . . . . . . . . . . . .
  336.      pgGetColor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  337.      pgGetDevColors . . . . . . . . . . . . . . . . . . . . . . . . . .
  338.      pgGetDevHeight . . . . . . . . . . . . . . . . . . . . . . . . . .
  339.      pgGetDevMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . .
  340.      pgGetDevMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . .
  341.      pgGetDevModes. . . . . . . . . . . . . . . . . . . . . . . . . . .
  342.      pgGetDevOffsetX. . . . . . . . . . . . . . . . . . . . . . . . . .
  343.      pgGetDevOffsetY. . . . . . . . . . . . . . . . . . . . . . . . . .
  344.      pgGetDevPlanes . . . . . . . . . . . . . . . . . . . . . . . . . .
  345.      pgGetDevResX . . . . . . . . . . . . . . . . . . . . . . . . . . .
  346.      pgGetDevResY . . . . . . . . . . . . . . . . . . . . . . . . . . .
  347.      pgGetDevType . . . . . . . . . . . . . . . . . . . . . . . . . . .
  348.      pgGetDevWidth. . . . . . . . . . . . . . . . . . . . . . . . . . .
  349.      pgGetFillMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
  350.      pgGetFillPattern . . . . . . . . . . . . . . . . . . . . . . . . .
  351.      pgGetFillStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  352.      pgGetLinePattern . . . . . . . . . . . . . . . . . . . . . . . . .
  353.      pgGetLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  354.      pgGetLineWeight. . . . . . . . . . . . . . . . . . . . . . . . . .
  355.      pgGetMaxX. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  356.      pgGetMaxY. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  357.      pgGetStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . .
  358.      pgGetTextBolding . . . . . . . . . . . . . . . . . . . . . . . . .
  359.      pgGetTextHeight. . . . . . . . . . . . . . . . . . . . . . . . . .
  360.      pgGetTextJustify . . . . . . . . . . . . . . . . . . . . . . . . .
  361.      pgGetTextLength. . . . . . . . . . . . . . . . . . . . . . . . . .
  362.      pgGetTextOrient. . . . . . . . . . . . . . . . . . . . . . . . . .
  363.      pgGetTextScaling . . . . . . . . . . . . . . . . . . . . . . . . .
  364.      pgGetTextStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  365.      pgGetViewPort. . . . . . . . . . . . . . . . . . . . . . . . . . .
  366.      pgGetX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  367.      pgGetY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  368.      pgInitDrw. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  369.      pgLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  370.      pgLineRel. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  371.      pgLineTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  372.      pgLoadDevInfo. . . . . . . . . . . . . . . . . . . . . . . . . . .
  373.      pgMoveRel. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  374.      pgMoveTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  375.      pgNewPage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  376.      pgOpenDrw. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  377.      pgPie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  378.      pgPolygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  379.      pgPolyLine . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  380.      pgRectangle. . . . . . . . . . . . . . . . . . . . . . . . . . . .
  381.      pgSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  382.      pgSetCharSpacing . . . . . . . . . . . . . . . . . . . . . . . . .
  383.      pgSetClipArea. . . . . . . . . . . . . . . . . . . . . . . . . . .
  384.      pgSetClipping. . . . . . . . . . . . . . . . . . . . . . . . . . .
  385.      pgSetColor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  386.      pgSetDefaults. . . . . . . . . . . . . . . . . . . . . . . . . . .
  387.      pgSetFillMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
  388.      pgSetFillPattern . . . . . . . . . . . . . . . . . . . . . . . . .
  389.      pgSetFillStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  390.      pgSetLinePattern . . . . . . . . . . . . . . . . . . . . . . . . .
  391.      pgSetLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  392.      pgSetLineWeight. . . . . . . . . . . . . . . . . . . . . . . . . .
  393.      pgSetPageForm. . . . . . . . . . . . . . . . . . . . . . . . . . .
  394.      pgSetPageMargins . . . . . . . . . . . . . . . . . . . . . . . . .
  395.      pgSetPageSize. . . . . . . . . . . . . . . . . . . . . . . . . . .
  396.      pgSetPalette . . . . . . . . . . . . . . . . . . . . . . . . . . .
  397.      pgSetPixel . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  398.      pgSetRgbPalette. . . . . . . . . . . . . . . . . . . . . . . . . .
  399.      pgSetTextBolding . . . . . . . . . . . . . . . . . . . . . . . . .
  400.      pgSetTextJustify . . . . . . . . . . . . . . . . . . . . . . . . .
  401.      pgSetTextOrient. . . . . . . . . . . . . . . . . . . . . . . . . .
  402.      pgSetTextScaling . . . . . . . . . . . . . . . . . . . . . . . . .
  403.      pgSetTextStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
  404.      pgSetViewPort  . . . . . . . . . . . . . . . . . . . . . . . . . .
  405.  
  406. APPENDICES
  407.  
  408.      A: Function Summary. . . . . . . . . . . . . . . . . . . . . . . .
  409.  
  410.  
  411.                        ******************************
  412.                        ** Chapter 1:  INTRODUCTION **
  413.                        ******************************
  414.  
  415.  
  416.      First, we would like to welcome you to the PGL ToolKit.  AnSoft is proud
  417.      to introduce the first professional quality set of libraries for producing
  418.      printer graphics.  We believe the ToolKit to be highly versatile and
  419.      comprehensive in its functionality.  PGL supports six major programming
  420.      languages (C, Pascal, Basic, Fortran, Assembly, and Clipper) and most
  421.      popular printers.
  422.  
  423.  
  424. PGL Overview
  425.  
  426.      The major features of the PGL ToolKit are:
  427.  
  428.      *    80+ function printer graphics library -- works very much like most
  429.           screen graphics libraries.
  430.  
  431.      *    Provides high resolution graphics output at the printer's full
  432.           resolution.
  433.  
  434.      *    Unlimited virtual drawing resolution up to 32767x32767 and 256
  435.           colors.
  436.  
  437.      *    Supports 28+ compiler versions and six programming languages
  438.           including C, Pascal, Basic, Fortran, Assembly, and Clipper.
  439.  
  440.      *    Supports most popular printers including Epson (9 and 24 pin) dot
  441.           matrix printers, HP LaserJet, DeskJet, PaintJet printers, PostScript
  442.           printers, PCX file output, and all printers capable of emulating a
  443.           supported printer.
  444.  
  445.      *    Operates independently or may be used in conjunction with any screen
  446.           graphics library.
  447.  
  448.      *    Using the printing utilities, you may preview your drawing file on
  449.           screen prior to printing.
  450.  
  451.      *    Produces high resolution printouts utilizing as little as 8K of
  452.           memory.
  453.  
  454.      *    Small linkable library (approximately 20K).
  455.  
  456.      *    Ability to print graphics from within your application by spawning
  457.           the GPU print utility or store your graphics commands in a vector
  458.           drawing file.  Stored graphics may be printed from outside your
  459.           application using either a command line utility or a menu driven
  460.           printing utility program.  Complete versatility is provided allowing
  461.           you to specify:
  462.  
  463.                Fully adjustable page margins
  464.                Predefined Half, Full, and Quarter page sizes
  465.                Portrait or Landscape page orientation
  466.                Normal or Reverse image printing
  467.                Multiple files
  468.                Multiple copies
  469.                Normal or High density mode for fill operations
  470.                Output at any valid printer resolution
  471.                Enable or Disable use of expanded memory (LIM 3.2 or above)
  472.                User adjustable memory requirements during printing
  473.  
  474.      *    Ability to print user generated bitmap images such as graphics
  475.           screens or off-screen bitmaps generated by third party graphics
  476.           libraries.
  477.  
  478.      *    Full support is provided for printing through a parallel or serial
  479.           port interface.
  480.  
  481.      *    Seven fully scalable stroked font sets including SMALL, SIMPLEX,
  482.           DUPLEX, TRIPLEX, GOTHIC, SCRIPT, and DUPLEX SCRIPT with unlimited
  483.           bolding of each font set.
  484.  
  485.      *    NO ROYALTIES!
  486.  
  487.  
  488. System Requirements
  489.  
  490.      The items listed below are considered to be a minimum operating environ-
  491.      ment for incorporating the ToolKit:
  492.  
  493.      *    An IBM PC, PS/2 or 100% compatible computer.
  494.  
  495.      *    A floppy drive or hard disk (hard disk is recommended).
  496.  
  497.      *    MS-DOS 2.1 or above.
  498.  
  499.      *    A supported compiler and printer.
  500.  
  501.  
  502. About This Manual
  503.  
  504.      This manual is setup to allow you to quickly start programming with PGL.
  505.      You need to read the chapters titled "INSTALLATION" and "QUICKSTART" to
  506.      get started.  The PGL product design philosophy is described in the
  507.      chapter "PGL PHILOSOPHY", followed by detailed programming instructions
  508.      in "PROGRAMMING WITH PGL".  Next, "WORKING WITH BITMAPS" is devoted
  509.      strictly to the issue of how to output a bitmapped image to the drawing
  510.      file for printing.  The chapter "PRINTING" then details the procedure for
  511.      obtaining high resolution printed output with PGL.  "SUPPORTED OUTPUT
  512.      DEVICES" describes the supported printers, file formats, and screen
  513.      drivers.  The screen drivers allow you to replay drawing files to the
  514.      screen.  These drivers are not intended to replace your screen graphics
  515.      libraries.  They simply allow you to preview a drawing file before
  516.      printing it.  Finally, "PGL TOOLKIT FUNCTION REFERENCE" describes each
  517.      graphics function provided with PGL.  The functions are listed
  518.      alphabetically.
  519.  
  520.  
  521. Registration
  522.  
  523.      It is extremely important that you register the PGL ToolKit by sending in
  524.      the accompanying registration form.  This will entitle you to technical
  525.      support and discounts on future products and upgrades.
  526.  
  527.  
  528. Technical Support
  529.  
  530.      We may be contacted at the following address and phone number:
  531.  
  532.                AnSoft, Inc.
  533.                8254 Stone Trail Court
  534.                Laurel, Maryland 20723 USA
  535.                Voice/FAX: (301) 470-2335
  536.  
  537.      You may call us by phone Monday through Friday from 9AM to 5PM EST, or
  538.      you may send a FAX or leave a message anytime.
  539.  
  540.  
  541.                        ******************************
  542.                        ** Chapter 2:  INSTALLATION **
  543.                        ******************************
  544.  
  545.  
  546.      You may utilize the installation program to prompt you for all necessary
  547.      information and automatically install the PGL ToolKit or you may install
  548.      PGL manually (see  Manual Installation  below ).  Before installing PGL
  549.      you should:
  550.  
  551.      *    Create a backup copy of the distribution diskettes and store the
  552.           originals in a safe place.
  553.  
  554.      *    Read the READ.ME file from the distribution diskettes for any changes
  555.           to the software and/or manual.
  556.  
  557.  
  558. Backup
  559.  
  560.      The distribution diskettes are DS, DD (360K) for 5.25" disks and DS, DD
  561.      (720K) for 3.5" disks.  You should make a backup copy of the distribution
  562.      diskettes before proceeding any further.  You may do this by using the
  563.      DOS DISKCOPY program.  This will copy all files, including those in
  564.      subdirectories, from our source disk to your destination disk.  Once
  565.      completed, you should work with the backup disks and place the originals
  566.      in a safe place.
  567.  
  568.      EXAMPLE:   C:\>DISKCOPY A: A:
  569.  
  570.  
  571. About the Distribution Disks
  572.  
  573.      The PGL ToolKit supports several languages.  The majority of you will
  574.      most likely use only one or two of these.  The following general
  575.      description should help you determine which files on the distribution
  576.      diskettes you need to install.
  577.  
  578.      All files located on the System Disk must be installed.  These files and
  579.      programs are language independent and include the device drivers, font
  580.      files, print utility programs, etc.
  581.  
  582.      The files which are language specific are grouped in individual sub-
  583.      directories on the Library Disk.  These subdirectories are logically
  584.      named C, PASCAL, FORTRAN, BASIC, and CLIPPER (Assembly programmers should
  585.      use the C libraries).  Within each subdirectory, there may or may not be
  586.      different libraries for different compilers in that language.  For
  587.      example, there are separate libraries for Microsoft Fortran and Lahey
  588.      Fortran. You should refer to the section on Include Files and Libraries
  589.      in the QUICKSTART chapter for further details about which compilers each
  590.      PGL library supports.  The installation program only needs to know which
  591.      compiler you are using.
  592.  
  593.  
  594. Automatic Installation
  595.  
  596.      An installation program is provided on the distribution diskettes.  To
  597.      install PGL, place the disk in drive A: and enter the commands:
  598.  
  599.      C:\>A:
  600.      A:\>INSTALL
  601.  
  602.      If you are installing from a different drive, simply substitute that
  603.      drive letter for A.  The installation program will prompt you for all
  604.      necessary information.  You may rerun the installation program at any
  605.      time to reinstall all files or select additional libraries to install.
  606.  
  607.  
  608. Manual Installation
  609.  
  610.      Manual installation of PGL requires you to read the Include Files and
  611.      Libraries section in the QUICKSTART chapter to help you decide which
  612.      libraries to install.  The PGL libraries are compressed into several
  613.      self-extracting archives.  You must copy these archives to your hard disk
  614.      and decompress the libraries as outlined below.  A listing of which
  615.      libraries are contained in each archive is listed below.  To install PGL
  616.      manually, perform the following steps, assuming the PGL diskettes use
  617.      drive A: and you are installing on the C: hard drive:
  618.  
  619.      1.   Create a PGL subdirectory on your hard disk.
  620.  
  621.                C:\>MD PGL
  622.                C:\>CD PGL
  623.  
  624.      2.   Copy the PGL system files archive and the READ.ME file from the
  625.           System Disk to the PGL directory.
  626.  
  627.                C:\PGL>COPY A:*.*
  628.  
  629.      3.   Decompress the PGL system files and delete the archive.  This will
  630.           extract all files from the archive.
  631.  
  632.                C:\PGL>PGLSYS
  633.                C:\PGL>DEL PGLSYS.EXE
  634.  
  635.      4.   Create a subdirectory for each language you wish to install.  As an
  636.           example, assume you wish to install libraries for Quick Basic.
  637.  
  638.                C:\PGL>MD QB
  639.                C:\PGL>CD QB
  640.  
  641.      5.   Copy the Quick Basic archives from the Library Disk's BASIC sub-
  642.           directory.  The Quick Basic archive names are listed below, as well
  643.           as for each language, and are PGL_QB.EXE, INC_BAS.EXE, and
  644.           EX_BAS.EXE.
  645.  
  646.                C:\PGL\QB>COPY A:\BASIC\PGL_QB.EXE
  647.                C:\PGL\QB>COPY A:\BASIC\INC_BAS.EXE
  648.                C:\PGL\QB>COPY A:\BASIC\EX_BAS.EXE
  649.  
  650.      6.   Decompress the self-extracting Quick Basic archives and delete the
  651.           archives.
  652.  
  653.                C:\PGL\QB>PGL_QB
  654.                C:\PGL\QB>DEL PGL_QB.EXE
  655.  
  656.                C:\PGL\QB>INC_BAS
  657.                C:\PGL\QB>DEL INC_BAS.EXE
  658.  
  659.                C:\PGL\QB>EX_BAS
  660.                C:\PGL\QB>DEL EX_BAS.EXE
  661.  
  662.      7.   You must modify your AUTOEXEC.BAT file to include the PGL environment
  663.           variable.  If you installed the PGL system files in C:\PGL, then add
  664.           the following line to your AUTOEXEC.BAT file.
  665.  
  666.                SET PGL=C:\PGL
  667.  
  668.      The above procedure manually installs a single language, BASIC in this
  669.      example.  The procedure is the same for each language you wish to
  670.      install.  Again, the names of the libraries, include files, and example
  671.      files used by each language are listed in the section Include Files and
  672.      Libraries in the QUICKSTART chapter.  A listing of archives is given
  673.      below in Languages and Archives.
  674.  
  675.  
  676. Languages and Archives
  677.  
  678.      C/C++
  679.  
  680.           Turbo C 1.x, 2.0, Turbo C++ 1.0, Borland C++ 2.0
  681.           Microsoft C 5.x, 6.x, Quick C 1.x, 2.x
  682.           WATCOM 7.0, 8.x
  683.  
  684.                PGL_CL.EXE
  685.                INC_CL.EXE
  686.                EX_CL.EXE
  687.  
  688.  
  689.      Fortran
  690.  
  691.           Microsoft Fortran 3.x, 4.x, 5.x
  692.  
  693.                PGL_MF.EXE
  694.                INC_FOR.EXE
  695.                EX_FOR.EXE
  696.  
  697.           Lahey Fortran 3.x, 4.x, 5.x
  698.  
  699.                PGL_LF.EXE
  700.                INC_FOR.EXE
  701.                EX_FOR.EXE
  702.  
  703.  
  704.      Pascal
  705.  
  706.           Turbo Pascal 4.x, 5.x, 6.0
  707.  
  708.                PGL_TP.EXE
  709.                INC_TP.EXE
  710.                EX_TP.EXE
  711.      Basic
  712.  
  713.           Microsoft Quick Basic 4.x, Basic PDS 6.0
  714.  
  715.                PGL_QB.EXE
  716.                INC_BAS.EXE
  717.                EX_BAS.EXE
  718.  
  719.           Microsoft Basic PDS 7.x
  720.  
  721.                PGL_B7.EXE
  722.                INC_BAS.EXE
  723.                EX_BAS.EXE
  724.  
  725.  
  726.      Clipper
  727.  
  728.           Clipper '87
  729.  
  730.                PGL_CL87.EXE
  731.                INC_CLIP.EXE
  732.                EX_CLIP.EXE
  733.  
  734.           Clipper 5.x
  735.  
  736.                PGL_CL5.EXE
  737.                INC_CLIP.EXE
  738.                EX_CLIP.EXE
  739.  
  740.  
  741.                         ****************************
  742.                         ** Chapter 3:  QUICKSTART **
  743.                         ****************************
  744.  
  745.  
  746.      We assume the majority of you programming for printer graphics have
  747.      previous experience working with screen graphics libraries or at least a
  748.      working knowledge of computer graphics in general.  With this in mind,
  749.      this chapter is intended to provide the experienced programmer with the
  750.      necessary information to quickly get started programming or integrating
  751.      the ToolKit into existing applications.  For those less experienced
  752.      programmers, a more comprehensive discussion on programming with PGL is
  753.      provided in Chapter 5.
  754.  
  755.      All development libraries adopt a design philosophy as to how they work
  756.      -- PGL is no different in this respect.  For example, some printer
  757.      graphics libraries allow you to address one device at a time whether it
  758.      be the screen or printer, others can only print from a virtual bitmap
  759.      generated off-screen which requires you to have enough free memory to
  760.      create the bitmap.  Whatever the design philosophy, the capabilities and
  761.      limitations of any third party library will undoubtedly influence how you
  762.      design your program.  We highly recommend that you also read Chapter 4 on
  763.      "PGL PHILOSOPHY" before integrating PGL into your application.
  764.  
  765.  
  766. Supported Compilers
  767.  
  768.      As of the writing of this manual, the following is a list of compilers
  769.      and their versions which PGL is known to be compatible with.  These are:
  770.  
  771.      C              Microsoft C 5.x, 6.x
  772.                     Quick C 1.x, 2.x
  773.                     Turbo C 1.x, 2.0
  774.                     Turbo C++ 1.0
  775.                     Borland C++ 2.0
  776.                     WATCOM C 7.0, 8.x
  777.  
  778.      PASCAL         Turbo Pascal 4.x, 5.x, 6.x
  779.  
  780.      BASIC          Microsoft Basic PDS 6.x, 7.x
  781.                     Quick Basic 4.x
  782.  
  783.      FORTRAN        Lahey Fortran F77L 3.x, 4.x, 5.x
  784.                     Microsoft Fortran 3.x, 4.x, 5.x
  785.  
  786.      CLIPPER        Clipper '87, 5.x
  787.  
  788.      ASSEMBLY       Microsoft Assembler 4.x, 5.x, 6.x
  789.                     Turbo Assembler 1.0, 2.x
  790.  
  791.      The PGL linkable libraries, for the most part, simply write binary
  792.      graphics codes to a drawing file.  As such, we expect PGL to be
  793.      compatible with any compiler that can use Microsoft format object modules
  794.      and uses either the C, Fortran, Basic, or Pascal calling convention.  The
  795.      compilers listed above are simply the ones we have tested thus far.  Refer
  796.      to the READ.ME file for an up-to-date listing.
  797.  
  798.  
  799. Function Naming Convention
  800.  
  801.      All PGL functions are prefaced with the letters pg, short for printer
  802.      graphics.  This is a standard practice among developers of third party
  803.      libraries in order to avoid possible conflicts with function names.  We
  804.      have made a conscious effort to provide function names which are somewhat
  805.      self-descriptive and have adhered, for the most part, to utilizing names
  806.      similar to those found in other graphics libraries in order to minimize
  807.      confusion and get you up and programming as quickly as possible.
  808.  
  809.      The function names are identical for all languages except Clipper.  It
  810.      was necessary to abbreviate Clipper function names due to the limitation
  811.      imposed by Clipper of allowing no more than 10 characters for variable
  812.      and function names.
  813.  
  814.  
  815. Strings
  816.  
  817.      For the Microsoft Fortran interface, strings are required to be passed in
  818.      a C compatible format (i.e. they must be NULL terminated).  This is
  819.      accomplished by appending a C or a NULL character at the end of all
  820.      strings just after the closing single quote mark.  Note that this format
  821.      is only used by Microsoft Fortran.
  822.  
  823.      EXAMPLE:    CALL pgDrawText( 'String'C )
  824.  
  825.      For the Lahey Fortran interface, strings are not required to be NULL
  826.      terminated.  This may cause problems if you try to justify text but pass
  827.      a string containing trailing blank characters.  The ToolKit performs a
  828.      backwards search for the first non-blank or NULL character.  Text
  829.      justification is then based on the length of the remaining string.  If
  830.      you intend your strings to have trailing blanks, you should NULL
  831.      terminate the string with CHAR(0).
  832.  
  833.      EXAMPLE:    CALL pgDrawText( 'String   '//CHAR(0) )
  834.  
  835.      This string format is supported by both Lahey and Microsoft Fortran.
  836.  
  837.  
  838. Error Handling
  839.  
  840.      The majority of PGL functions do not return an error code.  This is due
  841.      to the fact that these functions, for the most part, simply write binary
  842.      graphics codes to a file.  When errors do occur, they are most likely
  843.      related to an I/O problem.  PGL does, however, set an internal error flag.
  844.      You may use the pgGetStatus function to return the current error status
  845.      as an aid in debugging.  You should call the pgGetStatus function from
  846.      time to time just to be sure no disk I/O errors have occurred.  If
  847.      pgGetStatus returns a non-zero value, all PGL knows is that a disk I/O
  848.      error (such as "disk full") occurred.  Each time pgGetStatus is called,
  849.      the internal error flag is reset to 0.
  850.  
  851.  
  852. Integrating the PGL Library
  853.  
  854.      When dealing with a new graphics library, it is often helpful to know how
  855.      to properly initialize and end a graphics session.  The following code
  856.      stubs should help the experienced graphics programmer quickly get started
  857.      integrating PGL.
  858.  
  859.  
  860.      C              #include "c:\pgl\c\pgl.h"
  861.                     int ierr;
  862.  
  863.                     pgInitDrw( "test.plt", 2000, 2000, &ierr );
  864.                     ...
  865.                     Your graphics commands for page 1
  866.                     ...
  867.                     pgNewPage();
  868.                     ...
  869.                     Your graphics commands for page 2
  870.                     ...
  871.                     pgEndDrw();
  872.  
  873.      FORTRAN        include 'c:\pgl\for\pgl.for'
  874.                     integer*2 ierr
  875.                     call pgInitDrw( 'test.plt'//char(0), 2000, 2000, ierr )
  876.                     ...
  877.                     Your graphics commands for page 1
  878.                     ...
  879.                     call pgNewPage
  880.                     ...
  881.                     Your graphics commands for page 2
  882.                     ...
  883.                     call pgEndDrw
  884.  
  885.      PASCAL         uses PGL
  886.                     var
  887.                     ierr : integer;
  888.                     pgInitDrw( 'test.plt', 2000, 2000, ierr );
  889.                     ...
  890.                     Your graphics commands for page 1
  891.                     ...
  892.                     pgNewPage;
  893.                     ...
  894.                     Your graphics commands for page 2
  895.                     ...
  896.                     pgEndDrw;
  897.  
  898.      BASIC          '$INCLUDE: 'C:\PGL\BAS\PGL.BAS'
  899.                     call pgInitDrw( "test.plt", 2000, 2000, ierr% )
  900.                     ...
  901.                     Your graphics commands for page 1
  902.                     ...
  903.                     call pgNewPage
  904.                     ...
  905.                     Your graphics commands for page 2
  906.                     ...
  907.                     call pgEndDrw
  908.  
  909.  
  910.      CLIPPER        SET PROCEDURE TO PGL
  911.                     DO PGLINIT
  912.                     PUBLIC ierr
  913.                     pgINIT( "test.plt", 2000, 2000, @ierr )
  914.                     ...
  915.                     Your graphics commands for page 1
  916.                     ...
  917.                     pgNEWPG()
  918.                     ...
  919.                     Your graphics commands for page 2
  920.                     ...
  921.                     pgEND()
  922.  
  923.  
  924.      The pgInitDrw command initializes all internal PGL drawing parameters to
  925.      their default values and allows you to specify the file name for storing
  926.      drawing commands and the virtual drawing resolution you wish to work with.
  927.      Then simply call those functions necessary to create your drawing.  When
  928.      your drawing is complete, call pgNewPage to force a page eject, then
  929.      continue drawing to the next page.  The pgEndDrw function is called to
  930.      close the drawing file opened by pgInitDrw.  You may then exit your
  931.      application or call pgInitDrw again to initialize another drawing file
  932.      and continue.  The pgEndDrw function automatically calls pgNewPage,
  933.      therefore you do not need to explicitly call pgNewPage for a single page
  934.      of printout or for your last page of printout.  Doing so will simply
  935.      cause an extra blank page to be printed.
  936.  
  937.  
  938. Include Files and Libraries
  939.  
  940.      C Language
  941.  
  942.           C programmers should use the PGL_CL.LIB library and the PGL.H
  943.           include file.  This library is memory model independent and may be
  944.           used with either SMALL, MEDIUM, or LARGE memory model programs.  All
  945.           functions in the C library are called as FAR functions and all data
  946.           pointers and addresses are passed as FAR pointers and addresses.
  947.           This library utilizes the Microsoft Large Memory Model for data and
  948.           code.  If you are using a C compiler not specifically listed as
  949.           being supported by PGL, you must be sure that the ds register
  950.           contains the segment address of the default data segment (DGROUP)
  951.           before calling a PGL function.  The PGL_CL.LIB library may be used
  952.           with Microsoft C, Quick C, WATCOM C, Turbo C/C++, and Borland C++.
  953.  
  954.  
  955.      Fortran Language
  956.  
  957.           Lahey Fortran 3.x, 4.x, and 5.x programmers should use the PGL_LF.LIB
  958.           library and the PGL.FOR include file.  Microsoft Fortran 3.x, 4.x,
  959.           and 5.x programmers should use the PGL_MF.LIB library and the PGL.FOR
  960.           include file.  The Microsoft Fortran library must be used with LARGE
  961.           memory model programs.  Strings should be NULL terminated by
  962.           appending a CHAR(0) at the end of the string or by using the
  963.           Microsoft C string notation, i.e.
  964.  
  965.                MYSTRING = 'ABCDEFGH'//CHAR(0) ! Standard Fortran
  966.                MYSTRING = 'ABCDEFGH'C         ! Microsoft Fortran
  967.  
  968.  
  969.      Pascal Language
  970.  
  971.           Turbo Pascal 6.0 programmers should use the PGL.TPU unit.  This unit
  972.           was compiled with Turbo Pascal 6.0.  If you use another version of
  973.           Turbo Pascal, you must recompile the file PGL.PAS with the PGL_TP.OBJ
  974.           and PGLIO.OBJ files to create a new PGL.TPU unit for your version of
  975.           Turbo Pascal.
  976.  
  977.  
  978.      Basic Language
  979.  
  980.           Quick Basic 4.x and Basic 6.0 programmers should use the PGL_QB.LIB
  981.           library and the PGL.BAS include file.  Basic 7.x programmers should
  982.           use the PGL_B7.LIB library and the PGL.BAS include file.
  983.  
  984.  
  985.      Clipper Language
  986.  
  987.           Clipper '87 programmers should use the PGL_CL87.LIB library and the
  988.           PGL.PRG include file.  Clipper 5.x programmers should use the
  989.           PGL_CL5 library and the PGL.PRG include file.  Clipper functions
  990.           which return data via PROCEDURE CALLS should pass arguments by
  991.           reference as shown in the function description.  The Clipper
  992.           procedure prototypes indicate this by using the symbol <ref> prior
  993.           to the argument, e.g.
  994.  
  995.           PROCEDURE pgGVIEWP( <ref>x0, <ref>y0, <ref>x1, <ref>y1 )
  996.  
  997.           Sample Call:       PUBLIC x0, y0, x1, y1
  998.                              pgGVIEWP( @x0, @y0, @x1, @y1 )
  999.  
  1000.  
  1001.      Assembly Language
  1002.  
  1003.           Assembly language programmers should use the PGL_CL.LIB library.
  1004.           All functions are FAR functions and use the C calling conventions.
  1005.           Addresses and pointers are FAR addresses and pointers.  The caller
  1006.           pops all arguments pushed on the stack prior to each call.  The
  1007.           memory model is setup like the Microsoft Large Memory Model.  The
  1008.           ds register must point to the default data segment (DGROUP).  The
  1009.           functions freely modify the ax, bx, cx, dx, and es registers.  The
  1010.           functions preserve the bp, sp, si, di, and ds registers and return
  1011.           16 bit integers in the ax register.
  1012.  
  1013.  
  1014. Compiling and Linking
  1015.  
  1016.      The ToolKit requires no special handling to build applications.  In C,
  1017.      FORTRAN, and BASIC, you must use an include statement to incorporate the
  1018.      ToolKit constant definitions and prototypes into your program.  The
  1019.      include statement tells your compiler how each function works and the
  1020.      value of any ToolKit manifest constants.  If you use Turbo Pascal, you
  1021.      must be sure to use the 'Uses PGL' command.  If you program in Clipper,
  1022.      you must include the following two commands at the top of your source
  1023.      file:
  1024.  
  1025.           SET PROCEDURE TO PGL
  1026.           DO PGLINIT
  1027.  
  1028.      To link with the ToolKit, you must include the appropriate library name
  1029.      in the library section of your link command.  The ToolKit provides
  1030.      libraries in standard Microsoft format.
  1031.  
  1032.  
  1033. Quick Libraries
  1034.  
  1035.      If you program in Quick Basic and want a Quick library, you must build it
  1036.      yourself.  You should refer to your documentation on building Quick
  1037.      libraries.  Listed below are example commands required to build Quick
  1038.      libraries for the various versions of Quick Basic:
  1039.  
  1040.      Quick Basic 4.0
  1041.  
  1042.           LINK PGL_QB.LIB, PGL_QB /Q,,BQLB40;
  1043.  
  1044.      Quick Basic 4.5
  1045.  
  1046.           LINK PGL_QB.LIB, PGL_QB /Q,,BQLB45;
  1047.  
  1048.      QBX
  1049.  
  1050.           LINK PGL_B7.LIB, PGL_B7 /Q,,QBXQLB;
  1051.  
  1052.      When using the Quick Basic environment, you must still use the BASIC
  1053.      PGL.BAS include file and load the Quick library when you start Quick
  1054.      Basic as follows:
  1055.  
  1056.           QB FILLPAT /LPGL_QB.QLB   ; Quick Basic 4.x
  1057.           QB FILLPAT /LPGL_B7.QLB   ; Quick Basic 7.x
  1058.  
  1059.  
  1060. Example Programs
  1061.  
  1062.      The ToolKit includes several example programs that demonstrate the proper
  1063.      usage of the basic functions.  A set of examples is provided for each
  1064.      language.  Assembly language programmers should refer to the C language
  1065.      examples.  Also included are the corresponding drawing files generated
  1066.      by each example program.  You may print these drawing files with the GPU,
  1067.      GPMENU, and PGL2PS printing utility programs.
  1068.  
  1069.  
  1070. No Royalties
  1071.  
  1072.      As spelled out in the License Agreement, there are no royalties associated
  1073.      with the PGL ToolKit.  You may distribute the printing utility programs,
  1074.      device drivers, and font files royalty free with any executable program
  1075.      you create.  You may not distribute any of the libraries under any
  1076.      circumstance.
  1077.  
  1078.  
  1079.                       ********************************
  1080.                       ** Chapter 4:  PGL PHILOSOPHY **
  1081.                       ********************************
  1082.  
  1083.  
  1084.      This chapter deals with the design philosophy of the PGL ToolKit.  The
  1085.      capabilities and limitations of the ToolKit are briefly outlined.  The
  1086.      purpose of this chapter is to provide a general outline of how PGL
  1087.      operates, therefore, the issues discussed here are presented in broad
  1088.      terms.  Each topic is presented in more detail in the next chapter and
  1089.      in the individual function descriptions.
  1090.  
  1091.  
  1092. Design Philosophy
  1093.  
  1094.      In developing the ToolKit, our goal was to provide a set of libraries
  1095.      which meet the following criteria:
  1096.  
  1097.      *    Support multiple languages so as to allow you to select and work
  1098.           with the one most suited to your application.
  1099.  
  1100.      *    Operate independently of other libraries so that PGL may be used
  1101.           stand-alone or in conjunction with any third party screen graphics
  1102.           library.
  1103.  
  1104.      *    Provide a printing environment with a high level of versatility to
  1105.           allow you full control of the printing process.
  1106.  
  1107.      *    Provide the capability to print bitmapped images generated by other
  1108.           third party graphics libraries.
  1109.  
  1110.      *    Provide a set of graphics functions rivaling those of most popular
  1111.           screen graphics libraries.
  1112.  
  1113.      *    Be able to print interactively from within your application and save
  1114.           the graphics in an industry standard 'MetaFile' style drawing file
  1115.           and print them from outside your application.
  1116.  
  1117.      *    Give you a user friendly printing environment by providing a menu
  1118.           driven printing utility program.
  1119.  
  1120.      *    Provide fast high resolution graphics output on a wide variety of
  1121.           popular printers.
  1122.  
  1123.      *    Support most popular printer devices.
  1124.  
  1125.      We believe we have met the above design criteria with the PGL ToolKit.
  1126.      We realize, however, that we could not have possibly anticipated every
  1127.      feature you would like to have at your disposal.  We welcome any
  1128.      suggestions you can give us as to how we may evolve the ToolKit further.
  1129.  
  1130.  
  1131. Capabilities
  1132.  
  1133.      The ToolKit provides 80+ functions which allow you to move the cursor,
  1134.      set a virtual drawing resolution, draw lines, draw filled figures (e.g.
  1135.      rectangles, ellipses, pie slices, polygons, etc.), set and clear
  1136.      viewports, set clipping regions, and a number of graphics text functions
  1137.      for rendering any of seven fully scalable font sets.  The majority of
  1138.      these are, by today's standard, considered to be common features in most
  1139.      graphics libraries.
  1140.  
  1141.      Most screen graphics libraries provide you with a command to initialize
  1142.      the graphics and automatically detect the highest video mode to work with.
  1143.      Where printer graphics are concerned, often times you may not be
  1144.      connected to a printer or you may not know what printers will be available
  1145.      to your end users.  PGL is designed to allow your application to run
  1146.      whether or not you are connected to a printer device.  You may specify
  1147.      any virtual drawing resolution up to 32767x32767 convenient for your
  1148.      application.  The virtual drawing resolution is nothing more than an
  1149.      imaginary set of horizontal and vertical pixels.  When you print, PGL
  1150.      handles the transformation from your virtual resolution to the printer's
  1151.      resolution taking into account the page margins, page size, and page
  1152.      orientation (landscape or portrait).
  1153.  
  1154.      Since PGL maps your virtual drawing resolution to the actual printable
  1155.      region, this allows you to develop general applications without regard to
  1156.      how drawing files will be printed, thereby, providing you with device
  1157.      independence.  As an example, suppose you were to define a virtual
  1158.      resolution and draw a rectangle framing the upper-left quadrant of this
  1159.      region.  You may print the drawing using various combinations of output
  1160.      device, page margins, size, layout, and printer resolution mode.  The
  1161.      resulting outputs will show rectangles of different sizes, but the
  1162.      rectangle will always exactly frame the upper-left quadrant of the
  1163.      printable region.  The drawback to providing you with device independence
  1164.      is that aspect ratios are not maintained as this example clearly shows.
  1165.      Refer to the chapter on "PROGRAMMING WITH PGL" for a detailed discussion
  1166.      on the subject of maintaining aspect ratios.
  1167.  
  1168.      Often times, you may prefer to work with the exact drawing resolution you
  1169.      will be printing at.  If you know exactly how you will print (i.e. page
  1170.      margins, orientation, size, resolution, etc.) and you know which output
  1171.      device you will use, then you may load the information for that device
  1172.      with the appropriate print parameters and use the Device Information
  1173.      functions to return the exact pixel height and width of the drawing
  1174.      region, then simply initialize PGL with those values.
  1175.  
  1176.      PGL offers you the option of opening a new file for storing graphics
  1177.      commands or opening an existing drawing file for appending new graphics
  1178.      commands to.  There are certain limitations when working with existing
  1179.      drawing files (see discussion below).
  1180.  
  1181.      Some screen graphics packages, such as the Genus GX and MetaWINDOW
  1182.      graphics libraries, allow you to create off-screen bitmap images of any
  1183.      virtual size.  If you are using such a package, you may wish to print
  1184.      the bitmap directly, thereby, using one graphics engine to create images
  1185.      for both the screen and printer.  You may also print screen images using
  1186.      the ToolKit.  You should refer to the chapter on "WORKING WITH BITMAPS"
  1187.      for a detailed discussion on how to do this.
  1188.  
  1189.  
  1190. Limitations
  1191.  
  1192.      Printer graphics are inherently different from screen graphics.  As such,
  1193.      there are certain limitations which you should be aware of.  Specifically,
  1194.      there are three limitations discussed here, all of which are related to
  1195.      the fact that when PGL functions are called, we simply write the
  1196.      corresponding graphics codes to a file -- we are not generating the bitmap
  1197.      off-screen at this time.  PGL creates drawing files which are similar to
  1198.      industry standard MetaFiles.
  1199.  
  1200.      First of all, unlike screen graphics, when PGL functions are called, the
  1201.      bitmap image is not immediately created, but rather, the corresponding
  1202.      graphics codes are written to the drawing file specified in your call to
  1203.      pgInitDrw or pgOpenDrw.  The bitmap images of your drawings are only
  1204.      created when you print the drawing file.  This is not so much a
  1205.      limitation as it is a consideration when you design your application.
  1206.      Once PGL functions are called, the corresponding drawings will be created
  1207.      when you print the file. Therefore, if your application is such that you
  1208.      prompt the user as to whether or not hardcopies are desired, you must
  1209.      incorporate the appropriate logic in your program to determine when PGL
  1210.      functions are to be called and when drawing files should be printed.
  1211.  
  1212.      Secondly, since PGL does not generate the bitmap off-screen as functions
  1213.      are called, it is impossible to perform floodfill operations.  For the
  1214.      same reason, information about specific pixels are not available,
  1215.      therefore, there is no function to return the value of a pixel.
  1216.  
  1217.      The third limitation is that no functions are provided to get and set the
  1218.      background color.  If you desire a background color other than the color
  1219.      of the paper (usually white), you may do so by using a rectangular fill
  1220.      operation.
  1221.  
  1222.      PGL offers you the option of opening new drawing files with the pgInitDrw
  1223.      command or existing drawing files with the pgOpenDrw command.  If you
  1224.      open an existing drawing file, all function calls for the current session
  1225.      are appended to the end of the file.  When working with existing drawing
  1226.      files, you will need to know the virtual resolution associated with the
  1227.      file when it was originally created.  You may use pgGetMaxX and pgGetMaxY
  1228.      to return the maximum addressable horizontal and vertical pixel,
  1229.      respectively.  All new drawings you generate must be based on this
  1230.      virtual resolution.  Also when working with existing drawing files, the
  1231.      graphics state at the end of the previous session is no longer valid.
  1232.      We leave it up to you to set the desired graphics state for the current
  1233.      session (i.e., drawing color, fill style, line style, viewport, clipping
  1234.      region, etc.).
  1235.  
  1236.  
  1237.                      **************************************
  1238.                      ** Chapter 5:  PROGRAMMING WITH PGL **
  1239.                      **************************************
  1240.  
  1241.  
  1242. Supported Compilers
  1243.  
  1244.      As of the writing of this manual, the following is a list of compilers
  1245.      and their versions which PGL is known to be compatible with.  These are:
  1246.  
  1247.      C                    Microsoft C 5.x, 6.x
  1248.                           Quick C 1.x, 2.x
  1249.                           Turbo C 1.x, 2.0
  1250.                           Turbo C++ 1.0
  1251.                           Borland C++ 2.0
  1252.                           WATCOM C 7.0, 8.x
  1253.  
  1254.      PASCAL               Turbo Pascal 4.x, 5.x, 6.x
  1255.  
  1256.      BASIC                Microsoft Basic PDS 6.x, 7.x
  1257.                           Quick Basic 4.x
  1258.  
  1259.      FORTRAN              Lahey Fortran F77L 3.x, 4.x, 5.x
  1260.                           Microsoft Fortran 3.x, 4.x, 5.x
  1261.  
  1262.      CLIPPER              Clipper '87, 5.x
  1263.  
  1264.      ASSEMBLY             Microsoft Assembler 4.x, 5.x, 6.x
  1265.                           Turbo Assembler 1.0, 2.x
  1266.  
  1267.      The PGL linkable libraries, for the most part, simply write binary
  1268.      graphics codes to a drawing file.  As such, we expect PGL to be
  1269.      compatible with any compiler that can use Microsoft format object modules
  1270.      and uses either the C, Fortran, Basic, or Pascal calling convention.
  1271.      The compilers listed above are simply the ones we have tested thus far.
  1272.      Refer to the READ.ME file for an up-to-date listing.
  1273.  
  1274. Function Naming Convention
  1275.  
  1276.      All PGL functions are prefaced with the letters pg, short for printer
  1277.      graphics.  This is a standard practice among developers of third party
  1278.      libraries in order to avoid possible conflicts with function names.  We
  1279.      have made a conscious effort to provide function names which are
  1280.      somewhat self-descriptive and have adhered, for the most part, to
  1281.      utilizing names similar to those found in other graphics libraries in
  1282.      order to minimize confusion and get you up and programming as quickly as
  1283.      possible.
  1284.  
  1285.      The function names are identical for all languages except Clipper.  It
  1286.      was necessary to abbreviate Clipper function names due to the limitation
  1287.      imposed by Clipper of allowing no more than 10 characters for variable
  1288.      and function names.
  1289.  
  1290.  
  1291. Coordinate System
  1292.  
  1293.      The PGL coordinate system is like that of most other graphics libraries.
  1294.      The logical origin (0,0) is located at the upper-left hand corner of the
  1295.      page with X coordinates increasing horizontally from left to right and Y
  1296.      coordinates increasing vertically from top to bottom.  X coordinates are
  1297.      always in the horizontal direction and Y coordinates are always in the
  1298.      vertical direction regardless of whether you are printing in the
  1299.      landscape or portrait mode.
  1300.  
  1301.      Individual pixels are addressed beginning with 0.  For example, if you
  1302.      specify a virtual resolution of 2000x3000, X pixels range from 0-1999 and
  1303.      Y pixels range from 0-2999.
  1304.  
  1305.      There are two types of coordinate systems provided by the ToolKit.  These
  1306.      are the absolute virtual and viewport systems.  The absolute virtual
  1307.      coordinate system is defined by calling pgInitDrw and passing it as
  1308.      arguments the maximum number of horizontal and vertical addressable pixels
  1309.      up to 32767x32767.  This is a fictitious resolution, hence, the term
  1310.      virtual coordinates.  The logical origin (0,0) is located at the upper-
  1311.      left hand corner of the page regardless of whether the page orientation
  1312.      is portrait or landscape.  All subsequent graphics coordinates are
  1313.      specified relative to this point until you define a viewport.
  1314.  
  1315.      The second type of coordinate system is the viewport system.  You may use
  1316.      the pgSetViewPort command to define a rectangular region on the page for
  1317.      displaying graphics.  This region is generally smaller than that defined
  1318.      by the absolute virtual coordinate system.  Once defined, the logical
  1319.      origin becomes the upper-left hand corner of the viewport.  All
  1320.      subsequent graphics coordinates are specified relative to this point
  1321.      until the viewport is changed by another call to pgSetViewPort.
  1322.  
  1323.  
  1324. Virtual Drawing Resolution
  1325.  
  1326.      When dealing with screen graphics libraries, you are limited to working
  1327.      with a fixed set of resolutions supported by the library and your graphics
  1328.      system.  This is not the case when working with printer graphics.  Each
  1329.      printer obviously has a maximum resolution which you may work with,
  1330.      however, you may change the resolution of the printable region simply by
  1331.      changing the page margins.  In other words, if you specify a larger
  1332.      margin, then the number of pixels you may draw to is smaller.  There are
  1333.      thousands of combinations of margins that may be set, far too many to
  1334.      include in the ToolKit and we did not wish to limit you to printing with
  1335.      a fixed number of preset margins.
  1336.  
  1337.      The ToolKit allows you to define a virtual drawing resolution to work
  1338.      with.  Virtual drawing resolutions are nothing more than an imaginary set
  1339.      of (x,y) pixels.  When printing, we simply perform a linear transformation
  1340.      from your virtual drawing resolution to the resolution of the printable
  1341.      region on the page.  Virtual drawing resolutions are set with the
  1342.      pgInitDrw function.
  1343.  
  1344.      You should always work with a relatively large virtual drawing resolution
  1345.      (on the order of 2000x2000 or greater).  The reason for this is that
  1346.      printer resolutions are much higher than screen resolutions.  For example,
  1347.      laserjets provide 300 dots per inch in the high resolution mode.  Printing
  1348.      in landscape mode and allowing for one inch borders on all sides gives
  1349.      you a drawing region of 9" by 6.5".  This translates to a drawing
  1350.      resolution of 2700 by 1950 pixels at 300 dots per inch.  If you work with
  1351.      a virtual drawing resolution much smaller than the resolution at which
  1352.      you will be printing, then you are not taking full advantage of the high
  1353.      resolution capability of your printer.
  1354.  
  1355.  
  1356. Aspect Ratio
  1357.  
  1358.      An inherent problem in working with virtual drawing resolutions is that
  1359.      aspect ratios are not maintained.  You may correct for the aspect ratio,
  1360.      but, there are two factors which you must take into consideration.  First,
  1361.      suppose you were to specify a virtual drawing resolution of 2000x2000
  1362.      pixels and outline the region using line draws.  Since the specified
  1363.      resolution is square, you might expect the printout to also be a square.
  1364.      This is not the case.  Consider what happens if you were to print the
  1365.      drawing with the settings mentioned in the previous section giving you a
  1366.      printer resolution of 2700x1950 pixels.  At print time, PGL will map the
  1367.      2000x2000 virtual drawing resolution pixels to the 2700x1950 printer
  1368.      resolution pixels.  This means that your 2000x2000 virtual square will
  1369.      actually print as a 2700x1950 rectangle.  One solution is to adjust the
  1370.      page margins such that the printer resolution matches the virtual drawing
  1371.      resolution.  If you want your printouts to be a certain size, you could,
  1372.      alternatively, specify a virtual drawing resolution which matches the
  1373.      printer resolution (see discussion below).  Matching the virtual drawing
  1374.      resolution with the printer resolution (or vice versa) may not be
  1375.      sufficient to maintain aspect ratios as will be explained below.
  1376.  
  1377.      The second factor you must consider is the aspect ratio of the printer or
  1378.      output device.  Printers simply address a series of horizontal and
  1379.      vertical pixels which can be "lit" to create your drawing.  The physical
  1380.      spacing between horizontal pixels compared with that of vertical pixels
  1381.      for a particular resolution mode determines the printer's aspect ratio.
  1382.      For example, most laserjet printers provide 300 by 300 dots per inch in
  1383.      the high resolution mode, or simply, just 300 dpi (specifications which
  1384.      list a single dpi measure usually apply to both directions).  This
  1385.      translates to 300:300 or a 1:1 aspect ratio (i.e., 300 consecutive pixels
  1386.      horizontally measures exactly 1" as does 300 consecutive vertical pixels).
  1387.      Not all printers have 1:1 aspect ratios as is the case with many dot
  1388.      matrix printers.  As an example, Epson LQ printers have a dpi
  1389.      specification of 360 by 180 in the high resolution mode which translates
  1390.      to an aspect ratio of 2:1.  This means that a 1" horizontal line
  1391.      consists of 360 pixels, whereas, a 1" vertical line consists of only 180
  1392.      pixels.  You should be aware that printer aspect ratios may vary for
  1393.      different resolution modes.  In low resolution mode, the Epson LQ has a
  1394.      dpi specification of 180 by 180 or a 1:1 aspect ratio.
  1395.  
  1396.      On the surface, the chore of maintaining aspect ratios may seem burdensome
  1397.      if not confusing, but it's really not as complicated as it appears.  The
  1398.      following discussion outlines a general procedure for maintaining aspect
  1399.      ratios.  First, you must predetermine which printer or output device you
  1400.      will output to, then call pgLoadDevInfo to load the information for that
  1401.      device.  You must also decide beforehand how you will print the drawing
  1402.      file with regard to page margins, page layout, page size, and resolution
  1403.      mode.  The pgSetPageMargins, pgSetPageForm, and pgSetPageSize functions
  1404.      will allow you to set the three page parameters.  You should then call
  1405.      pgGetDevMaxX and pgGetDevMaxY with the appropriate resolution mode to
  1406.      return the actual resolution of the printable region for this device and
  1407.      set of print parameters.  Then, simply define the virtual drawing
  1408.      resolution to match using the pgInitDrw command.  Performing this
  1409.      sequence of function calls simply insures that you will be drawing to a
  1410.      virtual resolution that is an exact match of the physical resolution
  1411.      which you will be printing at.
  1412.  
  1413.      You will also need to determine the width:height pixel aspect ratio of
  1414.      the output device for a specific resolution mode.  This information is
  1415.      returned by the pgGetDevResX and pgGetDevResY functions as the number of
  1416.      dots per inch horizontally and vertically, respectively.  You may then
  1417.      use this information to correct for the aspect ratio.  For example, if
  1418.      the width:height aspect ratio is 240:72, then simply multiply all your
  1419.      y-coordinates by 72/240 or all x-coordinates by 240/72, but not both.
  1420.      You may create a simple function to perform this conversion.  That's all
  1421.      there is to it!
  1422.  
  1423.      EXAMPLE:      Set the appropriate virtual drawing resolution and draw a
  1424.                    square assuming printing will be on an Epson FX printer (or
  1425.                    compatible) at resolution mode setting 2.  Page parameters
  1426.                    will be one inch margins on all sides, landscape format,
  1427.                    and full page.  Assume PGL was installed in the C:\PGL
  1428.                    directory.
  1429.  
  1430.      C             int resx, resy, aspx, aspy, ierr;
  1431.                    ierr = pgLoadDevInfo( "C:\\PGL\\EPFX" );
  1432.                    pgSetPageMargins( 100, 100, 100, 100 );
  1433.                    pgSetPageForm( pgLANDSCAPE );
  1434.                    pgSetPageSize( pgFULLPAGE );
  1435.                    resx = pgGetDevMaxX( 2 );
  1436.                    resy = pgGetDevMaxY( 2 );
  1437.                    pgInitDrw( "TEST.PLT", resx, resy, &ierr );
  1438.                    aspx = pgGetDevResX( 2 );
  1439.                    aspy = pgGetDevResY( 2 );
  1440.                    pgMoveTo( 0, 0 );
  1441.                    pgLineRel( 0, 100*aspy/aspx );
  1442.                    pgLineRel( 100, 0 );
  1443.                    pgLineRel( 0, -100*aspy/aspx );
  1444.                    pgLineRel( -100, 0 );
  1445.  
  1446.      Pascal        resx, resy, aspx, aspy, ierr : integer;
  1447.                    ierr = pgLoadDevInfo( 'C:\PGL\EPFX' );
  1448.                    pgSetPageMargins( 100, 100, 100, 100 );
  1449.                    pgSetPageForm( pgLANDSCAPE );
  1450.                    pgSetPageSize( pgFULLPAGE );
  1451.                    resx = pgGetDevMaxX( 2 );
  1452.                    resy = pgGetDevMaxY( 2 );
  1453.                    pgInitDrw( 'TEST.PLT', resx, resy, ierr );
  1454.                    aspx = pgGetDevResX( 2 );
  1455.                    aspy = pgGetDevResY( 2 );
  1456.                    pgMoveTo( 0, 0 );
  1457.                    pgLineRel( 0, 100*aspy DIV aspx );
  1458.                    pgLineRel( 100, 0 );
  1459.                    pgLineRel( 0, -100*aspy DIV aspx );
  1460.                    pgLineRel( -100, 0 );
  1461.  
  1462.      Basic         call pgSetPageMargins( 100, 100, 100, 100 )
  1463.                    ierr% = pgLoadDevInfo( "C:\PGL\EPFX" )
  1464.                    call pgSetPageForm( pgLANDSCAPE )
  1465.                    call pgSetPageSize( pgFULLPAGE )
  1466.                    resx% = pgGetDevMaxX%( 2 )
  1467.                    resy% = pgGetDevMaxY%( 2 )
  1468.                    call pgInitDrw( "TEST.PLT", resx%, resy%, ierr% )
  1469.                    aspx% = pgGetDevResX%( 2 )
  1470.                    aspy% = pgGetDevResY%( 2 )
  1471.                    call pgMoveTo( 0, 0 )
  1472.                    call pgLineRel( 0, 100*aspy%/aspx% )
  1473.                    call pgLineRel( 100, 0 )
  1474.                    call pgLineRel( 0, -100*aspy%/aspx% )
  1475.                    call pgLineRel( -100, 0 )
  1476.  
  1477.      Fortran       integer*2 resx, resy, aspx, aspy, ierr
  1478.                    ierr = pgLoadDevInfo( 'C:\PGL\EPFX' )
  1479.                    call pgSetPageMargins( 100, 100, 100, 100 )
  1480.                    call pgSetPageForm( pgLANDSCAPE )
  1481.                    call pgSetPageSize( pgFULLPAGE )
  1482.                    resx = pgGetDevMaxX( 2 )
  1483.                    resy = pgGetDevMaxY( 2 )
  1484.                    call pgInitDrw( 'TEST.PLT', resx, resy, ierr )
  1485.                    aspx = pgGetDevResX( 2 )
  1486.                    aspy = pgGetDevResY( 2 )
  1487.                    call pgMoveTo( 0, 0 )
  1488.                    call pgLineRel( 0, 100*aspy/aspx )
  1489.                    call pgLineRel( 100, 0 )
  1490.                    call pgLineRel( 0, -100*aspy/aspx )
  1491.                    call pgLineRel( -100, 0 )
  1492.  
  1493.      Clipper       public resx, resy, aspx, aspy, ierr
  1494.                    ierr = pgLDINFO( "C:\PGL\EPFX" )
  1495.                    pgSPMARGIN( 100, 100, 100, 100 )
  1496.                    pgSPFORM( pgLANDSCAPE )
  1497.                    pgSPSIZE( pgFULLPAGE )
  1498.                    resx = pgGDMAXX( 2 )
  1499.                    resy = pgGDMAXY( 2 )
  1500.                    pgINIT( "TEST.PLT", resx, resy, @ierr )
  1501.                    aspx = pgGDRESX( 2 )
  1502.                    aspy = pgGDRESY( 2 )
  1503.                    pgMOVTO( 0, 0 )
  1504.                    pgLINREL( 0, 100*aspy/aspx )
  1505.                    pgLINREL( 100, 0 )
  1506.                    pgLINREL( 0, -100*aspy/aspx )
  1507.                    pgLINREL( -100, 0 )
  1508.  
  1509.  
  1510.      The pgArc, pgCircle, and pgPie functions will always produce true circles
  1511.      and circular arcs, however, they may not print as you would expect since
  1512.      they are defined with only one radius which PGL applies in the horizontal
  1513.      direction.  You can maintain better control if you adjust for the aspect
  1514.      ratio and use the complimentary pgEllArc, pgEllipse, and pgSector
  1515.      functions.  These functions generate figures which are basically elliptic
  1516.      in nature, therefore, two radii are supplied.
  1517.  
  1518.  
  1519. Color
  1520.  
  1521.      Color printers are becoming increasingly popular since they give your
  1522.      printouts an added dimension, however, when working with color, you must
  1523.      bear in mind that most printers handle color differently.  There is no
  1524.      standard color palette as with screen graphics systems nor do they
  1525.      provide you with a standard number of colors.  For this reason, we do
  1526.      not provide you with a list of manifest constants such as BLACK, BLUE,
  1527.      GREEN, etc., since these color indices are of little value for color
  1528.      printers.
  1529.  
  1530.  
  1531.      Color Palettes
  1532.  
  1533.           When using the ToolKit, colors are defined by specifying a color
  1534.           index in the range 0 to 255.  It is up to you to know which colors
  1535.           are associated with these indices for your particular printer.
  1536.           Typically, however, on color printers, color index 0 is always
  1537.           associated with being BLACK and the highest color index supported
  1538.           by the printer is always associated with being WHITE (e.g., if your
  1539.           printer supports 8 colors, 0=BLACK and 7=WHITE).   If you specify a
  1540.           color index outside the range of valid colors for a particular
  1541.           printer, the ToolKit forces the color to BLACK.  This allows you to
  1542.           design graphics for a color printer and still obtain suitable
  1543.           printout on a black and white printer.
  1544.  
  1545.           The ToolKit allows you to create drawing files using color values in
  1546.           the range 0 to 255.  At print time, any colors which are out of range
  1547.           will be set to BLACK or to whatever color is defined by palette entry
  1548.           zero.  The color defined by palette entry zero may be altered by
  1549.           using pgSetPalette to remap a different hardware color to entry 0
  1550.           or by using pgSetRgbPalette to specify a new set of RGB color
  1551.           values for palette entry zero.
  1552.  
  1553.           You can improve the color output for your printed drawings by
  1554.           specifically programming your applications to handle the different
  1555.           color capabilities of each color printer you support.  The ToolKit
  1556.           supports the HP PaintJet, HP PaintJet/XL, and color PostScript
  1557.           printers.  Each of these color printers has different color
  1558.           capabilities, therefore, the ToolKit provides the functions
  1559.           pgSetPalette and pgSetRgbPalette to simplify programming for these
  1560.           printers.  Additionally, you can use pgLoadDevInfo and pgGetDevColors
  1561.           to determine the number of colors supported by a particular printer.
  1562.  
  1563.           The pgSetRgbPalette function sets the amount of Red, Green, and Blue
  1564.           (RGB) color to associate with a specific color index.  This function
  1565.           is supported on the HP PaintJet, HP PaintJet/XL, and color PostScript
  1566.           printers.
  1567.  
  1568.  
  1569.      HP PaintJet
  1570.  
  1571.           The HP PaintJet supports a limited RGB capability.  You can set the
  1572.           PaintJet to use any of 330 colors.  The PaintJet User's Guide defines
  1573.           the 330 sets of RGB values that it can print.  This reference guide
  1574.           is well worth obtaining if you will be programming extensively for
  1575.           the PaintJet.  If you specify a set of RGB values on the PaintJet
  1576.           not found in it's list of printable colors, it will attempt to
  1577.           select the closest matching color.  The PaintJet accepts values in
  1578.           the range 4 to 90 for it's Red, Green, and Blue color values.  You
  1579.           can specify RGB values outside of this range, but you may not like
  1580.           the results.  Although the PaintJet supports up to 330 colors, you
  1581.           can only work with 8 at a time (index values 0-7) at 180 dots per
  1582.           inch or 16 at a time (index values 0-15) at 90 dots per inch.
  1583.  
  1584.           If you do not specifically set the PaintJet's RGB palette, it will
  1585.           use a default palette to produce 16 colors at 90 dots per inch and
  1586.           8 colors at 180 dots per inch.  This color palette may be enough for
  1587.           most basic graphs and charts.  You can use the pgSetPalette function
  1588.           to rearrange the PaintJet color indices to more closely match
  1589.           screen color indices.
  1590.  
  1591.                PaintJet Colors - 8 colors @180 dpi
  1592.  
  1593.                Index         Color         Index         Color
  1594.  
  1595.                0             BLACK         4             BLUE
  1596.                1             RED           5             MAGENTA
  1597.                2             GREEN         6             CYAN
  1598.                3             YELLOW        7             WHITE
  1599.  
  1600.  
  1601.                PaintJet Colors - 16 colors @90 dpi
  1602.  
  1603.                Index         Color         Index         Color
  1604.  
  1605.                0             BLACK         8             PURPLE
  1606.                1             RED           9             BROWN
  1607.                2             GREEN         10            DARKGRAY
  1608.                3             YELLOW        11            LIGHTGRAY
  1609.                4             BLUE          12            PINK
  1610.                5             MAGENTA       13            LIGHTBLUE
  1611.                6             CYAN          14            LIGHTYELLOW
  1612.                7             ORANGE        15            WHITE
  1613.  
  1614.  
  1615.      HP PaintJet/XL
  1616.  
  1617.           The HP PaintJet/XL supports a more sophisticated RGB capability
  1618.           allowing you to print using any of thousands of colors.  The
  1619.           PaintJet/XL provides hardware color dithering support allowing it to
  1620.           produce a large number of colors.  The ToolKit supports the
  1621.           PaintJet/XL in a 180 dots per inch PaintJet compatible mode providing
  1622.           8 colors.  The ToolKit also supports the PaintJet/XL in a 180 dots
  1623.           per inch mode providing 256 colors.  The 256 color palette supported
  1624.           by this mode may be set using pgSetRgbPalette.  By default, only the
  1625.           first 8 colors are predefined for this color mode.  You must
  1626.           specifically set the RGB values for indices in the range 8 to 255.
  1627.           The 8 default colors correspond to the PaintJet 8 color palette at
  1628.           180 dots per inch.  The PaintJet/XL RGB values for the 256 color
  1629.           palette may be in the range 0 to 255.   When using the 256 color
  1630.           mode, the ToolKit uses color index 7 (white by default) to fill the
  1631.           page with white.  If you use pgSetRgbPalette to modify color index 7,
  1632.           the entire printed page will be filled with this color.
  1633.  
  1634.  
  1635.      Color PostScript Printers
  1636.  
  1637.           Color PostScript printers support the RGB color imaging model and
  1638.           can produce very high quality color graphics output.  There are large
  1639.           differences in the quality of color output produced by various color
  1640.           PostScript printers.  The least expensive of these printers are
  1641.           based on "thermal wax" technology.  They can produce 16 million
  1642.           colors, but use a dithering matrix of 6x6 pixels.  The dithering
  1643.           matrix has the effect of reducing resolution on a typical 300 dots
  1644.           per inch printer to 50 dots per inch.  These devices produce very
  1645.           nice pictures of complex graphics such as faces and trees, however,
  1646.           drawings that contain angled straight lines may show significant
  1647.           jagged edge effects.  "Subliminal dye" PostScript printers can truly
  1648.           produce 16 million colors at 150 to 300 dots per inch.  These
  1649.           printers are capable of producing some amazing graphics output, but
  1650.           are more expensive than "thermal wax" printers.
  1651.  
  1652.           When printing on color PostScript printers, you should first use the
  1653.           PGL2PS utility to generate a PostScript Page Description file.  The
  1654.           PostScript file may then be copied to the printer with the standard
  1655.           DOS COPY command or it may be printed with the DOS PRINT command.
  1656.           Even black and white PostScript printers can process color PostScript
  1657.           files, but you won't get color printouts.  Instead, colors will
  1658.           show up as shades of gray on the printout.  You can also take these
  1659.           files to your local graphics art shop and they can produce 1200-2400
  1660.           dots per inch publication quality artwork.  Many high end desktop
  1661.           publishing packages are capable of processing PostScript files.
  1662.  
  1663.           The pgLoadDevInfo, pgGetDevColors, pgSetPalette, and pgSetRgbPalette
  1664.           functions are supported by the ToolKit on PostScript printers.
  1665.           Valid RGB values range from 0 to 255.  The ToolKit predefines the
  1666.           first 16 RGB color values to correspond with the standard VGA screen.
  1667.           Color palette entries 16 through 255 must be specifically defined
  1668.           using the pgSetRgbPalette function.  The PGL2PS utility allows you
  1669.           to specify B&W, gray scale, or color PostScript output.  This
  1670.           allows you to create drawing files for color PostScript printers,
  1671.           but change the color model with PGL2PS if you desire.
  1672.  
  1673.  
  1674.      Background Colors
  1675.  
  1676.           An inherent difference between screen and printer graphics is that,
  1677.           by default, the background color for screen graphics is black while
  1678.           that for printer graphics is the color of the paper you are printing
  1679.           on (usually white).  You should keep this in mind when making your
  1680.           color selections.  You may, of course, set an artificial background
  1681.           color by using a rectangular fill operation, however, this tends to
  1682.           use an extensive amount of toner or ink which your end users may not
  1683.           appreciate.
  1684.  
  1685. Saving Your Graphics
  1686.  
  1687.      The ToolKit is designed to store your graphics commands in a drawing file
  1688.      which may be subsequently printed utilizing the GPMENU, GPU, or PGL2PS
  1689.      printing utilities.  Only the graphics commands are stored, not the
  1690.      corresponding bitmap.  You may store graphics to a new file or append
  1691.      them to an existing file.  PGL drawing files are similar to Windows
  1692.      Metafiles and the Computer Graphics Standard Metafiles, but are optimized
  1693.      to allow for faster printing.
  1694.  
  1695.      If you wish to store graphics to a new file, use the pgInitDrw function
  1696.      and pass as arguments the desired file name and virtual drawing
  1697.      resolution.  As functions are called, the corresponding graphics codes
  1698.      are written to this file.  Be warned that this function assumes the file
  1699.      to be new.  If the specified file already exists, its contents will be
  1700.      overwritten.
  1701.  
  1702.      If you wish to open an existing file for appending new graphics to, use
  1703.      the pgOpenDrw function.  You should then call pgGetMaxX and pgGetMaxY to
  1704.      return the virtual drawing resolution used to originally create the file.
  1705.      All new graphics must be generated at the same resolution and will be
  1706.      appended to the end of the drawing file.
  1707.  
  1708.      To reduce the amount of disk I/O activity, commands are stored in a 512
  1709.      byte buffer.  When the buffer is filled, it is automatically flushed and
  1710.      the contents of the buffer are written to the drawing file.
  1711.  
  1712.  
  1713. Strings
  1714.  
  1715.      For the Microsoft Fortran interface, strings are required to be passed in
  1716.      a C compatible format (i.e. they must be NULL terminated).  This is
  1717.      accomplished by appending a C or a NULL character at the end of all
  1718.      strings just after the closing single quote mark.  Note that this format
  1719.      is only used by Microsoft Fortran.
  1720.  
  1721.      EXAMPLE:      CALL pgDrawText( 'String'C )
  1722.  
  1723.      For the Lahey Fortran interface, strings are not required to be NULL
  1724.      terminated.  This may cause problems if you try to justify text but pass
  1725.      a string containing trailing blank characters.  The ToolKit performs a
  1726.      backwards search for the first non-blank or NULL character.  Text
  1727.      justification is then based on the length of the remaining string.  If
  1728.      you intend your strings to have trailing blanks, you should NULL
  1729.      terminate the string with CHAR(0).
  1730.  
  1731.      EXAMPLE:      CALL pgDrawText( 'String   '//CHAR(0) )
  1732.  
  1733.      This string format is supported by both Lahey and Microsoft Fortran.
  1734.  
  1735.  
  1736. Error Handling
  1737.  
  1738.      The majority of PGL functions do not return an error code.  This is due
  1739.      to the fact that these functions, for the most part, simply write out
  1740.      graphics codes to a file.  When errors do occur, they are most likely
  1741.      related to an I/O problem.  PGL does, however, set internal error flags.
  1742.      You may use the pgGetStatus function to return the current error status
  1743.      as an aid in debugging.  We suggest you call the pgGetStatus function at
  1744.      the end of each drawing page just to be sure no disk I/O errors have
  1745.      occurred.  If pgGetStatus returns a non-zero value, all PGL knows is that
  1746.      a disk I/O error (such as "disk full") occurred.  Each time pgGetStatus
  1747.      is called, the internal error flag is reset to 0.
  1748.  
  1749.  
  1750. Step-By-Step Example
  1751.  
  1752.      This section provides you with a step-by-step example for each supported
  1753.      language.  We will take you through creating a simple program, compiling,
  1754.      linking, and running the program to create a drawing file, then printing
  1755.      the drawing file.
  1756.  
  1757.      For the purposes of this example, we assume that the PGL ToolKit has been
  1758.      installed in the following directories:
  1759.  
  1760.           PGL System Files            C:\PGL
  1761.           C Files                     C:\PGL\C
  1762.           PASCAL Files                C:\PGL\TP
  1763.           BASIC Files                 C:\PGL\BAS
  1764.           FORTRAN Files               C:\PGL\FOR
  1765.           CLIPPER Files               C:\PGL\CLIP
  1766.  
  1767.      We shall also assume that the location of the PGL ToolKit system files,
  1768.      where the printing utility programs reside, has been included in your
  1769.      PATH.
  1770.  
  1771.      Example Program
  1772.  
  1773.           The following example programs create a new drawing file named
  1774.           "EXAMPLE.PGL" with a virtual drawing resolution of 2000x2000.  Draw
  1775.           a filled ellipse centered on the page using the pgFCLOSEDOT fill
  1776.           pattern, print the text string "ELLIPSE" centered in the ellipse,
  1777.           then exit the program.  Prior to exiting the program, call the
  1778.           pgGetStatus function to check if an I/O error occurred during
  1779.           program execution.
  1780.  
  1781.           C         #include <stdio.h>
  1782.                     #include <stdlib.h>
  1783.                     #include "c:\pgl\c\pgl.h"
  1784.  
  1785.                     main()
  1786.                     {
  1787.                            int ierr;
  1788.                            pgInitDrw( "EXAMPLE.PGL", 2000, 2000, &ierr );
  1789.                            if( ierr != 0 )
  1790.                            {
  1791.                                  printf( "ERROR initializing PGL - Aborting" );
  1792.                                  exit(1);
  1793.                            }
  1794.                            pgSetFillStyle( pgFCLOSEDOT, 1 );
  1795.                            pgEllipse( 1000, 1000, 700, 500, pgOFILL );
  1796.                            pgSetTextStyle( pgTRIPLEX );
  1797.                            pgSetTextJustify( pgCENTER, pgCENTER );
  1798.                            pgDrawTextXY( 1000, 1000, "ELLIPSE" );
  1799.                            if( pgGetStatus() != 0 )
  1800.                            {
  1801.                                  printf( "PGL I/O error occurred" );
  1802.                            }
  1803.                            pgEndDrw();
  1804.                     }
  1805.  
  1806.           Pascal    program example;
  1807.                     {$R-,S-}
  1808.  
  1809.                     uses Crt,PGL;
  1810.                     label ExitPgm;
  1811.                     var ierr : integer;
  1812.  
  1813.                     begin
  1814.                     pgInitDrw( 'EXAMPLE.PGL', 2000, 2000, ierr );
  1815.                     if ierr <> 0  then
  1816.                     begin
  1817.                           writeln( 'ERROR initializing PGL - Aborting' );
  1818.                           goto ExitPgm;
  1819.                     end;
  1820.                     pgSetFillStyle( pgFCLOSEDOT, 1 );
  1821.                     pgEllipse( 1000, 1000, 700, 500, pgOFILL );
  1822.                     pgSetTextStyle( pgTRIPLEX );
  1823.                     pgSetTextJustify( pgCENTER, pgCENTER );
  1824.                     pgDrawTextXY( 1000, 1000, 'ELLIPSE' );
  1825.                     if pgGetStatus <> 0 then
  1826.                     begin
  1827.                           writeln( 'PGL I/O error occurred' );
  1828.                     end;
  1829.                     pgEndDrw;
  1830.                     ExitPgm:
  1831.                     end.
  1832.  
  1833.           Basic     '$INCLUDE: 'c:\pgl\bas\pgl.bas'
  1834.  
  1835.                     call pgInitDrw( "EXAMPLE.PGL", 2000, 2000, ierr% )
  1836.                     if ierr% <> 0 then
  1837.                           print "ERROR initializing PGL - Aborting"
  1838.                           goto exitpgm
  1839.                     end if
  1840.                     call pgSetFillStyle( pgFCLOSEDOT, 1 )
  1841.                     call pgEllipse( 1000, 1000, 700, 500, pgOFILL )
  1842.                     call pgSetTextStyle( pgTRIPLEX )
  1843.                     call pgSetTextJustify( pgCENTER, pgCENTER )
  1844.                     call pgDrawTextXY( 1000, 1000, "ELLIPSE" )
  1845.                     if pgGetStatus <> 0 then
  1846.                           print "PGL I/O error occurred"
  1847.                     end if
  1848.                     call pgEndDrw
  1849.                     exitpgm:
  1850.                     end
  1851.  
  1852.           Fortran   include 'c:\pgl\for\pgl.for'
  1853.                     integer*2 ierr
  1854.  
  1855.                     call pgInitDrw( 'EXAMPLE.PGL'//char(0), 2000, 2000, ierr )
  1856.                     if( ierr .ne. 0 ) then
  1857.                           print *, ' ERROR initializing PGL - Aborting'
  1858.                           stop
  1859.                     end if
  1860.                     call pgSetFillStyle( pgFCLOSEDOT, 1 )
  1861.                     call pgEllipse( 1000, 1000, 700, 500, pgOFILL )
  1862.                     call pgSetTextStyle( pgTRIPLEX )
  1863.                     call pgSetTextJustify( pgCENTER, pgCENTER )
  1864.                     call pgDrawTextXY( 1000, 1000, 'ELLIPSE'//char(0) )
  1865.                     if( pgGetStatus .ne. 0 ) then
  1866.                           print *, ' PGL I/O error occurred'
  1867.                     end if
  1868.                     call pgEndDrw
  1869.                     end
  1870.  
  1871.           Clipper   SET PROCEDURE TO PGL
  1872.                     DO PGLINIT
  1873.  
  1874.                     PUBLIC ierr
  1875.  
  1876.                     pgINIT( "EXAMPLE.PGL", 2000, 2000, @ierr );
  1877.                     if ierr <> 0
  1878.                           ? "ERROR initializing PGL - Aborting"
  1879.                           return
  1880.                     end if
  1881.                     pgSFSTYLE( pgFCLOSEDOT, 1 );
  1882.                     pgELL( 1000, 1000, 700, 500, pgOFILL );
  1883.                     pgSTSTYLE( pgTRIPLEX );
  1884.                     pgSTJUST( pgCENTER, pgCENTER );
  1885.                     pgDTXY( 1000, 1000, 'ELLIPSE' );
  1886.                     if pgSTATUS() <> 0
  1887.                           ? "PGL I/O error occurred"
  1888.                     end if
  1889.                     pgEND()
  1890.  
  1891.  
  1892.      Compiling, Linking, and Executing
  1893.  
  1894.           Assume the example program is named EXAMPLE.ft where ft is the
  1895.           appropriate file extension type for your programming language.  The
  1896.           above example assumes that the PGL ToolKit is used stand-alone.  You
  1897.           may, of course, integrate PGL with any third party graphics library
  1898.           if you also want screen graphics.  Simply include any other libraries
  1899.           you need when linking the program.  We have included an example
  1900.           compile and link for each supported compiler.
  1901.  
  1902.           C         For Turbo C, use the PGL_CL.LIB library and assuming the
  1903.                     Turbo C directory is in the PATH, compile and link as
  1904.                     follows:
  1905.  
  1906.                     tcc -ml -I\tc\include example.c c:\pgl\c\pgl_cl.lib
  1907.                     example
  1908.  
  1909.                     For Borland C++, use the PGL_CL.LIB library and
  1910.                     assuming the Borland C++ directory is in the PATH,
  1911.                     compile and link as follows:
  1912.  
  1913.                     bcc -ml example.c c:\pgl\c\pgl_cl.lib
  1914.                     example
  1915.  
  1916.                     For Microsoft C, use the PGL_CL.LIB library and assuming
  1917.                     the LIB environment variable is correctly set, compile and
  1918.                     link as follows:
  1919.  
  1920.                     cl /AL example.c c:\pgl\c\pgl_cl.lib
  1921.                     example
  1922.  
  1923.                     For Quick C, use the PGL_CL.LIB library and assuming the
  1924.                     LIB environment variable is correctly set, compile and
  1925.                     link as follows:
  1926.  
  1927.                     qcl /AL example.c c:\pgl\c\pgl_cl.lib
  1928.                     example
  1929.  
  1930.                     For WATCOM C, use the PGL_CL.LIB library and assuming
  1931.                     the LIB environment variable is correctly set, compile and
  1932.                     link as follows:
  1933.  
  1934.                     wcl /ml example.c c:\pgl\c\pgl_cl.lib
  1935.                     example
  1936.  
  1937.           Pascal    For Turbo Pascal 6.0, use the PGL.TPU unit, specifying the
  1938.                     directory for the PGL.TPU unit with /Uxxx, compile and
  1939.                     link as follows:
  1940.  
  1941.                     tpc /Uc:\pgl\pas example
  1942.                     example
  1943.  
  1944.           Basic     For MS Quick Basic 4.x, use the PGL_QB library, use the /O
  1945.                     command flag to force the compiler to build a stand-alone
  1946.                     EXE, and assuming the LIB environment variable specifies
  1947.                     the PATH to the Quick Basic libraries, compile and link as
  1948.                     follows:
  1949.  
  1950.                     bc /O example
  1951.                     link example,,,c:\pgl\bas\pgl_qb;
  1952.                     example
  1953.  
  1954.                     For MS Basic PDS 7.x, use the PGL_B7 library, use the /O
  1955.                     command flag to force the compiler to build a standalone
  1956.                     EXE, and assuming the LIB environment variable specifies
  1957.                     the PATH to the Quick Basic libraries, compile and link as
  1958.                     follows:
  1959.  
  1960.                     bc /O example
  1961.                     link example,,,c:\pgl\bas\pgl_b7;
  1962.                     example
  1963.  
  1964.           Fortran   For Lahey Fortran 4.x and 5.x, use the PGL_LF.LIB library
  1965.                     and assuming F77L is in the PATH, compile and link as
  1966.                     follows:
  1967.  
  1968.                     f77l example
  1969.                     optlink example,,,c:\pgl\for\pgl_lf;
  1970.                     example
  1971.  
  1972.                     For Microsoft Fortran 4.x and 5.x, use the PGL_LF.LIB
  1973.                     library and assuming the LIB environment variable is set
  1974.                     to the FORTRAN library directory, compile and link as
  1975.                     follows:
  1976.  
  1977.                     FL /c example.for
  1978.                     link example,,,c:\pgl\for\pgl_mf;
  1979.                     example
  1980.  
  1981.           Clipper   For Clipper '87, use the PGL_CL87.LIB library and assuming
  1982.                     the LIB environment variable has the PATH to the CLIPPER
  1983.                     '87 libraries, compile and link as follows:
  1984.  
  1985.                     clipper example
  1986.                     link /SE:512 /ST:8000 example,,,c:\pgl\clip\pgl_cl87;
  1987.                     example
  1988.  
  1989.                     For Clipper 5.x, use the PGL_CL5.LIB library and assuming
  1990.                     the LIB environment variable has the PATH to the CLIPPER
  1991.                     5.x libraries, compile and link as follows:
  1992.  
  1993.                     clipper example
  1994.                     link /SE:512 /ST:8000 example,,,c:\pgl\clip\pgl_cl5;
  1995.                     example
  1996.  
  1997.  
  1998.      Printing EXAMPLE.PGL Using GPU
  1999.  
  2000.           Each of the example programs above will generate a drawing file
  2001.           named EXAMPLE.PGL.  Listed below are several ways of printing this
  2002.           file using the GPU command line printing utility.  Except for the
  2003.           name of the drawing file, all other printing parameters such as page
  2004.           margins, size, resolution, etc., have predefined default values
  2005.           (see GPU Command Summary in Chapter 7).  If a print parameter is not
  2006.           specifically specified on the command line, its default value will
  2007.           be used.  For the purpose of this example, we assumed above that the
  2008.           PGL system files are located in C:\PGL.  Before printing with the
  2009.           following examples, you should make sure you have placed the
  2010.           following GPU environment variable in your AUTOEXEC.BAT file:
  2011.  
  2012.                SET GPU=/P:C:\PGL
  2013.  
  2014.           You may alternatively copy the appropriate device driver files
  2015.           (.DRV) and font files (.FNT) to the local area you are working in.
  2016.           The printing utility will, by default, search the local working
  2017.           directory for these files.
  2018.  
  2019.           A third alternative is to specify the location of the device driver
  2020.           and font files by including the parameter /P=C:\PGL in each of the
  2021.           command lines below.
  2022.  
  2023.           1)     Print to an HP LaserJet II using full page landscape
  2024.                  orientation at resolution setting 2.
  2025.  
  2026.                  GPU EXAMPLE.PGL /D=HPLJET /R=2 /Z=F /O=L
  2027.  
  2028.           2)     Print as above but send the output to a file named EX.BIN.
  2029.                  You may print EX.BIN using the DOS COPY command.  You must
  2030.                  include the /b flag to indicate that EX.BIN is a binary file.
  2031.  
  2032.                  GPU EXAMPLE.PGL /U=EX.BIN /D=HPLJET /R=2 /Z=F /O=L
  2033.                  COPY /b EX.BIN PRN
  2034.  
  2035.           3)     Print as in (1) above but send the output through the COM1
  2036.                  serial communication port.
  2037.  
  2038.                  GPU EXAMPLE.PGL /D=HPLJET /R=2 /Z=F /O=L
  2039.                                  /U=COM1:19200,N,8,1,1,1
  2040.  
  2041.           4)     Print as in (2) above but send the output through the COM1
  2042.                  serial communication port using the SCPY utility program
  2043.                  included with PGL (refer to Chapter 7 for details on using
  2044.                  the SCPY utility).
  2045.  
  2046.                  GPU EXAMPLE.PGL /U=EX.BIN /D=HPLJET /R=2 /Z=F /O=L
  2047.                  SCPY -COM1:19200,N,8,1,1,1 EX.BIN
  2048.  
  2049.           5)     Use the PGL2PS utility to convert EXAMPLE.PGL to a PostScript
  2050.                  output file called EXAMPLE.PS, then print the file.  Notice
  2051.                  that you may not specify an environment variable for PGL2PS,
  2052.                  therefore, the device drivers and font files must either be
  2053.                  located in your local working directory or you must specify
  2054.                  the path as in the example below.
  2055.  
  2056.                  PGL2PS EXAMPLE.PGL EXAMPLE.PS /Z=F /O=L /P=C:\PGL
  2057.                  PRINT EXAMPLE.PS
  2058.  
  2059.           6)     Preview the drawing file by playing it back to the screen
  2060.                  prior to printing it.  The following command assumes playback
  2061.                  is to a VGA screen.
  2062.  
  2063.                  GPU EXAMPLE.PGL /D=VGA
  2064.  
  2065.           These are just some examples of how you may print the EXAMPLE.PGL
  2066.           drawing file.  You should refer to the section on GPU Command
  2067.           Summary in Chapter 7 to reference all valid printing parameters.
  2068.           You should refer to the chapter on "SUPPORTED OUTPUT DEVICES" for a
  2069.           list of available device drivers.
  2070.  
  2071.  
  2072.      Printing EXAMPLE.PGL Using GPMENU
  2073.  
  2074.           The EXAMPLE.PGL drawing file may also be printed using the GPMENU
  2075.           print utility program.  If you wish to use this program, you must be
  2076.           sure to set the PGL environment variable in your AUTOEXEC.BAT file.
  2077.           The environment variable lets the GPMENU program know where to find
  2078.           the PGL system files.  For our example above, we assumed you
  2079.           installed the system files on C:\PGL.  The environment variable
  2080.           would then be as follows:
  2081.  
  2082.                SET PGL=C:\PGL
  2083.  
  2084.           If you have also included C:\PGL in your PATH, then simply type
  2085.           GPMENU at the DOS prompt to execute the program.  A system of menus
  2086.           is provided to allow you to select and set the printing parameters.
  2087.           As with the GPU printing utility, all parameters have default values
  2088.           with the exception of the file you wish to print.
  2089.  
  2090.           The GPMENU program is designed to provide you with a user friendly
  2091.           environment to facilitate printing.  The program provides
  2092.           descriptions of the various printing parameters and their possible
  2093.           values, therefore, you may find it more convenient to print with
  2094.           this utility if your user's guide is not available or until you
  2095.           become familiar with the various parameters.
  2096.  
  2097.  
  2098.                      **************************************
  2099.                      ** Chapter 6:  WORKING WITH BITMAPS **
  2100.                      **************************************
  2101.  
  2102.  
  2103.      The ToolKit is based on a scalable vector architecture, however, it may
  2104.      also be used to print bitmapped images such as fonts, icons, or a
  2105.      graphics mode video screen bitmap (including off-screen bitmaps).
  2106.      Bitmaps are saved in a drawing file along with any other drawing
  2107.      information generated by your program.  You may mix bitmap output and PGL
  2108.      drawing functions in the same drawing file.
  2109.  
  2110.      The ToolKit supports bitmaps with 1, 2, 4, or 8 bits per pixel.  This
  2111.      translates into a 2, 4, 16, or 256 color bitmap capability.  Bitmaps are
  2112.      positioned on the drawing page in terms of the virtual drawing coordinates
  2113.      defined by pgInitDrw.  The ToolKit prints bitmap images in physical
  2114.      printer hardware coordinates, therefore, printing the same bitmap (drawing
  2115.      file) at different printer resolutions will cause different sized images
  2116.      to be printed (i.e., images will appear twice as large if you print at
  2117.      150 dpi verses 300 dpi resolution).  The bitmap will be clipped at the
  2118.      boundaries of the defined page margins if it is too large or if it is
  2119.      placed such that it extends beyond the margins.
  2120.  
  2121.  
  2122. Saving Bitmap Images
  2123.  
  2124.      The ToolKit saves bitmap information in a packed pixel format and
  2125.      optionally compresses the image data to reduce the size of drawing files.
  2126.      Three simple general purpose interface functions are provided for saving
  2127.      bitmapped images.  These are the pgBMInit, pgBMData, and pgBMEnd commands.
  2128.  
  2129.      To save a bitmap image, you must first call pgBMInit and provide the
  2130.      following parameters:
  2131.  
  2132.           x,y            The location of the upper-left hand corner of the
  2133.                          bitmap on the printed page.
  2134.           width          The width of the bitmap in pixels.
  2135.           height         The height of the bitmap in pixels.
  2136.           bpp            The number of bits per pixel.
  2137.           compflag       Flag indicating whether or not to compress the bitmap
  2138.                          information.
  2139.  
  2140.      Next, use pgBMData to pass pixel data for each row of the bitmap and
  2141.      provide the following information:
  2142.  
  2143.           row            The row number of the bitmap corresponding to the
  2144.                          data being passed (0 to height-1).
  2145.           data           Vector where each element of the vector represents
  2146.                          the color value of the corresponding pixel in the row.
  2147.  
  2148.      When all rows of the bitmap have been processed, call pgBMEnd to signal
  2149.      the end of the current bitmap sequence.
  2150.  
  2151.      While saving a bitmap to a drawing file, you must not call any other
  2152.      ToolKit function between the pgBMInit and pgBMEnd commands other than
  2153.      pgBMData.  The pgBMEnd function ends the bitmap definition and must be
  2154.      called before calling any other ToolKit functions.  Failure to call
  2155.      pgBMEnd will produce unpredictable results and may cause your computer to
  2156.      lock up!
  2157.  
  2158.  
  2159. Building the Data Vector
  2160.  
  2161.      When saving bitmaps to a drawing file, most of your programming effort
  2162.      will be devoted to building the data vector of pixel colors for each row
  2163.      of the bitmap.  This is quite simple as will be demonstrated in the code
  2164.      samples below.  Each element of the data vector must be loaded with the
  2165.      color of the corresponding pixel for that row of the bitmap, usually
  2166.      starting with the left edge.  The easiest way to load the data vector is
  2167.      to use the 'getpixel' function from your screen graphics library to
  2168.      return individual pixel colors and place them in the data vector.  Valid
  2169.      color values range from 0 to 255.
  2170.  
  2171.      EXAMPLE:       Save a 16 color VGA size bitmap using compression.  Assume
  2172.                     a getpixel function is available which returns the pixel
  2173.                     color.
  2174.  
  2175.      C              int data[640], row, col, ierr;
  2176.                     pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
  2177.                     pgBMInit( 0, 0, 640, 480, 4, 1 );
  2178.                     for( row=0; row<480; row++ )
  2179.                     {
  2180.                        for( col=0; col<640; col++ )
  2181.                           data[col] = getpixel( col, row );
  2182.                        pgBMData( row, data );
  2183.                     }
  2184.                     pgBMEnd();
  2185.                     pgEndDrw();
  2186.  
  2187.      Pascal         var
  2188.                     ierr, row, col : integer;
  2189.                     data : array [0..639] of integer;
  2190.                     begin
  2191.                     pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
  2192.                     pgBMInit( 0, 0, 640, 480, 4, 1 );
  2193.                     for row := 0 to 479
  2194.                        begin
  2195.                           for col :=0 to 639
  2196.                              begin
  2197.                                 data[col] := getpixel( col, row );
  2198.                              end;
  2199.                           pgBMData( row, data );
  2200.                        end;
  2201.                     pgBMEnd;
  2202.                     pgEndDrw;
  2203.                     end.
  2204.  
  2205.  
  2206.      Basic          DIM data%(639)
  2207.                     call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
  2208.                     call pgBMInit( 0, 0, 640, 480, 4, 1 )
  2209.                     for row% = 0 to 479
  2210.                        for col% = 0 to 639
  2211.                           data%(col) = getpixel%( col%, row% )
  2212.                        next
  2213.                        call pgBMData( row%, data%(0) )
  2214.                     next
  2215.                     call pgBMEnd
  2216.                     call pgEndDrw
  2217.                     end
  2218.  
  2219.  
  2220.      Fortran        integer*2 ierr, row, col, data(640)
  2221.                     call pgInitDrw( "BITMAP.PGL"//CHAR(0), 640, 480, ierr )
  2222.                     call pgBMInit( 0, 0, 640, 480, 4, 1 )
  2223.                     do row = 1, 480
  2224.                        do col = 1, 640
  2225.                           data(col) = getpixel( col-1, row-1 )
  2226.                        end do
  2227.                        call pgBMData( row-1, data )
  2228.                     end do
  2229.                     call pgBMEnd
  2230.                     call pgEndDrw
  2231.                     end
  2232.  
  2233.      Clipper        PUBLIC data[640]
  2234.                     pgINIT( "BITMAP.PGL", 640, 480, @ierr )
  2235.                     pgBMI( 0, 0, 640, 480, 4, 1 )
  2236.                     for row = 1 to 480
  2237.                        for col = 1 to 640
  2238.                           data[col] = getpixel( col-1, row-1 )
  2239.                        next
  2240.                        pgBMD( row-1, data )
  2241.                     next
  2242.                     pgBME()
  2243.                     pgEND()
  2244.  
  2245.  
  2246. Color Conversions and Dithering
  2247.  
  2248.      The simplicity of the bitmap printing interface provides a great deal of
  2249.      flexibility.  If you save an 8 bit per pixel (256 color) bitmap and print
  2250.      on a black and white printer, the ToolKit will convert colors to black
  2251.      and white.  You can use pgSetPalette and pgSetRgbPalette to define custom
  2252.      colors beyond those predefined by the ToolKit.  If you know you will be
  2253.      printing on a black and white printer, you can reduce the size of your
  2254.      drawing files by specifying a 1 bit per pixel (2 color) bitmap in the
  2255.      call to pgBMInit.  Then, convert each pixel color to either black or
  2256.      white before you load the data vector.  You could apply a color dithering
  2257.      technique to the bitmap image prior to loading pixel color values into
  2258.      the data vector.
  2259.  
  2260.  
  2261. Bitmap Scaling
  2262.  
  2263.      The ToolKit does not scale bitmaps, but you can easily accomplish this.
  2264.      To scale a bitmap in the X coordinate (horizontally) to be twice as wide
  2265.      as the original, you must specify a bitmap width of twice the original
  2266.      bitmap in pgBMInit.  When you load the data vector, you should load each
  2267.      pixel twice.  The resulting bitmap will then appear twice as wide as the
  2268.      original.  The same technique may be used to scale the height of the
  2269.      bitmap as well.  You should be aware that scaling bitmaps may cause
  2270.      images contained within them to appear jagged.  This is a common problem
  2271.      when scaling bitmaps.  You could also apply an image smoothing technique
  2272.      on the bitmap image data prior to loading the data vector and reduce the
  2273.      jagged effect caused by scaling.
  2274.  
  2275.  
  2276. Bitmap Fill Direction
  2277.  
  2278.      Normally, when loading the data vector, you would start with the first
  2279.      row of the bitmap and start at the left edge.  You could, optionally,
  2280.      load pixel values starting at the right edge which effectively creates a
  2281.      mirrored image of your bitmap.  Similarly, you could start with the
  2282.      bottom row of the bitmap and end with the top row, thereby, inverting
  2283.      your image.
  2284.  
  2285.  
  2286. Bitmap Fill Mode
  2287.  
  2288.      As mentioned above, you may mix bitmap output and PGL functions.  That is
  2289.      to say, you could output a bitmap, then call PGL functions which could
  2290.      draw over the bitmap or vice versa.  The overlaying of images may be done
  2291.      in one of two modes, either transparently or opaquely.  You may set the
  2292.      desired fill mode by an appropriate call to the pgSetFillMode function.
  2293.  
  2294.  
  2295. Bitmap Image Processing
  2296.  
  2297.      There are a vast number of image processing techniques other than
  2298.      dithering and scaling that may be used to enhance bitmapped images.  A
  2299.      discussion of these techniques may be found in any of the standard texts
  2300.      on image processing.  There are also several commercial libraries
  2301.      available that perform many image processing functions.  PGL does not
  2302.      provide any image processing functions, just a general purpose bitmap
  2303.      printing interface.  We leave it up to you to incorporate any image
  2304.      processing software or techniques you may desire.
  2305.  
  2306.  
  2307. Using Hardware Coordinates and Bitmaps
  2308.  
  2309.      Some screen graphics libraries such as the Genus GX and MetaWINDOW
  2310.      graphics libraries allow you to generate off-screen bitmapped images of
  2311.      any virtual size.  If you are using such a package, you may wish to
  2312.      generate off-screen bitmaps which exactly matches the printed page
  2313.      resolution.  The ToolKit provides several functions which will allow you
  2314.      to determine the exact number of horizontal and vertical hardware pixels
  2315.      which you may address for a particular printer and set of print
  2316.      parameters.  Once you have this information, you can create a bitmapped
  2317.      image to fit those exact dimensions and output the bitmap to the drawing
  2318.      file as outlined above.
  2319.  
  2320.      As an example, suppose you want to create a bitmap which will be printed
  2321.      on an HP LaserJet printer utilizing the highest printer resolution (300
  2322.      dpi), full page landscape mode with 1" margins on all sides.  The
  2323.      following code stubs demonstrate how to obtain the addressable printer
  2324.      pixels for this set of print parameters.
  2325.  
  2326.      C              int xmax, ymax, ierr;
  2327.                     ierr = pgLoadDevInfo( "HPLJET" );
  2328.                     pgSetPageMargins( 100, 100, 100, 100 );
  2329.                     pgSetPageForm( pgLANDSCAPE );
  2330.                     pgSetPageSize( pgFULLPAGE );
  2331.                     xmax = pgGetDevMaxX( 3 );
  2332.                     ymax = pgGetDevMaxY( 3 );
  2333.  
  2334.      Pascal         var
  2335.                     xmax, ymax, ierr : integer;
  2336.                     ierr := pgLoadDevInfo( 'HPLJET' );
  2337.                     pgSetPageMargins( 100, 100, 100, 100 );
  2338.                     pgSetPageForm( pgLANDSCAPE );
  2339.                     pgSetPageSize( pgFULLPAGE );
  2340.                     xmax := pgGetDevMaxX( 3 );
  2341.                     ymax := pgGetDevMaxY( 3 );
  2342.  
  2343.      Basic          ierr% = pgLoadDevInfo( "HPLJET" )
  2344.                     call pgSetPageMargins( 100, 100, 100, 100 )
  2345.                     call pgSetPageForm( pgLANDSCAPE )
  2346.                     call pgSetPageSize( pgFULLPAGE )
  2347.                     xmax% = pgGetDevMaxX%( 3 )
  2348.                     ymax% = pgGetDevMaxY%( 3 )
  2349.  
  2350.      Fortran        integer*2 xmax, ymax, ierr
  2351.                     ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  2352.                     call pgSetPageMargins( 100, 100, 100, 100 )
  2353.                     call pgSetPageForm( pgLANDSCAPE )
  2354.                     call pgSetPageSize( pgFULLPAGE )
  2355.                     xmax = pgGetDevMaxX( 3 )
  2356.                     ymax = pgGetDevMaxY( 3 )
  2357.  
  2358.      Clipper        ierr = pgLDINFO( "HPLJET" )
  2359.                     pgSPMARGIN( 100, 100, 100, 100 )
  2360.                     pgSPFORM( pgLANDSCAPE )
  2361.                     pgSPSIZE( pgFULLPAGE )
  2362.                     xmax = pgGDMAXX( 3 )
  2363.                     ymax = pgGDMAXY( 3 )
  2364.  
  2365.  
  2366.      In each of the example code stubs, the maximum addressable horizontal and
  2367.      vertical hardware pixels are returned in the variables xmax and ymax,
  2368.      respectively.  You may then create a bitmapped image sized xmax by ymax
  2369.      pixels and output the bitmap to the drawing file as outlined.
  2370.  
  2371.  
  2372.                          **************************
  2373.                          ** Chapter 7:  PRINTING **
  2374.                          **************************
  2375.  
  2376.  
  2377.      This chapter explains how to obtain graphics printouts with the ToolKit.
  2378.      Once you have created a drawing file, you may print it on either raster
  2379.      based printers (LaserJet, InkJet, Dot Matrix printers, and the PCX file
  2380.      format are all raster/bitmap based), or on vector devices (HPGL plotters,
  2381.      PostScript Printers, the Microsoft Windows Metafile format, and the
  2382.      WordPerfect Graphics file format are all vector based).  The ToolKit
  2383.      supports several raster and vector output devices and file formats.  At
  2384.      the time of this printing, PostScript support is included, other vector
  2385.      formats are under development.  Refer to the READ.ME file for an up-to-
  2386.      date list of vector and raster device printer support.
  2387.  
  2388.      Printing on vector devices, such as PostScript printers, requires you to
  2389.      convert the drawing file to PostScript format using the PGL2PS conversion
  2390.      utility (see PGL2PS Utility below), then copy the PostScript file to the
  2391.      printer.  Other vector devices work in a similar fashion, convert the
  2392.      drawing file to vector format, then copy the vector format file to the
  2393.      printer.
  2394.  
  2395.      Printing on raster devices require you use either the GPU command line
  2396.      utility or the menu driven GPMENU printing utility.  The GPU utility may
  2397.      be run from within your program allowing you to seamlessly draw and print
  2398.      graphics (assuming your programming language can run other programs).
  2399.      The GPMENU utility provides a user friendly printing facility to control
  2400.      the printing process and displays the status of each printing task as it
  2401.      progresses.  With either program, you have complete control of the
  2402.      printing process and page formatting parameters.
  2403.  
  2404.  
  2405. The Printing Process
  2406.  
  2407.      The GPU and GPMENU printing utilities read graphics commands from drawing
  2408.      files created with the ToolKit and generates an off-screen bitmap which
  2409.      is sent to the printer.  The bitmap is created in portions called swaths
  2410.      (or bands).  Once a swath is created, it is sent to the specified printer
  2411.      or disk file, then another swath is created and printed and so on.  If
  2412.      your system has enough memory, the PGL utilities will attempt to use a
  2413.      maximum of 64K of memory to build a bitmap for the selected printer.
  2414.  
  2415.      The printing utility programs are designed to work with as little as 8K
  2416.      of memory.  If your system does not have 64K of free memory for printing,
  2417.      the entire bitmap is still printed but smaller swaths of pixel rows are
  2418.      generated and sent to the output device.  This can slow down the printing
  2419.      process but allows you to create and print full page megabyte bitmaps
  2420.      with very little system memory.
  2421.  
  2422.  
  2423. Printing From Within Your Application
  2424.  
  2425.      To print from within your application, you must spawn or run either the
  2426.      GPU command line printing utility or the GPMENU printing utility.  Some
  2427.      typical functions used by languages supported by PGL to run other programs
  2428.      are listed below.  The spawning of programs is compiler and language
  2429.      specific, therefore, you should refer to your compiler's documentation
  2430.      for more information.  Note that some of these commands will allow you to
  2431.      run GPU as a child process and will return control to your program, others
  2432.      will simply cause your current program to exit, run GPU, and return to
  2433.      DOS (these are identified with an asterisk).
  2434.  
  2435.      C              SPAWNxxx, SYSTEM, *EXECxxx
  2436.  
  2437.      FORTRAN        SYSTEM
  2438.  
  2439.      BASIC          *RUN, *CHAIN
  2440.  
  2441.      PASCAL         EXEC
  2442.  
  2443.      CLIPPER        RUN
  2444.  
  2445.      You can run GPU or GPMENU from within your programs, however, GPMENU may
  2446.      require more memory than you have available.  The memory requirements of
  2447.      the GPU program are more manageable.  GPU requires about 60K to load
  2448.      itself into memory, from 8 to 64K for printing the bitmap, and about
  2449.      10-15K for a font.  Therefore you need a minimum of about 80K and
  2450.      optimally about 140K for faster printing.  To run GPU you must build a GPU
  2451.      command string, including any flags you wish to use with GPU.  The command
  2452.      string should look like what you would type at the DOS prompt to run GPU.
  2453.      Note that you can use the -q command switch to tell GPU to run quietly
  2454.      and produce no screen output messages.   This prevents GPU from
  2455.      overwriting any screen information you are displaying.  The -b switch may
  2456.      be used to specify the maximum amount of memory to use for the printing
  2457.      buffer.  The default is 64K (-b64), the minimum allowed is 8K (-b8).
  2458.  
  2459.      If you spawn the GPU utility, you can use the /Q switch to turn off any
  2460.      messages normally printed to the screen.  Any errors that occur during
  2461.      printing will be reported by a return code when GPU exits.  The following
  2462.      is a list of possible GPU error return codes.  The error codes with an
  2463.      asterisk next to them are common errors.  The other errors are highly
  2464.      unlikely to occur, however, if they should occur, call for additional
  2465.      technical support.
  2466.  
  2467.  
  2468.           Error Code     Description
  2469.  
  2470.               01*        Drawing file not found.
  2471.               02         Could not open PRN, LPT1, LPT2, or LPT3.
  2472.               03         I/O error -- read failure.
  2473.               04         I/O error -- write failure.
  2474.               05         I/O error -- file pointer error.
  2475.               06*        Corrupted or invalid drawing file -- bad code found.
  2476.               07         Not applicable.
  2477.               08         Not applicable.
  2478.               09         Not applicable.
  2479.               10*        Corrupted or invalid drawing file -- bad page count.
  2480.               11*        Insufficient memory.
  2481.               12         I/O error -- PRN write error.
  2482.               13         Corrupted device driver.
  2483.               14*        <ESC> entered by user to abort printing.
  2484.               15         Corrupted or invalid drawing file -- bad page form.
  2485.               16         I/O error -- problem creating PCX output.
  2486.               17         I/O error -- problem creating EPS output.
  2487.               18*        Insufficient memory for polygons.
  2488.               19         Cannot initiate screen graphics mode.
  2489.               20*        Device driver not found.
  2490.               21*        Font files not found.
  2491.               22*        Printer off-line or out of paper.
  2492.               23*        Font file corrupted or invalid.
  2493.  
  2494.  
  2495. Printing From Outside Your Application
  2496.  
  2497.      The GPMENU printing utility is a menu driven version of the GPU utility.
  2498.      It is designed to be run from the DOS prompt as a stand-alone graphics
  2499.      printing control center.  GPMENU provides an interactive menu driven
  2500.      printing environment with on screen help.  A default set of parameters
  2501.      will be automatically loaded from the PGCONFIG.SYS file.  You should
  2502.      reset these parameters for your specific printer and desired output
  2503.      format and resave the configuration as DEFAULT.  Thereafter, the new
  2504.      default configuration will be automatically loaded upon invoking GPMENU
  2505.      and all that is necessary is for you to specify the drawing file to print.
  2506.      You may, of course, predefine as many printer configurations as you wish
  2507.      and save each one.
  2508.  
  2509.      The GPMENU utility gives you control over all print options.  In addition,
  2510.      features are provided allowing you to save and load any number of
  2511.      predefined printer control configurations.  During the printing stage, a
  2512.      status window pops up and displays some useful information including a
  2513.      status bar which gets filled indicating percent completion.
  2514.  
  2515.      Once GPMENU is invoked, three windows will be displayed.  The tall window
  2516.      at the left of your screen will display the menu options.  The help
  2517.      window at the bottom of the screen displays a brief description of the
  2518.      currently highlighted menu item.  The larger window at the top of the
  2519.      screen displays the current parameter settings.
  2520.  
  2521.      The best way to become familiar with the menu driven program is to simply
  2522.      use it and try different options.  The on screen help window at the bottom
  2523.      of the screen explains each menu option, more detailed information on each
  2524.      topic may be found in the GPU Command Summary section.  You may use any
  2525.      of the .PGL drawing files included on the distribution diskettes to
  2526.      experiment with.  Except while printing, you may exit GPMENU at any time
  2527.      by entering ALT-X.
  2528.  
  2529.      The second method of printing is to use the GPU utility program.  The
  2530.      intent of including this command line utility is to allow you the
  2531.      capability of printing from within your application by spawning the
  2532.      utility (see discussion in previous section) and to allow batch file
  2533.      processing of drawing files.  This program prints drawing files using the
  2534.      command line or the GPU environment variable to specify printer control
  2535.      parameters.  Refer to the Printer Control Parameters section for a
  2536.      complete listing and description of the control options available.
  2537.  
  2538.  
  2539. GPU Command Summary
  2540.  
  2541.      Usage:  C:\> GPU file.plt /D=HPLJET /R=3 ......
  2542.  
  2543.      Multiple files may be printed from a single command line using the '*'
  2544.      and '?' wild cards.  Any options set as a command line flag supersedes
  2545.      the same options found in the environment.  The acceptable flags are:
  2546.  
  2547.  
  2548.      Flag      Description    Default   Possible Values
  2549.  
  2550.      /U=#      Output         PRN       #= output file/device (LPT1, LPT2...)
  2551.      /O=#      Orientation    P         #= L(andscape), P(ortrait)
  2552.      /R=#      Resolution     0         #= 0, 1, 2, 3 depends on device
  2553.      /D=#      Driver name    HPLJET    #= Output device name of file driver
  2554.      /Z=#      Page size      H         #= H(alf), F(ull), Q(uarter)
  2555.      /I=#      Invert flag    OFF       #= Off, On
  2556.      /E=#      EMM usage      ON        #= Off, On
  2557.      /P=#      Font path      NONE      #= Path to PGL fonts and driver files
  2558.      /M=#      Left, Right    100,100   #= 1 inch = 100 units, Left, Right
  2559.                Top, Bottom    100,100   #= 1 inch = 100 units, Top, Bottom
  2560.      /C=#      Copies         1         #= 1 to 99
  2561.      /Y=#      Fill density   N         #= N(ormal), H(igh)
  2562.      /F=#      Form feed      ON        #= Off, On
  2563.      /Q        Quiet switch   ---       Suppresses screen output
  2564.      /B=#      Buffer size    64        #= Maximum=64K, Minimum=8K
  2565.  
  2566.  
  2567.      Printer control flags may also be set using the DOS SET command and the
  2568.      GPU environment variable as follows:
  2569.  
  2570.           SET GPU=/O:L /R:2 /D:HPLJET
  2571.  
  2572.      Using the GPU environment variable is the preferred way to define standard
  2573.      GPU flags.  The command line flags always take precedence over the
  2574.      environment flags.  This makes it easy to define standard output flags
  2575.      and yet override them with other flags at any time.  If you use the
  2576.      command line utility, it is recommended that you place a command in your
  2577.      AUTOEXEC.BAT file setting the GPU environment variable with flags suitable
  2578.      for your printer device.
  2579.  
  2580.      The flags shown above use the ':' character to separate the flag from the
  2581.      value.  This is because the DOS SET command does not accept the '=' sign
  2582.      in an environment variable.  The ToolKit allows any character to be used
  2583.      here, but at least a space character must be used.  We suggest you use
  2584.      ':' for the environment variable flags and '=' for the GPU command line
  2585.      flags.  Some typical examples using GPU follow with a brief description:
  2586.  
  2587.      1)   GPU demo.plt
  2588.  
  2589.           Print demo.plt using defaults or options in the GPU environment
  2590.           variable.
  2591.  
  2592.      2)   GPU demo*.plt
  2593.  
  2594.           Print all files with a file name prefaced by 'demo' and an extension
  2595.           of .plt using the default settings or any options set in the GPU
  2596.           environment variable.
  2597.  
  2598.      3)   GPU demo.plt  /D=EPLQ /O=L /Z=F /E=OFF
  2599.  
  2600.           Print demo.plt using the Epson LQ driver, landscape page orientation,
  2601.           full page size, and ignore EMM if present.
  2602.  
  2603.      4)   GPU demo.plt /U=demo.bin /D=HPDJET /R=3
  2604.  
  2605.           Print demo.plt using the HP DeskJet driver, send the output to the
  2606.           file named 'demo.bin', and use printer resolution setting 3 (High).
  2607.           To print 'demo.bin', use the DOS COPY command with the binary flag
  2608.           as follows:
  2609.  
  2610.           COPY /b demo.bin PRN
  2611.  
  2612.           The PRN output destination could be LPT1, LPT2, or any valid MS-DOS
  2613.           device or file name.  To copy a file to the serial port, you must
  2614.           use the SCPY program provided with the ToolKit.
  2615.  
  2616.      5)   GPU demo.plt /D=EGA /P=\pgl
  2617.  
  2618.           Output demo.plt to the screen in EGA 16 color mode, use the GPU
  2619.           environment variable flags and check the \pgl directory for font
  2620.           files and device drivers.
  2621.  
  2622.      6)   GPU demo.plt /D=PCX /R=2 /U=demo.pcx
  2623.  
  2624.           Create a monochrome .PCX file called demo.pcx from demo.plt using
  2625.           resolution 2 (150 dpi).
  2626.  
  2627.      7)   GPU demo.plt /D=HPLJET3 /Z=F /M=100,100,150,150
  2628.  
  2629.           Print demo.plt using the HP LaserJet III driver, full page size, and
  2630.           with left/right margins of 1" and top/bottom margins of 1.5".
  2631.  
  2632.      8)   GPU demo.plt /D=HPLJET3 /U=COM1:19200,N,8,1,1,1
  2633.  
  2634.           Print demo.plt using the HP LaserJet III driver and output to the
  2635.           COM1 serial communication port.
  2636.  
  2637.      9)   GPU demo.plt /B=8
  2638.  
  2639.           Print demo.plt using an 8K buffer for building the output bitmap in.
  2640.  
  2641.  
  2642. Printer Control Parameters
  2643.  
  2644.      PGL gives you complete control over the printing process by allowing you
  2645.      to specify page size, orientation, margins, number of copies, resolution,
  2646.      etc.  Except for the file name, all parameters have a default setting.
  2647.  
  2648.      The various printer control parameters are described below.  The examples
  2649.      listed are for the GPU command line utility.
  2650.  
  2651.  
  2652.      File Name
  2653.  
  2654.           The name of the drawing file to plot.  You may specify a single file
  2655.           to plot such as TEST.PLT or multiple files by using the '*' and '?'
  2656.           wild cards such as TEST?.PLT, T*.PLT, TEST.*, etc.
  2657.  
  2658.           EXAMPLE:  GPU test?.plt
  2659.  
  2660.  
  2661.      Output Device Destination (/U)
  2662.  
  2663.           The /U flag specifies the destination of the output device or file.
  2664.           PGL uses MS-DOS file handle functions for output and is compatible
  2665.           with most networks such as NOVELL.  PGL writes the graphics image
  2666.           bitmap to the specified output file or device with the specified
  2667.           printer's control codes embedded in the bitmap data and is,
  2668.           therefore, not directly viewable on screen.  If output is sent to a
  2669.           file, it may subsequently be copied to any printer compatible with
  2670.           those associated with the device driver used.  To copy a file to the
  2671.           printer, use:
  2672.  
  2673.           copy /b file.nam PRN
  2674.  
  2675.           Valid output devices are PRN, LPT1, LPT2, LPT3, COM1, COM2, or a
  2676.           file.  PRN, LPT1, LPT2, and LPT3 are parallel port interfaces while
  2677.           COM1 and COM2 are serial port interfaces.  The default output device
  2678.           is PRN.
  2679.  
  2680.           EXAMPLE:  GPU file.nam /U=LPT1
  2681.  
  2682.           When using COM1 or COM2 serial ports, additional information is
  2683.           required unless the PGL default settings are satisfactory.  When
  2684.           using serial ports, the /U command flag takes the form:
  2685.  
  2686.           /U=COM1:baudrate,parity,databits,stopbits,DTR/CTS,Xon/Xoff
  2687.  
  2688.           Valid options for each serial port parameter are as follows:
  2689.  
  2690.                Baud rate:     1200, 2400, 4800, 9600, 19200.  The default is
  2691.                               19200.
  2692.                Parity:        N(one), O(dd), or E(ven).  The default is N
  2693.                Databits:      Data size - 7 or 8 bits.  The default is 8.
  2694.                Stopbits:      1 or 2.  The default is 1.
  2695.                DTR/CTS:       Hardware handshake - 0=OFF or 1=ON.  The
  2696.                               default is 1.
  2697.                Xon/Xoff:      Flow control - 0=OFF or 1=ON.  The default
  2698.  
  2699.           EXAMPLE:  GPU file.nam /U=COM1:9600,N,8,1,1,1
  2700.  
  2701.  
  2702.      Device Driver (/D)
  2703.  
  2704.           The /D flag specifies the name of the device driver appropriate for
  2705.           your printer.  For example, the PCXC driver is used to output in a
  2706.           PCX color file format and HPLJET3 is used to output to an HP
  2707.           LaserJet III printer.  Refer to Chapter 8 for a complete list of
  2708.           available device drivers.  The default device driver is HPLJET.
  2709.  
  2710.           EXAMPLE:  GPU file.nam /D=HPLJET3
  2711.  
  2712.  
  2713.      Resolution (/R)
  2714.  
  2715.           Resolution is dependent on the device you are printing to and may be
  2716.           the values 0-3 with 0 being the lowest resolution and 3 the highest.
  2717.           Not all printers have 4 resolutions.  If you specify a resolution
  2718.           which exceeds your printers capabilities, printing will default to
  2719.           using the highest resolution available.  The default resolution is 2.
  2720.  
  2721.           Printing speed and the amount of memory required to hold the entire
  2722.           graphics image bitmap increases with output resolution.  For
  2723.           debugging purposes, you may wish to print at a lower resolution.
  2724.  
  2725.           EXAMPLE:  GPU file.nam /R=3
  2726.  
  2727.  
  2728.      Page Margins (/M)
  2729.  
  2730.           There are four parameters allowing you to specify the page margins
  2731.           in the order LEFT, RIGHT, TOP, and BOTTOM page margins.  Margins are
  2732.           set using the scale 100=1" (e.g., 150=1.5", 200=2", etc.).  The
  2733.           default margins are 1" borders all around the page.  The minimum
  2734.           margins allowed are 0.5" all around.
  2735.  
  2736.           EXAMPLE:  GPU file.nam /M=50,50,150,150
  2737.  
  2738.  
  2739.      Page Orientation (/O)
  2740.  
  2741.           Page orientation specifies the layout of the page as L(andscape) or
  2742.           P(ortrait).  The default orientation is PORTRAIT.
  2743.  
  2744.           EXAMPLE:  GPU file.nam /O=L
  2745.  
  2746.  
  2747.      Page Size (/Z)
  2748.  
  2749.           Page size specifies the portion of the page to use for printing.
  2750.           The valid options are H(alf), F(ull), and Q(uarter) page.  The true
  2751.           region on the page used for printing is also a function of the page
  2752.           margins you've specified.  The default page size is HALF.
  2753.  
  2754.           You should be aware that some devices, such as laserjets, have
  2755.           certain minimum memory requirements to allow high resolution graphics
  2756.           printing in full page mode.
  2757.  
  2758.           EXAMPLE:  GPU file.nam /Z=H
  2759.  
  2760.  
  2761.      Invert Flag (/I)
  2762.  
  2763.           The invert flag specifies whether graphics are printed as a positive
  2764.           image (i.e., black images on white background) or as a negative
  2765.           image (i.e., white images on a black background).  By default,
  2766.           graphics are printed as positive images and the invert flag is
  2767.           turned OFF.
  2768.  
  2769.           EXAMPLE:  GPU file.nam /I=ON
  2770.  
  2771.  
  2772.      EMM Usage (/E)
  2773.  
  2774.           The EMM flag is used to specify whether expanded memory should be
  2775.           ignored or used if available.  When turned OFF, EMM will be ignored
  2776.           and when turned ON, EMM will be used if available.  By default, EMM
  2777.           is turned ON.
  2778.  
  2779.           In most cases, you will want to use EMM if you have it.  However,
  2780.           using EMM may sometimes cause your computer to lock-up as might be
  2781.           the case if you are printing through a network.  This is an
  2782.           unpredictable problem resulting from certain software not correctly
  2783.           negotiating the use of expanded and/or extended memory.  PGL uses the
  2784.           LIM EMM 3.2 commands for manipulating EMM usage.
  2785.  
  2786.           EXAMPLE:  GPU file.nam /E=OFF
  2787.  
  2788.  
  2789.      Path (/P)
  2790.  
  2791.           The path parameter specifies the directory where the PGL device
  2792.           drivers and font files reside.  These files must reside in the same
  2793.           directory.  There is no directory path by default, therefore, PGL
  2794.           will first search the local directory for these files.  If not
  2795.           found, then PGL will search the path specified by the environment
  2796.           variable.
  2797.  
  2798.           The path parameter only applies to the command line utility.  If you
  2799.           are using the GPU print utility, the drivers and font files must
  2800.           either reside in the local directory or you must set the GPU
  2801.           environment variable in your AUTOEXEC.BAT file to specify the path
  2802.           where they can be found.  For example, if you installed the files
  2803.           in D:\PGL, then the following statement would be inserted into your
  2804.           AUTOEXEC.BAT file:
  2805.  
  2806.                SET GPU=/P:D:\PGL
  2807.  
  2808.           or the path may be specified on the GPU command line:
  2809.  
  2810.           EXAMPLE:  GPU file.nam /P=D:\PGL
  2811.  
  2812.  
  2813.      Copies (/C)
  2814.  
  2815.           The copies parameter allows you to print up to 99 copies of each
  2816.           page of graphics in your drawing file.  The default setting is for
  2817.           one copy.
  2818.  
  2819.           EXAMPLE:  GPU file.nam /C=3
  2820.  
  2821.  
  2822.      Fill Density (/Y)
  2823.  
  2824.           The fill density parameter is only applicable when printing at
  2825.           resolutions higher than 180x180 dpi.  The valid options are N(ormal)
  2826.           or H(igh) density fill.  When set to HIGH, fill patterns will tend
  2827.           to appear as shades of gray (color) due to the higher resolution.
  2828.           The default setting is to print with normal fill.
  2829.  
  2830.           EXAMPLE:  GPU file.nam /Y=H
  2831.  
  2832.  
  2833.      Form Feed (/F)
  2834.  
  2835.           The form feed parameter allows you to suppress each page from being
  2836.           ejected after printing.  All plots contained in your file will be
  2837.           overlaid on top of one another.  If you suppress form feeds, you
  2838.           must manually eject the page when printing is completed.  The valid
  2839.           settings are OFF or ON.  The default setting is to enable form feed.
  2840.           This option is only suitable for use on laserjet devices.
  2841.  
  2842.           EXAMPLE:  GPU file.nam /F=ON
  2843.  
  2844.  
  2845.      Quiet Switch (/Q)
  2846.  
  2847.           When you run GPU, the control options along with your selections
  2848.           will be displayed to the screen.  You may disable screen output with
  2849.           the quiet switch.
  2850.  
  2851.           EXAMPLE:  GPU file.nam /Q
  2852.  
  2853.  
  2854.      Buffer Size (/B)
  2855.  
  2856.           You may specify the maximum size of the print buffer used to build
  2857.           the bitmap image sent to the printer.   The maximum amount usable is
  2858.           64K (/B=64), the minimum amount usable is 8K (/B=8).   When running
  2859.           GPU from inside an application, a compiler's integrated development
  2860.           environment, or inside a text editor, you should limit the print
  2861.           buffer to 8K.  By default, the program will attempt to use as much
  2862.           memory as is available up to 64K.
  2863.  
  2864.           EXAMPLE:  GPU file.nam /B=8
  2865.  
  2866.  
  2867. System Files
  2868.  
  2869.      For the purposes of this discussion, system files consist of all PGL font
  2870.      files (*.FNT), device driver files (*.DRV), PGCONFIG.SYS, and PGLDRV.LST.
  2871.      When running the GPMENU print utility program, these files are expected
  2872.      to reside either in the local directory or the directory specified by the
  2873.      PGL environment variable.  When using the GPU command line utility, the
  2874.      GPU environment variable is used unless you use the /P flag to specify
  2875.      the directory path.  If you installed PGL in the C:\PGL directory, then
  2876.      the following environment variables would be inserted into your
  2877.      AUTOEXEC.BAT file.
  2878.  
  2879.           SET PGL=C:\PGL
  2880.           SET GPU=/P:C:\PGL  ( See GPU Command Summary )
  2881.  
  2882.  
  2883. PGL2PS Utility
  2884.  
  2885.      The PGL2PS file conversion utility reads PGL drawing files and creates
  2886.      PostScript output files.  Output from PGL2PS may be sent to a file or
  2887.      directly to a PostScript printer.  PostScript output files are generic
  2888.      and are based on an early version of PostScript to provide the most
  2889.      compatibility with PostScript devices.  An advantage to using this
  2890.      utility instead of the GPU or GPMENU utilities is that PGL2PS uses the
  2891.      PostScript fonts on PostScript printers, whereas, GPU and GPMENU
  2892.      PostScript outputs are generated using PGL vector fonts.  Also, GPU and
  2893.      GPMENU outputs are in the form of compressed bitmap images, whereas,
  2894.      PGL2PS outputs use PostScript graphics primitives (lineto, moveto, arc,
  2895.      etc.).  Therefore, output from PGL2PS may be scaled without any loss of
  2896.      image quality.  PGL2PS also supports color PostScript output.  This
  2897.      utility accepts command line options, but supports no environment
  2898.      variables.  Valid command line options are listed below:
  2899.  
  2900.      Usage:  PGL2PS in_file out_file flags
  2901.  
  2902.      Flag      Description    Default             Possible Values
  2903.  
  2904.      /O=#      Orientation    P                   P(ortrait), L(andscape)
  2905.      /Z=#      Page size      H                   H(alf), F(ull), Q(arter)
  2906.      /I=#      Invert flag    OFF                 Off, On
  2907.      /M=#      Margins        100,100,100,100     100=1:
  2908.      /C=#      Copies         1                   1-9
  2909.      /F=#      Form feeds     ON                  Off, On
  2910.      /R=#      Color Model    BW                  BW, GRAY, RGB
  2911.      /P=#      Path           none                Path to the PGL.PS file
  2912.      /Q        Quiet switch   ---                 Suppresses screen output
  2913.  
  2914.      EXAMPLE:       PGL2PS test.plt test.ps /Z=F
  2915.  
  2916.      The PGL2PS utility uses some of the same command line flags used by GPU
  2917.      (see GPU Command Summary for flag descriptions) with the exception of the
  2918.      /R flag.  This flag is used to specify the color model used by the
  2919.      PostScript printer.  The default color model is Black & White (BW), color
  2920.      zero is white and all other colors are black.  The Gray color model uses
  2921.      the intensity of each of the 16 VGA screen colors to determine a shade
  2922.      of gray.  Color indices between 16 and 255 are displayed as black.  The
  2923.      RGB color model allows you to specify the amount of Red, Green, and Blue
  2924.      color used by each color index in the range 0-255.  The default RGB color
  2925.      settings are similar to those found on a standard VGA screen using the
  2926.      VGA 256 (320x200) color mode.  The ToolKit library functions
  2927.      pgSetRgbPalette, and pgSetPalette my be used to alter the default RGB
  2928.      settings.
  2929.  
  2930.  
  2931. SCPY Utility
  2932.  
  2933.      SCPY is a utility program used for copying files to output devices
  2934.      connected to a serial port.  If you use the ToolKit's printing utilities
  2935.      to output to a disk file rather than a printer, you may need this
  2936.      utility to subsequently send the file to the printer.  If your printer
  2937.      is connected to a serial port, you must either use the DOS MODE command
  2938.      to configure the serial port or you can use this utility to copy the file
  2939.      to the printer.  An advantage of the SCPY utility is that it can transfer
  2940.      files at baud rates up to 19200 while the DOS MODE command is limited to
  2941.      9600.  If you are currently using the DOS MODE command to configure your
  2942.      printer and serial port but use the SCPY utility for faster printing,
  2943.      you must use the DOS MODE command to reconfigure your serial port and
  2944.      printer after executing SCPY.  You should copy the SCPY program to a
  2945.      directory in your PATH for convenient access.  The SCPY command format is
  2946.      shown below:
  2947.  
  2948.      Usage:    SCPY -device -f -q file1 file2....
  2949.  
  2950.      device:   PORT:baud,parity,data,stop,dtr,xon
  2951.  
  2952.                PORT   -  *COM1, COM2
  2953.                baud   -  1200, 2400, 4800, 9600, *19200
  2954.                parity -  *N(one), O(dd), E(ven)
  2955.                data   -  7(bits), *8(bits)
  2956.                stop   -  *1(bit), 2(bits)
  2957.                dtr    -  *1(On), 0(Off)
  2958.                xon    -  *1(On), 0(Off)
  2959.  
  2960.      f:        Sends a form feed after each file.
  2961.  
  2962.      q:        Quiet switch, suppresses all screen output.
  2963.  
  2964.      * Denotes default values.
  2965.  
  2966.      EXAMPLE:  SCPY -com1:19200,N,8,1,1,1  file.bin
  2967.  
  2968.  
  2969.                    ******************************************
  2970.                    ** Chapter 8:  SUPPORTED OUTPUT DEVICES **
  2971.                    ******************************************
  2972.  
  2973.  
  2974.      The ToolKit supports raster (bitmap) and vector based printers and file
  2975.      formats.  Dot Matrix, LaserJet, PaintJet, and DeskJet printers are raster
  2976.      devices.  The PCX file format is also a raster file format.   PostScript
  2977.      printers can function either as a raster device or as a vector device.
  2978.      The ToolKit supports PostScript printers as a raster device using GPU or
  2979.      GPMENU and as a vector device using PGL2PS.
  2980.  
  2981.      The ToolKit supports raster printers by creating high resolution bitmap
  2982.      images in memory using one or more bitplanes, very much like the EGA and
  2983.      VGA graphics adapters.  Printing is performed by either the GPU command
  2984.      line print utility or the menu driven GPMENU print utility.  Both
  2985.      utilities can create color images using up to eight bitplanes.  After an
  2986.      image is created, the bitplanes are then sent to the selected output
  2987.      device.
  2988.  
  2989.      The ToolKit supports vector based printers by converting PGL drawing files
  2990.      to the desired vector format.  For instance, PostScript output may be
  2991.      generated in vector format using the PGL2PS PostScript language
  2992.      conversion program included with the ToolKit.  Additional vector device
  2993.      or file formats may be available.  Refer to the READ.ME file for an up-
  2994.      to-date listing of current vector device support.
  2995.  
  2996.      This chapter describes the specifics of the raster based output devices
  2997.      supported by the ToolKit printing utilities GPU and GPMENU.
  2998.  
  2999.  
  3000. Selecting A Raster Output Device
  3001.  
  3002.      The following is a list of supported output devices:
  3003.  
  3004.           Device         Description
  3005.  
  3006.           EPFX           EPSON               FX/MX
  3007.           EPFXWC                             FX/MX Wide Carriage
  3008.           EPLQ                               LQ
  3009.           EPLQWC                             LQ Wide Carriage
  3010.           EPLQLO                             LQ Low Res
  3011.           EPLQLOWC                           LQ Low Res Wide Carriage
  3012.           EPS            POSTSCRIPT          Generic-Bitmap
  3013.           CITMSP10       CITIZEN             MSP-10
  3014.           CITMSP15                           MSP-15  Wide Carriage
  3015.           CITGSX140                          GSX 140
  3016.           HPLJET         HEWLETT-PACKARD     LaserJet Plus, LaserJet II, IID
  3017.           HPLJET2P                           LaserJet IIP
  3018.           HPLJET3                            LaserJet III, IIID
  3019.           HPLJET3P                           LaserJet IIIP
  3020.           HPDJET                             DeskJet, DeskJet Plus, DeskJet 500
  3021.           HPDJETC                            DeskJet 500C
  3022.           HPPJET                             PaintJet, PaintJet/XL
  3023.           HPPJETXL                           PaintJet/XL
  3024.           HPTJET                             ThinkJet
  3025.           PCX            PCX FILE DRIVER     75, 150, 300 dpi Monochrome
  3026.           PCXEGA                             EGA, Monochrome
  3027.           PCXVGA                             VGA, Monochrome
  3028.           PCXSVGA                            SuperVGA, Monochrome
  3029.           PCX8514                            IBM8514, Monochrome
  3030.           PCXC                               75, 150, 300 dpi 16 Color
  3031.           PCXEGAC                            EGA, 16 Color
  3032.           PCXVGAC                            VGA, 16 Color
  3033.           PCXSVGAC                           SuperVGA, 16 Color
  3034.           PCX8514C                           IBM8514, 16 Color
  3035.           PCXHERC                            Hercules, 2 Monochrome
  3036.           EGA            SCREEN DRIVER       EGA 640x350 16 Color
  3037.           VGA                                VGA 640x480 16 Color
  3038.           EGAMONO                            EGA 640x350 Monochrome
  3039.           VGAMONO                            VGA 640x480 Monochrome
  3040.           HERC                               Hercules 720x348 Monochrome
  3041.  
  3042.  
  3043.      The ToolKit supports most popular Dot Matrix, LaserJet and InkJet
  3044.      printers.  Additional output device support will be added based on user
  3045.      feedback and our research.
  3046.  
  3047.      If your printer is not listed above, it may be compatible with one that
  3048.      is.  Most printers emulate one of the industry standard printers.  Some
  3049.      printers require special dip switch settings in order to provide
  3050.      emulation while others automatically perform emulation.  Refer to your
  3051.      printer documentation for specific emulation instructions.
  3052.  
  3053.  
  3054. Printer Emulations
  3055.  
  3056.      This section lists some of the common printers known to emulate the Epson
  3057.      FX series, Epson LQ series, HP LaserJet II series, HP PaintJet, and
  3058.      PostScript printers.  These printers have not all been tested with the
  3059.      ToolKit, but their manufacturers claim compatibility with either the
  3060.      Epson FX, Epson LQ, HP LaserJet II series, HP PaintJet, or PostScript
  3061.      printers.  All of these printers should work with the prescribed PGL
  3062.      drivers (i.e., Epson FX - EPFX, Epson LQ - EPLQ, HP LaserJet II - HPLJET,
  3063.      PostScript - EPS, HP PaintJet - HPPJET).
  3064.  
  3065.  
  3066.                               Epson FX Emulation
  3067.  
  3068.      AEG Olympia NP 80SE                    Fortis DM3215
  3069.      AEG Olympia NP 136SE                   Genicom 3840
  3070.      ALPS ASP1600                           Genicom 3840E
  3071.      Brother M-1309                         IBM PP Series II 2380
  3072.      Brother M-1909                         IBM PP Series II 2381
  3073.      Bull Compuprint 4/22                   Mannesmann Tally 130/9
  3074.      Bull Compuprint 4/23                   Mannesmann Tally 131/9
  3075.      Bull Compuprint 4/40                   Mannesmann Tally MT661
  3076.      Bull Compuprint 4/43                   NCR 6417-0101
  3077.      Bull Compuprint 4/68                   NCR 6421-0201
  3078.      Bull Compuprint 970                    Olivetti DM309E
  3079.      CIE CI-250 LXP                         Olivetti DM600S
  3080.      CIE CI-5000                            Output Duraline
  3081.      Citizen 200GX                          Panasonic KX-P1180
  3082.      Citizen 200GX Fifteen                  Panasonic KX-P1191
  3083.      Citizen MSP-10                         Seikosha SP-2000
  3084.      Citizen MSP-15                         Seikosha BP 5780
  3085.      C-Tech C-645                           Star NX-1500
  3086.      C-Tech ProWriter C-240                 Star XR-1000
  3087.      C-Tech ProWriter C-245                 Star XR-1020 Multi-Font
  3088.      Dataproducts 9030                      Star XR-1520 Multi-Font
  3089.      Dataproducts 9044                      Tandy DMP 135
  3090.      Datasouth Performax                    Tandy DMP 136
  3091.      Datasouth XL-300                       Tandy DMP 2130
  3092.      Facit B1200                            TI 8930
  3093.  
  3094.  
  3095.                               Epson LQ Emulation
  3096.  
  3097.      AEG Olympia NP 80-24E                  Mannesmann Tally 130/24
  3098.      ALPS Allegro 500                       Mannesmann Tally 131/24
  3099.      ALPS Allegro 500XT                     Mannesmann Tally MT82
  3100.      Brother M-1324                         NEC Pinwriter P3200
  3101.      Brother M-1924L                        NEC Pinwriter P3300
  3102.      Bull Compuprint 4/24                   NEC Pinwriter P5200
  3103.      Bull Compuprint 4/54                   NEC Pinwriter P5300
  3104.      Canon BJ-300 Bubble Jet                NEC Pinwriter P6200
  3105.      Canon BJ-330 Bubble Jet                NEC Pinwriter P6300
  3106.      Citizen GSX-130                        NEC Pinwriter P9300
  3107.      Citizen GSX-140                        Okidata Microline 380
  3108.      Citizen GSX-140 Plus                   Okidata Microline 390 Plus
  3109.      Citizen GSX-145                        Okidata Microline 391 Plus
  3110.      Citizen PN48                           Okidata Microline 393 Plus
  3111.      C-Tech C-510                           Olivetti DM600S
  3112.      C-Tech C-515                           Panasonic KX-P1123
  3113.      C-Tech C-610 Plus                      Panasonic KX-P1124
  3114.      C-Tech C-610C Plus                     Panasonic KX-P1124i
  3115.      Epson DFX-8000                         Panasonic KX-P1624
  3116.      Epson LQ-200                           Panasonic KX-P1695
  3117.      Epson LQ-850                           Panasonic KX-P2624
  3118.      Epson LQ-860                           Seikosha SL-90
  3119.      Epson LQ-1010                          Star NX-1020 Rainbow
  3120.      Epson LQ-1050                          Star NX-2410
  3121.      Epson LQ-2500                          Star NX-2415
  3122.      Fujitsu DL3600                         Star NX-2420 Multi-font
  3123.      Fujitsu DL4600                         Star NX-2420 Rainbow
  3124.      HP Rugged Writer                       Star XB-2420 Multi-font
  3125.      IBM ExecJet                            Star XB-2425 Multi-font
  3126.      IBM PP Series II 2390                  Star Starjet SJ-48
  3127.      IBM PP Series II 2391                  Tandy DMP 240
  3128.  
  3129.  
  3130.                         HP LaserJet Series II Emulation
  3131.  
  3132.      Apple Person LaserWriter NT            NEC Silentwriter
  3133.      Acer LP76                              NEC Silentwriter2 90
  3134.      Bezier BP4040                          NEC Silentwriter2 290
  3135.      Brother HL-4                           NEC Silentwriter2 990
  3136.      Brother HL-8                           NewGen Turbo PS/360
  3137.      Brother HL-8e                          NewGen Turbo PS/480
  3138.      Brother HL-8V                          Okidata Okilaser 400
  3139.      Brother HL-4PS                         Okidata Okilaser 820
  3140.      C. Itoh ProWriter CI-4                 Okidata Okilaser 840
  3141.      Dataproducts LZR 650                   Okidata OL830
  3142.      Dataproducts LZR 960                   Olivetti PG 306
  3143.      Dataproducts LZR 2450D                 Packard Bell BP9500
  3144.      DEClaser 1150                          Panasonic KX-P4420
  3145.      Epson EPL-6000                         Panasonic KX-P4450i
  3146.      Epson EPL-7000                         Panasonic KX-P4455
  3147.      Epson EPL-7500                         Panasonic KX-P4455 LP
  3148.      Everex Abaton Laser Script             PCPI Laser Image 1030
  3149.      Everex LaserScript LX                  QMS PS-410
  3150.      Facit P6060                            QMS PS-810 Turbo
  3151.      Fujitsu RX7100PS Plus                  QMS PS-815
  3152.      Fujitsu RX7100 S/2                     QMS PS-815 MR
  3153.      HP LaserJet IIISi                      QMS PS-820 Turbo
  3154.      IBM LaserPrinter 5e                    QMS PS-825
  3155.      IBM LaserPrinter 6                     QMS PS-2000
  3156.      IBM LaserPrinter 10                    QMS PS-2210
  3157.      IBM LaserPrinter 10L                   Qume Crystal Print Express
  3158.      IBM LaserPrinter 4019                  Qume Crystal Print Publisher II
  3159.      IBM Laser Printer E                    Qume Crystal Print Series II
  3160.      Kodak Ektaplus 7008                    Qume Crystal Print Super Series II
  3161.      Kodak Ektaplus 7016 PS                 Sharp JX-9500
  3162.      Kyocera F-5000A                        Sharp JX-9500H
  3163.      Kyocera F Series                       Sharp JX-9500PS
  3164.      LaserMaster TrueTech 1200              Sharp JX-9700
  3165.      Mannesmann Tally 906PS                 Star LaserPrinter 8II
  3166.      Mannesmann Tally MT735                 Star LaserPrinter 4
  3167.      Mannesmann Tally MT911 PS              Star LaserPrinter 4 StarScript
  3168.      Microtek TrueLaser                     Tandy LP 950
  3169.      Mitek 130T                             TI MicroLaser
  3170.      NCR 6435                               TI MicroLaser PS35
  3171.      NCR 6436-0301                          Toshiba PageLaser 6
  3172.      NCR 6436-0501
  3173.  
  3174.  
  3175.                              PostScript Emulation
  3176.  
  3177.      Apple Personal LaserWriter NT          NEC Silentwriter2 290
  3178.      Bezier BP4040                          NEC Silentwriter2 990
  3179.      Brother HL-4PS                         NewGen TurboPS/360
  3180.      CalComp ColorMaster Plus 6603PS        NewGen TruboPS/480
  3181.      Dataproducts LZR 960                   Oce Graphics G5241-PS
  3182.      DEClaser 1150                          Okidata OkiLaser 840
  3183.      DEClaser 2150                          Okidata OL830
  3184.      DEClaser 2250                          Panasonic KX-P4455 Laser Partner
  3185.      EiconLaser                             Printware 720 IQ Professional II
  3186.      Epson EPL-7500                         Printware Pro-III
  3187.      Everex Abaton LaserScript              QMS ColorScript 100 Model 10p
  3188.      Everex LaserScript LX                  QMS PS-410
  3189.      Fujitsu RX7100 S/2                     QMS PS-810 Turbo
  3190.      GCC BLP II                             QMS PS-815
  3191.      GCC BLP IIS                            QMS PS-815 MR
  3192.      General Parametrics Spectra*Star 430   QMS PS-820 Turbo
  3193.      Kodak Ektaplus 7016 PS                 QMS PS-825
  3194.      LaserMaster LM 1000                    QMS PS-2000
  3195.      LaserMaster TrueTech 800/4             QMS PS-2210
  3196.      LaserMaster TrueTech 1000              Qume CrystalPrint Express
  3197.      LaserMaster TrueTech 1200              Qume CrystalPrint Publisher II
  3198.      Mannesmann Tally 906PS                 Seiko ColorPoint PSX Model 4
  3199.      Mannesmann Tally MT911 PS              Seiko ColorPoint PSX Model 14
  3200.      Microtek TrueLaser                     Sharp JX-9500 PS
  3201.      Mitek 130T                             Star LaserPrinter 4 StarScript
  3202.      NCR 6436-0501                          Tektronics Phaser II PXi
  3203.      NEC Colormate PS Model 40              Tektronics Phaser III Pxi
  3204.      NEC Silentwriter2 90                   TI microlaser XL PS35
  3205.  
  3206.  
  3207.                              HP PaintJet Emulation
  3208.  
  3209.      HP PaintJet
  3210.      HP PaintJet/XL
  3211.      Kodak Diconix Color 4
  3212.  
  3213.  
  3214. Device Driver Descriptions
  3215.  
  3216.      EPFX - Epson FX Series
  3217.  
  3218.           Use the EPFX driver with Epson FX Series 9-pin printers and printers
  3219.           that emulate the FX.
  3220.  
  3221.           Support is provided for 60x72, 120x72, and 240x72 dpi in black and
  3222.           white.
  3223.  
  3224.           Supports paper size 8.5" by 11".
  3225.  
  3226.           Margin control may be adjusted by software but the paper must
  3227.           initially be aligned using the tractor feed adjustment controls.
  3228.  
  3229.  
  3230.      EPFXWC - Epson FX Wide Carriage Series
  3231.  
  3232.           Use the EPFXWC driver with wide carriage Epson FX Series 9-pin
  3233.           printers and printers that emulate the FX.
  3234.  
  3235.           Support is provided for 60x72, 120x72, and 240x72 dpi in black and
  3236.           white.
  3237.  
  3238.           Supports paper size 17" by 11".
  3239.  
  3240.           Margin control may be adjusted by software but the paper must
  3241.           initially be aligned using the tractor feed adjustment controls.
  3242.  
  3243.  
  3244.      EPLQ - Epson LQ Series
  3245.  
  3246.           Use the EPLQ driver with Epson LQ Series 24-pin printers including
  3247.           the Epson 850, 950, 1050, and 2550 and printers that emulate the
  3248.           Epson LQ Series.
  3249.  
  3250.           Support is provided for 180x180 and 360x180 dpi in black and white.
  3251.  
  3252.           Supports paper size 8.5" by 11".
  3253.  
  3254.           Margin control may be adjusted by software but the paper must
  3255.           initially be aligned using the tractor feed adjustment controls.
  3256.  
  3257.  
  3258.      EPLQWC - Epson LQ Wide Carriage Series
  3259.  
  3260.           Use the EPLQWC driver with wide carriage Epson LQ Series 24-pin
  3261.           printers including the Epson 850, 950, 1050, and 2550 and printers
  3262.           that emulate the Epson LQ Series.
  3263.  
  3264.           Support is provided for 180x180 and 360x180 dpi in black and white.
  3265.  
  3266.           Supports paper size 17" by 11".
  3267.  
  3268.           Margin control may be adjusted by software but the paper must
  3269.           initially be aligned using the tractor feed adjustment controls.
  3270.  
  3271.  
  3272.      EPLQLO - Epson LQ Series (Low Resolution)
  3273.  
  3274.           Use the EPLQLO driver with Epson LQ Series 24-pin printers including
  3275.           the Epson 850, 950, 1050, and 2550 and printers that emulate the
  3276.           Epson LQ Series.  This driver is used for producing low resolution
  3277.           output.
  3278.  
  3279.           Support is provided for 60x60 and 120x60 dpi in black and white.
  3280.  
  3281.           Supports paper size 8.5" by 11".
  3282.  
  3283.           Margin control may be adjusted by software but the paper must
  3284.           initially be aligned using the tractor feed adjustment controls.
  3285.  
  3286.  
  3287.      EPLQLOWC - Epson LQ Wide Carriage Series (Low Resolution)
  3288.  
  3289.           Use the EPLQWC driver with wide carriage Epson LQ Series 24-pin
  3290.           printers including the Epson 850, 950, 1050 and 2550, and printers
  3291.           that emulate the Epson LQ Series.  This driver is used for producing
  3292.           low resolution output.
  3293.  
  3294.           Support is provided for 60x60 and 60x120 dpi in black and white.
  3295.  
  3296.           Supports paper size 17" by 11".
  3297.  
  3298.           Margin control may be adjusted by software but the paper must
  3299.           initially be aligned using the tractor feed adjustment controls.
  3300.  
  3301.  
  3302.      CITMSP10 - Citizen MSP-10
  3303.  
  3304.           Use the CITMSP10 driver with the Citizen MSP-10 9-pin printer.  This
  3305.           printer can emulate the Epson FX.  The driver sets the printer into
  3306.           Epson FX emulation mode.  See the Epson FX driver description for
  3307.           further details.
  3308.  
  3309.  
  3310.      CITMSP15 - Citizen MSP-15
  3311.  
  3312.           Use the CITMSP15 with the Citizen MSP-15 9-pin printer wide carriage
  3313.           printer.  This printer can emulate the Epson FX.  The driver sets
  3314.           the printer into Epson FX emulation mode.  See the Epson FX driver
  3315.           description for further details.
  3316.  
  3317.  
  3318.      CITGSX140 - Citizen GSX 140
  3319.  
  3320.           Use the CITGSX140 driver with the Citizen GSX 140 24-pin printer.
  3321.           The Citizen GSX 140 can emulate  the Epson LQ Series printers.  The
  3322.           CITGSX140 driver sets the Citizen GSX 140 into Epson LQ emulation
  3323.           mode.  See the Epson LQ description for further details.
  3324.  
  3325.  
  3326.      HPLJET - HP LaserJet Series
  3327.  
  3328.           Use the HPLJET driver with the HP LaserJet Plus, LaserJet Series II,
  3329.           LaserJet IID and all LaserJet compatibles.  Dual sided printing is
  3330.           not supported on the IID.
  3331.  
  3332.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3333.           resolution in black and white.
  3334.  
  3335.           Supports 8.5" by 11" paper.
  3336.  
  3337.  
  3338.      HPLJET2P - HP LaserJet IIP
  3339.  
  3340.           Use the HPLJET2P driver with the HP LaserJet IIP and compatibles.
  3341.           This driver supports data compression when printing and will not
  3342.           work with the LaserJet series II.
  3343.  
  3344.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3345.           resolution in black and white.
  3346.  
  3347.           Supports 8.5" by 11" paper.
  3348.  
  3349.  
  3350.      HPLJET3 - HP LaserJet III
  3351.  
  3352.           Use the HPLJET3 driver with the HP LaserJet III, IIID and
  3353.           compatibles.  This driver supports data compression when printing
  3354.           and will not work with the LaserJet series II.  Dual sided printing
  3355.           is not supported on the IIID.
  3356.  
  3357.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3358.           resolution in black and white.
  3359.  
  3360.           Supports 8.5" by 11" paper.
  3361.  
  3362.  
  3363.      HPLJET3P - HP LaserJet IIIP
  3364.  
  3365.           Use the HPLJET3P driver with the HP LaserJet IIIP and compatibles.
  3366.           This driver supports data compression when printing and will not
  3367.           work with the LaserJet series II.
  3368.  
  3369.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3370.           resolution in black and white.
  3371.  
  3372.           Supports 8.5" by 11" paper.
  3373.  
  3374.  
  3375.      HPDJET - HP DeskJet, DeskJet Plus, DeskJet 500
  3376.  
  3377.           Use the HPDJET driver with the HP DeskJet, DeskJet Plus, and DeskJet
  3378.           500 printers and compatibles.
  3379.  
  3380.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3381.           resolution in black and white.
  3382.  
  3383.           Supports 8.5" by 11" paper.
  3384.  
  3385.  
  3386.      HPDJETC - HP DeskJet 500C
  3387.  
  3388.           Use the HPDJETC driver with the HP DeskJet 500C printers and
  3389.           compatibles.
  3390.  
  3391.           Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
  3392.           resolution in 8 and 16 colors.
  3393.  
  3394.           Supports 8.5" by 11" paper.
  3395.  
  3396.  
  3397.      HPPJET - HP PaintJet
  3398.  
  3399.           Use the HPPJET driver with the HP PaintJet and PaintJet XL printers
  3400.           and compatibles.
  3401.  
  3402.           Support is provided for 90x90 dpi resolution in 16 colors and
  3403.           180x180 dpi in 8 colors.
  3404.  
  3405.           Supports 8.5" by 11" paper.
  3406.  
  3407.  
  3408.      HPPJETXL - HP PaintJet/XL
  3409.  
  3410.           Use the HPPJETXL driver with the PaintJet XL printers and
  3411.           compatibles.  This driver does not work with the HP PaintJet.
  3412.  
  3413.           Support is provided for 180x180 dpi in 8 colors and 180x180 dpi in
  3414.           256 colors.
  3415.  
  3416.           Supports 8.5" by 11" paper.
  3417.  
  3418.  
  3419.      HPTJET - HP ThinkJet
  3420.  
  3421.           Use the HPTJET driver with the HP ThinkJet printer and compatibles.
  3422.  
  3423.           Support is provided for 80x80 and 160x160 dpi resolution in black
  3424.           and white.
  3425.  
  3426.           Supports 8.5" by 11" paper.
  3427.  
  3428.  
  3429.      EPS - PostScript
  3430.  
  3431.           Use the EPS driver for printing to PostScript printers or for saving
  3432.           Encapsulated PostScript files to disk.  This driver outputs
  3433.           Encapsulated PostScript files containing the bitmap image created in
  3434.           memory.  The image is compressed using Run Length Encoding to reduce
  3435.           printing time.  The output of this driver may be directed to disk or
  3436.           to a PostScript printer.  Encapsulated PostScript files can also be
  3437.           imported into desktop publishing packages.  This driver only supports
  3438.           black and white.  For color PostScript output use the PGL2PS
  3439.           conversion utility.
  3440.  
  3441.           Supports 75x75, 150x150, and 300x300 dpi resolutions in black and
  3442.           white.
  3443.  
  3444.           Supports 8.5" by 11" paper.
  3445.  
  3446.  
  3447.      PCX - PCX Monochrome File Format
  3448.  
  3449.           Use the PCX driver for saving black and white images to PC Paintbrush
  3450.           compatible .PCX files.  This driver can generate very large bitmap
  3451.           images.  Some software products may have trouble loading a 300 dpi
  3452.           full page bitmap image.  If you have a problem loading a .PCX file
  3453.           into another application try one of the PCX drivers listed below.
  3454.           PC Paintbrush IV Plus can load very large bitmaps and work with
  3455.           them.  Earlier versions of PC Paintbrush are limited in the size of
  3456.           the images with which they can work.
  3457.  
  3458.           Supports 75x75, 150x150, and 300x300 dpi resolution in black and
  3459.           white.
  3460.  
  3461.  
  3462.      PCXC - PCX Color File Format
  3463.  
  3464.           Use the PCXC driver for saving 16-color images to PC Paintbrush
  3465.           compatible .PCX files.  This driver can generate very large bitmap
  3466.           images.  Some software products may have trouble loading a 300 dpi
  3467.           full page 16-color bitmap image.  If you have a problem loading a
  3468.           .PCX file into another application, try one of the PCX drivers
  3469.           listed below.  PC Paintbrush IV Plus can load very large bitmaps and
  3470.           work with them.  Earlier versions of PC Paintbrush are limited in
  3471.           the size of the images with which they can work.
  3472.  
  3473.           Supports 75x75, 150x150, and 300x300 dpi resolution in 16-colors
  3474.           using multiple bitplanes.
  3475.  
  3476.  
  3477.      PCXEGA - PCX EGA Monochrome File Format
  3478.  
  3479.           Use the PCXEGA driver for saving black and white images to PC
  3480.           Paintbrush compatible .PCX files for subsequent viewing on
  3481.           monochrome EGA screens.
  3482.  
  3483.           Supports EGA size monochrome bitmaps.  Resolution settings are
  3484.           ignored by this driver.
  3485.  
  3486.  
  3487.      PCXEGAC - PCX EGA Color File Format
  3488.  
  3489.           Use the PCXEGAC driver for saving 16 color images to PC Paintbrush
  3490.           compatible .PCX files for subsequent viewing on color EGA screens.
  3491.  
  3492.           Supports EGA size 16 color 4 plane bitmaps.  Resolution settings are
  3493.           ignored by this driver.
  3494.  
  3495.  
  3496.      PCXVGA - PCX VGA Monochrome File Format
  3497.  
  3498.           Use the PCXVGA driver for saving black and white images to PC
  3499.           Paintbrush compatible .PCX files for subsequent viewing on
  3500.           monochrome VGA screens.
  3501.  
  3502.           Supports VGA size monochrome bitmaps.  Resolution settings are
  3503.           ignored by this driver.
  3504.  
  3505.  
  3506.      PCXVGAC - PCX VGA Color File Format
  3507.  
  3508.           Use the PCXVGAC driver for saving 16 color images to PC Paintbrush
  3509.           compatible .PCX files for subsequent viewing on color VGA screens.
  3510.  
  3511.           Supports VGA size 16 color 4 plane bitmaps.  Resolution settings are
  3512.           ignored by this driver.
  3513.  
  3514.  
  3515.      PCXHERC - PCX Hercules Monochrome File Format
  3516.  
  3517.           Use the PCXHERC driver for saving black and white images to PC
  3518.           Paintbrush compatible .PCX files for subsequent viewing on Hercules
  3519.           screens.
  3520.  
  3521.           Supports Hercules size (720x348) monochrome bitmaps.  Resolution
  3522.           settings are ignored by this driver.
  3523.  
  3524.  
  3525.      PCXSVGA - PCX Super-VGA Monochrome File Format
  3526.  
  3527.           Use the PCXSVGA driver for saving black and white images to PC
  3528.           Paintbrush compatible .PCX files for subsequent viewing on super-VGA
  3529.           screens.
  3530.  
  3531.           Supports super-VGA size (800x600) monochrome bitmaps.  Resolution
  3532.           settings are ignored by this driver.
  3533.  
  3534.  
  3535.      PCXSVGAC - PCX Super-VGA Color File Format
  3536.  
  3537.           Use the PCXSVGAC driver for saving 16 color images to PC Paintbrush
  3538.           compatible .PCX files for subsequent viewing on color super-VGA
  3539.           screens.
  3540.  
  3541.           Supports super-VGA size (800x600) 16 color 4 plane bitmaps.
  3542.           Resolution settings are ignored by this driver.
  3543.  
  3544.  
  3545.      PCX8514 - PCX 8514 Monochrome File Format
  3546.  
  3547.           Use the PCX8514 driver for saving black and white images to PC
  3548.           Paintbrush compatible .PCX files for subsequent viewing on super-VGA
  3549.           and 8514 screens.
  3550.  
  3551.           Supports IBM-8514 and super-VGA size (1024x768) monochrome bitmaps.
  3552.           Resolution settings are ignored by this driver.
  3553.  
  3554.  
  3555.      PCX8514C - PCX 8514 Color File Format
  3556.  
  3557.           Use the PCX8514C driver for saving 16 color images to PC Paintbrush
  3558.           compatible .PCX files for subsequent viewing on color super-VGA and
  3559.           8514 screens.
  3560.  
  3561.           Supports IBM-8514 and super-VGA size (1024x768) 16 color 4 plane
  3562.           bitmaps.  Resolution settings are ignored by this driver.
  3563.  
  3564.  
  3565.      EGA - EGA Monitor Driver
  3566.  
  3567.           Use the EGA driver to display drawing files on an EGA monitor in 16
  3568.           color mode.  This provides a drawing preview capability.  The EGA
  3569.           device driver sets the video system into graphics mode and resets it
  3570.           when done.  If multiple pages are displayed, a key press will be
  3571.           expected after each displayed page before program execution will
  3572.           continue.  Resolution settings are ignored by this driver.
  3573.  
  3574.  
  3575.      VGA - VGA Monitor Driver
  3576.  
  3577.           Use the VGA driver to display drawing files on a VGA monitor in 16
  3578.           color mode.  This provides a drawing preview capability.  The VGA
  3579.           device driver sets the video system into graphics mode and resets it
  3580.           when done.  If multiple pages are displayed, a key press will be
  3581.           expected after each displayed page before program execution will
  3582.           continue.  Resolution settings are ignored by this driver.
  3583.  
  3584.  
  3585.      EGAMONO - EGAMONO Monitor Driver
  3586.  
  3587.           Use the EGAMONO driver to display drawing files on a monochrome EGA
  3588.           monitor.  This provides a drawing preview capability.  The EGAMONO
  3589.           device driver sets the video system into graphics mode and resets it
  3590.           when done.  If multiple pages are displayed, a key press will be
  3591.           expected after each displayed page before program execution will
  3592.           continue.  Resolution settings are ignored by this driver.
  3593.  
  3594.  
  3595.      VGAMONO/MCGA - VGAMONO/MCGA Monitor Driver
  3596.  
  3597.           Use the VGAMONO or MCGA driver to display drawing files on a
  3598.           monochrome VGA monitor.  This provides a drawing preview capability.
  3599.           The VGAMONO and MCGA device drivers switch the video system into
  3600.           graphics mode and resets it when done.  If multiple pages are
  3601.           displayed, a key press will be expected after each displayed page
  3602.           before program execution will continue.  Resolution settings are
  3603.           ignored by this driver.
  3604.  
  3605.  
  3606.      HERC - HERC Monitor Driver
  3607.  
  3608.           Use the HERC driver to display drawing files on a monochrome HERC
  3609.           monitor.  This provides a drawing preview capability.  The HERC
  3610.           device driver sets the video system into graphics mode and resets it
  3611.           when done.  If multiple pages are displayed, a key press will be
  3612.           expected after each displayed page before program execution will
  3613.           continue.  Resolution settings are ignored by this driver.
  3614.  
  3615.  
  3616.                            ************************
  3617.                            **     PGL ToolKit    **
  3618.                            ** Function Reference **
  3619.                            ************************
  3620.  
  3621.  
  3622.      This portion of the manual contains the PGL ToolKit function reference.
  3623.      The function descriptions are listed in alphabetical order.  Each routine
  3624.      may be functionally grouped into one of six categories, SYSTEM FUNCTIONS,
  3625.      DEVICE INFORMATION FUNCTIONS, BITMAP OUTPUT FUNCTIONS, DRAWING FUNCTIONS,
  3626.      GRAPHICS ATTRIBUTE FUNCTIONS, and GRAPHICS TEXT FUNCTIONS.  A Quick
  3627.      Reference section listing the functions alphabetically and by category is
  3628.      included for your convenience.
  3629.  
  3630.  
  3631. System Functions
  3632.  
  3633.      System functions are those which operate on PGL drawing files.  Commands
  3634.      are provided to open new and old drawing files, clear drawing files of
  3635.      all existing graphics commands, set new page markers, and close the
  3636.      drawing file.
  3637.  
  3638.      The ToolKit, for the most part, simply writes binary graphics codes to
  3639.      the drawing file as functions are called and sets internal parameters to
  3640.      keep track of the current graphics state.  The interface libraries
  3641.      perform very few calculations.  As such, when an error does occur, it is
  3642.      most likely due to a disk I/O problem.  When such an error occurs, an
  3643.      internal error flag is set.  You may determine the error status by
  3644.      calling the pgGetStatus function.
  3645.  
  3646.  
  3647. Device Information Functions
  3648.  
  3649.      This class of function will allow you to retrieve information about
  3650.      specific device drivers.  You may load the information for a specific
  3651.      driver by calling pgLoadDevInfo.  Once loaded, you may specify the page
  3652.      margins, size, and orientation with pgSetPageMargins, pgSetPageSize, and
  3653.      pgSetPageForm, respectively.  The remaining functions in this category
  3654.      are then used to return information about the loaded device based on the
  3655.      current page settings.
  3656.  
  3657.      The information provided by these functions include the type of device it
  3658.      is (i.e., laserjet, dot matrix, inkjet, etc.), number of resolution modes
  3659.      and bit planes, the maximum number of colors supported by the device, the
  3660.      physical size of the paper, the horizontal and vertical pixel resolution
  3661.      of the printable region based on the current page settings, the aspect
  3662.      ratio returned as a dots per inch measure, and the imposed offset margins
  3663.      at the top and left edges of the paper.
  3664.  
  3665.      Note that specifying the page margins, size, and orientation does not
  3666.      imply that your graphics will automatically print with these settings.
  3667.      The pgSetPageMargins, pgSetPageSize, and pgSetPageForm functions merely
  3668.      specify page parameters for the purpose of correctly returning information
  3669.      about device drivers based on these settings.  You must specifically set
  3670.      these parameters at print time using the GPU or GPMENU print utilities.
  3671.  
  3672.  
  3673. Bitmap Output Functions
  3674.  
  3675.      Often times, you may wish to perform a "screen dump" or print off-screen
  3676.      bitmapped images generated by another graphics library.  Once you have
  3677.      created your bitmap, these functions allow you to initialize the bitmap
  3678.      processing sequence, output a bitmapped image to the drawing file, and
  3679.      end the processing sequence.
  3680.  
  3681.  
  3682. Drawing Functions
  3683.  
  3684.      Except for graphics text, these functions allow you to create your
  3685.      drawings.  The functions in this category allow you to place the cursor
  3686.      and draw arcs, circles, pie slices, polygons, rectangles, etc.  Graphics
  3687.      text functions are grouped in a separate category.
  3688.  
  3689.  
  3690. Graphics Attribute Functions
  3691.  
  3692.      This class of function will allow you to set the various attributes to be
  3693.      used by the drawing functions.  You may use these functions to set such
  3694.      attributes as line styles and thicknesses, fill patterns, fill colors,
  3695.      fill mode, viewports, drawing colors, remap color palettes, set custom
  3696.      RGB color palettes, clipping flags, and clipping regions.  Functions
  3697.      are also provided to allow you to retrieve information about the current
  3698.      cursor position and the graphics state.
  3699.  
  3700.  
  3701. Graphics Text Functions
  3702.  
  3703.      These functions allow you to position and draw graphics text.  The
  3704.      pgSetTextStyle command is used to select one of seven fully scalable
  3705.      vector font styles.  Other functions are provided to set independent
  3706.      horizontal and vertical scale factors, orientation of text drawing, text
  3707.      justification, character spacing within a text string, and level of
  3708.      bolding.  Functions are also provided to return the length and height of
  3709.      text strings as well as the current text parameter settings.
  3710.  
  3711.  
  3712. Description Format
  3713.  
  3714.      DESCRIPTION
  3715.  
  3716.           Description describes the purpose of the routine, default settings,
  3717.           if applicable, and any general remarks.
  3718.  
  3719.      SYNTAX
  3720.  
  3721.           Syntax shows the function prototype for each of the languages and
  3722.           the argument declarations.  Note that for Clipper, <ref> indicates a
  3723.           parameter is to be passed by reference using the '@' symbol.  For
  3724.           example:
  3725.  
  3726.                pgCLEAR( @ierr )
  3727.  
  3728.           Also for Clipper, all passed parameters are assumed to be numeric
  3729.           expressions.  Character expressions are specifically indicated by
  3730.           <expC>.
  3731.  
  3732.      PARAMETERS
  3733.  
  3734.           Parameters describes each argument in the call to the routine.
  3735.  
  3736.      RETURN
  3737.  
  3738.           If the routine returns a value, a description is provided about the
  3739.           information returned to you.  Note that not all routines return a
  3740.           value.
  3741.  
  3742.      SEE ALSO
  3743.  
  3744.           The See Also section provides a list of routines which are similar
  3745.           in nature and/or affect the functionality of the routine being
  3746.           described.
  3747.  
  3748.      EXAMPLES
  3749.  
  3750.           The Examples section provides a short code segment showing how the
  3751.           routine is used for each language.
  3752.  
  3753.  
  3754. Quick Reference: Functional Listing
  3755.  
  3756.      System
  3757.  
  3758.           pgClearDrw        Clear the drawing file.
  3759.  
  3760.           pgEndDrw          Close the drawing file.
  3761.  
  3762.           pgGetStatus       Get current PGL error status.
  3763.  
  3764.           pgInitDrw         Open new drawing file and set virtual resolution.
  3765.  
  3766.           pgNewPage         Insert a form feed.
  3767.  
  3768.           pgOpenDrw         Open an existing drawing file.
  3769.  
  3770.  
  3771.      Device Information
  3772.  
  3773.           pgGetDevColors    Get the maximum number of available colors.
  3774.  
  3775.           pgGetDevHeight    Get the page height of the device.
  3776.  
  3777.           pgGetDevMaxX      Get the maximum addressable horizontal pixels.
  3778.  
  3779.           pgGetDevMaxY      Get the maximum addressable vertical pixels.
  3780.  
  3781.           pgGetDevModes     Get the maximum number of resolution modes.
  3782.  
  3783.           pgGetDevOffsetX   Get the imposed device offset left margin.
  3784.  
  3785.           pgGetDevOffsetY   Get the imposed device offset top margin.
  3786.  
  3787.           pgGetDevPlanes    Get the number of bit planes.
  3788.  
  3789.           pgGetDevResX      Get the device's horizontal dot per inch measure.
  3790.  
  3791.           pgGetDevResY      Get the device's vertical dot per inch measure.
  3792.  
  3793.           pgGetDevType      Get the type of device.
  3794.  
  3795.           pgGetDevWidth     Get the page width of the device.
  3796.  
  3797.           pgLoadDevInfo     Load the information for a device.
  3798.  
  3799.           pgSetPageForm     Set the page orientation.
  3800.  
  3801.           pgSetPageMargins  Set the page margins.
  3802.  
  3803.           pgSetPageSize     Set the page size.
  3804.  
  3805.  
  3806.      Bitmap
  3807.  
  3808.           pgBMData          Output a row of bitmap pixel color information.
  3809.  
  3810.           pgBMEnd           End the bitmap processing sequence.
  3811.  
  3812.           pgBMInit          Initialize the bitmap processing sequence.
  3813.  
  3814.  
  3815.      Drawing
  3816.  
  3817.           pgArc             Draw a circular arc segment.
  3818.  
  3819.           pgCircle          Draw a full circle.
  3820.  
  3821.           pgClearViewPort   Clear the viewport.
  3822.  
  3823.           pgEllArc          Draw an elliptic arc segment.
  3824.  
  3825.           pgEllipse         Draw a full ellipse.
  3826.  
  3827.           pgLine            Draw a line between two coordinates.
  3828.  
  3829.           pgLineRel         Draw a line relative to the current position.
  3830.  
  3831.           pgLineTo          Draw a line from the current position.
  3832.  
  3833.           pgMoveRel         Move cursor relative to the current position.
  3834.  
  3835.           pgMoveTo          Move cursor to the specified coordinate.
  3836.  
  3837.           pgPie             Draw a circular pie slice section.
  3838.  
  3839.           pgPolygon         Draw a polygon.
  3840.  
  3841.           pgPolyLine        Draw a list of line segments.
  3842.  
  3843.           pgRectangle       Draw a rectangle.
  3844.  
  3845.           pgSector          Draw an elliptic pie slice section.
  3846.  
  3847.           pgSetPixel        Set a pixel to a color value.
  3848.  
  3849.  
  3850.      Attributes
  3851.  
  3852.           pgGetAbsX         Get absolute current x-coordinate.
  3853.  
  3854.           pgGetAbsY         Get absolute current y-coordinate.
  3855.  
  3856.           pgGetClipArea     Get the clipping area.
  3857.  
  3858.           pgGetClipping     Get the clipping status.
  3859.  
  3860.           pgGetColor        Get the drawing color.
  3861.  
  3862.           pgGetFillMode     Get the fill mode.
  3863.  
  3864.           pgGetFillPattern  Get the fill pattern.
  3865.  
  3866.           pgGetFillStyle    Get the fill style.
  3867.  
  3868.           pgGetLinePattern  Get the line pattern.
  3869.  
  3870.           pgGetLineStyle    Get the line style.
  3871.  
  3872.           pgGetLineWeight   Get the line weighting value.
  3873.  
  3874.           pgGetMaxX         Get the maximum x-coordinate.
  3875.  
  3876.           pgGetMaxY         Get the maximum y-coordinate.
  3877.  
  3878.           pgGetViewPort     Get the viewport coordinates.
  3879.  
  3880.           pgGetX            Get the current viewport x-coordinate.
  3881.  
  3882.           pgGetY            Get the current viewport y-coordinates.
  3883.  
  3884.           pgSetClipArea     Set the clipping area.
  3885.  
  3886.           pgSetClipping     Set the clipping status.
  3887.  
  3888.           pgSetColor        Set the drawing color.
  3889.  
  3890.           pgSetDefaults     Set the graphics state to default settings.
  3891.  
  3892.           pgSetFillMode     Set the fill mode.
  3893.  
  3894.           pgSetFillPattern  Set the fill pattern.
  3895.  
  3896.           pgSetFillStyle    Set the fill style.
  3897.  
  3898.           pgSetLinePattern  Set the line pattern.
  3899.  
  3900.           pgSetLineStyle    Set the line style.
  3901.  
  3902.           pgSetLineWeight   Set the line weighting value.
  3903.  
  3904.           pgSetPalette      Redefine a single color in the palette.
  3905.  
  3906.           pgSetRgbPalette   Define a color with RGB settings.
  3907.  
  3908.           pgSetViewPort     Set the viewport coordinates.
  3909.  
  3910.  
  3911.      Text
  3912.  
  3913.           pgDrawText        Draw text relative to current position.
  3914.  
  3915.           pgDrawTextXY      Draw text relative to coordinate (x,y).
  3916.  
  3917.           pgGetCharSpacing  Get text character spacing.
  3918.  
  3919.           pgGetTextBolding  Get text bolding.
  3920.  
  3921.           pgGetTextHeight   Get height of the current font style.
  3922.  
  3923.           pgGetTextJustify  Get text horizontal/vertical justification.
  3924.  
  3925.           pgGetTextLength   Get length of the specified text string.
  3926.  
  3927.           pgGetTextOrient   Get text orientation.
  3928.  
  3929.           pgGetTextScaling  Get text horizontal/vertical scaling.
  3930.  
  3931.           pgGetTextStyle    Get text style.
  3932.  
  3933.           pgSetCharSpacing  Set text character spacing.
  3934.  
  3935.           pgSetTextBolding  Set text bolding.
  3936.  
  3937.           pgSetTextJustify  Set text horizontal/vertical justification.
  3938.  
  3939.           pgSetTextOrient   Set text orientation.
  3940.  
  3941.           pgSetTextScaling  Set text horizontal/vertical scaling.
  3942.  
  3943.           pgSetTextStyle    Set text style.
  3944.  
  3945.  
  3946. Quick Reference: Alphabetical Listing
  3947.  
  3948.  
  3949.           pgArc             Draw a circular arc segment.
  3950.  
  3951.           pgBMData          Output a row of bitmap pixel color information.
  3952.  
  3953.           pgBMEnd           End the bitmap processing sequence.
  3954.  
  3955.           pgBMInit          Initialize the bitmap processing sequence.
  3956.  
  3957.           pgCircle          Draw a full circle.
  3958.  
  3959.           pgClearDrw        Clear the drawing file.
  3960.  
  3961.           pgClearViewPort   Clear the viewport.
  3962.  
  3963.           pgDrawText        Draw text relative to current position.
  3964.  
  3965.           pgDrawTextXY      Draw text relative to coordinate (x,y).
  3966.  
  3967.           pgEllArc          Draw an elliptic arc segment.
  3968.  
  3969.           pgEllipse         Draw a full ellipse.
  3970.  
  3971.           pgEndDrw          Close the drawing file.
  3972.  
  3973.           pgGetAbsX         Get absolute current x-coordinate.
  3974.  
  3975.           pgGetAbsY         Get absolute current y-coordinate.
  3976.  
  3977.           pgGetCharSpacing  Get text character spacing.
  3978.  
  3979.           pgGetClipArea     Get the clipping area.
  3980.  
  3981.           pgGetClipping     Get the clipping status.
  3982.  
  3983.           pgGetColor        Get the drawing color.
  3984.  
  3985.           pgGetDevColors    Get the maximum number of available colors.
  3986.  
  3987.           pgGetDevHeight    Get the page height of the device.
  3988.  
  3989.           pgGetDevMaxX      Get the maximum addressable horizontal pixels.
  3990.  
  3991.           pgGetDevMaxY      Get the maximum addressable vertical pixels.
  3992.  
  3993.           pgGetDevModes     Get the maximum number of resolution modes.
  3994.  
  3995.           pgGetDevOffsetX   Get the imposed device offset left margin.
  3996.  
  3997.           pgGetDevOffsetY   Get the imposed device offset top margin.
  3998.  
  3999.           pgGetDevPlanes    Get the number of bit planes.
  4000.  
  4001.           pgGetDevResX      Get the device's horizontal dot per inch measure.
  4002.  
  4003.           pgGetDevResY      Get the device's vertical dot per inch measure.
  4004.  
  4005.           pgGetDevType      Get the type of device.
  4006.  
  4007.           pgGetDevWidth     Get the page width of the device.
  4008.  
  4009.           pgGetFillMode     Get the fill mode.
  4010.  
  4011.           pgGetFillPattern  Get the fill pattern.
  4012.  
  4013.           pgGetFillStyle    Get the fill style.
  4014.  
  4015.           pgGetLinePattern  Get the line pattern.
  4016.  
  4017.           pgGetLineStyle    Get the line style.
  4018.  
  4019.           pgGetLineWeight   Get the line weighting value.
  4020.  
  4021.           pgGetMaxX         Get the maximum x-coordinate.
  4022.  
  4023.           pgGetMaxY         Get the maximum y-coordinate.
  4024.  
  4025.           pgGetStatus       Get current PGL error status.
  4026.  
  4027.           pgGetTextBolding  Get text bolding.
  4028.  
  4029.           pgGetTextHeight   Get height of the current font style.
  4030.  
  4031.           pgGetTextJustify  Get text horizontal/vertical justification.
  4032.  
  4033.           pgGetTextLength   Get length of the specified text string.
  4034.  
  4035.           pgGetTextOrient   Get text orientation.
  4036.  
  4037.           pgGetTextScaling  Get text horizontal/vertical scaling.
  4038.  
  4039.           pgGetTextStyle    Get text style.
  4040.  
  4041.           pgGetViewPort     Get the viewport coordinates.
  4042.  
  4043.           pgGetX            Get the current viewport x-coordinate.
  4044.  
  4045.           pgGetY            Get the current viewport y-coordinates.
  4046.  
  4047.           pgInitDrw         Open new drawing file and set virtual resolution.
  4048.  
  4049.           pgLine            Draw a line between two coordinates.
  4050.  
  4051.           pgLineRel         Draw a line relative to the current position.
  4052.  
  4053.           pgLineTo          Draw a line from the current position.
  4054.  
  4055.           pgLoadDevInfo     Load the information for a device.
  4056.  
  4057.           pgMoveRel         Move cursor relative to the current position.
  4058.  
  4059.           pgMoveTo          Move cursor to the specified coordinate.
  4060.  
  4061.           pgNewPage         Insert a form feed.
  4062.  
  4063.           pgOpenDrw         Open an existing drawing file.
  4064.  
  4065.           pgPie             Draw a circular pie slice section.
  4066.  
  4067.           pgPolygon         Draw a polygon.
  4068.  
  4069.           pgPolyLine        Draw a list of line segments.
  4070.  
  4071.           pgRectangle       Draw a rectangle.
  4072.  
  4073.           pgSector          Draw an elliptic pie slice section.
  4074.  
  4075.           pgSetCharSpacing  Set text character spacing.
  4076.  
  4077.           pgSetClipArea     Set the clipping area.
  4078.  
  4079.           pgSetClipping     Set the clipping status.
  4080.  
  4081.           pgSetColor        Set the drawing color.
  4082.  
  4083.           pgSetDefaults     Set the graphics state to default settings.
  4084.  
  4085.           pgSetFillMode     Set the fill mode.
  4086.  
  4087.           pgSetFillPattern  Set the fill pattern.
  4088.  
  4089.           pgSetFillStyle    Set the fill style.
  4090.  
  4091.           pgSetLinePattern  Set the line pattern.
  4092.  
  4093.           pgSetLineStyle    Set the line style.
  4094.  
  4095.           pgSetLineWeight   Set the line weighting value.
  4096.  
  4097.           pgSetPageForm     Set the page orientation.
  4098.  
  4099.           pgSetPageMargins  Set the page margins.
  4100.  
  4101.           pgSetPageSize     Set the page size.
  4102.  
  4103.           pgSetPalette      Redefine a single color in the palette.
  4104.  
  4105.           pgSetPixel        Set a pixel to a color value.
  4106.  
  4107.           pgSetRgbPalette   Define a color with RGB settings.
  4108.  
  4109.           pgSetTextBolding  Set text bolding.
  4110.  
  4111.           pgSetTextJustify  Set text horizontal/vertical justification.
  4112.  
  4113.           pgSetTextOrient   Set text orientation.
  4114.  
  4115.           pgSetTextScaling  Set text horizontal/vertical scaling.
  4116.  
  4117.           pgSetTextStyle    Set text style.
  4118.  
  4119.           pgSetViewPort     Set the viewport coordinates.
  4120.  
  4121.  
  4122.                                   ***********
  4123.                                   ** pgArc **
  4124.                                   ***********
  4125.  
  4126.  
  4127. DESCRIPTION    The pgArc function draws circular arcs of any angular extent
  4128.                using the current drawing color.  The arc is centered at the
  4129.                coordinate (x,y) with a radius of rad.  The start and
  4130.                termination angles of the arc are given by the parameters sa
  4131.                and ea, respectively, specified in degree measure.  Zero
  4132.                degrees is taken to be the 3 o'clock position increasing
  4133.                positively in a counterclockwise direction.  The arc center
  4134.                (x,y) is specified in the viewport coordinate system.  The
  4135.                cursor position is not updated after drawing.
  4136.  
  4137.  
  4138. SYNTAX         C         void pgArc( int x, int y, int rad, int sa, int ea );
  4139.  
  4140.                Pascal    PROCEDURE pgArc( x, y, rad, sa, ea:integer );
  4141.  
  4142.                Basic     SUB pgArc( x%, y%, rad%, sa%, ea% )
  4143.  
  4144.                Fortran   SUBROUTINE pgArc( x, y, rad, sa, ea )
  4145.                          INTEGER*2 x, y, rad, sa, ea
  4146.  
  4147.                Clipper   PROCEDURE pgA( x, y, rad, sa, ea )
  4148.  
  4149.  
  4150. PARAMETERS     x,y       Center point of the arc.
  4151.                rad       Radius of the arc.
  4152.                sa        Start angle of the arc.
  4153.                ea        End angle of the arc.
  4154.  
  4155.  
  4156. RETURN         None.
  4157.  
  4158.  
  4159. SEE ALSO       pgCircle, pgEllArc, pgEllipse, pgPie, pgSector, pgSetColor
  4160.  
  4161.  
  4162. EXAMPLES       Draw an arc of radius 100 centered at (300,250) from 45 to 135
  4163.                degrees.
  4164.  
  4165.                C         pgSetColor( 2 );
  4166.                          pgArc( 300, 250, 100, 45, 135 );
  4167.  
  4168.                Pascal    pgSetColor( 2 );
  4169.                          pgArc( 300, 250, 100, 45, 135 );
  4170.  
  4171.                Basic     call pgSetColor( 2 )
  4172.                          call pgArc( 300, 250, 100, 45, 135 )
  4173.  
  4174.                Fortran   call pgSetColor( 2 )
  4175.                          call pgArc( 300, 250, 100, 45, 135 )
  4176.  
  4177.                Clipper   pgSCOLOR( 2 )
  4178.                          pgA( 300, 250, 100, 45, 135 )
  4179.  
  4180.  
  4181.                                 **************
  4182.                                 ** pgBMData **
  4183.                                 **************
  4184.  
  4185.  
  4186. DESCRIPTION    The pgBMData function is used to output the specified row of
  4187.                pixel values to the drawing file.  This function must be called
  4188.                for each row of the bitmap you wish to output.  You must first
  4189.                call the pgBMInit function to initialize the bitmap processing
  4190.                sequence.
  4191.  
  4192.  
  4193. SYNTAX         C         void pgBMData( int row, int far *data );
  4194.  
  4195.                Pascal    PROCEDURE pgBMData( row:integer; var data );
  4196.  
  4197.                Basic     SUB pgBMData( row%, SEG data% )
  4198.  
  4199.                Fortran   SUBROUTINE pgBMData( row, data )
  4200.                          INTEGER*2 row, data(n)
  4201.  
  4202.                Clipper   PROCEDURE pgBMD( row, data )
  4203.  
  4204.  
  4205. PARAMETERS     row       The row of the bitmap for which data is being output.
  4206.                data      Vector where each element of the vector represents
  4207.                          the color value of each corresponding pixel in the
  4208.                          specified row.
  4209.  
  4210.  
  4211. RETURN         None.
  4212.  
  4213.  
  4214. SEE ALSO       pgBMEnd, pgBMInit
  4215.  
  4216.  
  4217. EXAMPLES       Save a 640x480 16 color VGA size bitmap to a drawing file using
  4218.                compression.  Assume the bitmap has already been created and you
  4219.                have a 'getpixel' function which returns the color value of the
  4220.                specified pixel.
  4221.  
  4222.                C         short data[640], ierr, row, col;
  4223.                          pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
  4224.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4225.                          for( row=0; row<480; row++ )
  4226.                          {
  4227.                               for( col=0; col<640; col++ )
  4228.                                    data[col] = getpixel( col, row );
  4229.                               pgBMData( row, data );
  4230.                          }
  4231.                          pgBMEnd();
  4232.                          pgEndDrw();
  4233.  
  4234.                Pascal    var
  4235.                          ierr, row, col : integer;
  4236.                          data : array[0..639] of integer;
  4237.                          begin
  4238.                          pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
  4239.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4240.                          for row := 0 to 479
  4241.                               begin
  4242.                                    for col := 0 to 639
  4243.                                    begin
  4244.                                         data[col] := getpixel( col, row );
  4245.                                    end;
  4246.                               pgBMData( row, data );
  4247.                               end;
  4248.                          pgBMEnd;
  4249.                          pgEndDrw;
  4250.                          end.
  4251.  
  4252.                Basic     DIM data%(639)
  4253.                          call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
  4254.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4255.                          for row% = 0 to 479
  4256.                               for col% = 0 to 639
  4257.                                    data%(col) = getpixel%( col%, row% )
  4258.                               next
  4259.                               call pgBMData( row%, data%(0) )
  4260.                          next
  4261.                          call pgBMEnd
  4262.                          call pgEndDrw
  4263.                          end
  4264.  
  4265.                Fortran   integer*2 ierr, row, col, data(640)
  4266.                          call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
  4267.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4268.                          do row = 1, 480
  4269.                               do col = 1, 640
  4270.                                    data(col) = getpixel( col-1, row-1 )
  4271.                               end do
  4272.                               call pgBMData( row-1, data )
  4273.                          end do
  4274.                          call pgBMEnd
  4275.                          call pgEndDrw
  4276.                          end
  4277.  
  4278.                Clipper   PUBLIC data[640]
  4279.                          pgINIT( "BITMAP.PGL", 640, 480, @ierr )
  4280.                          pgBMI( 0, 0, 640, 480, 4, 1 )
  4281.                          for row = 1 to 480
  4282.                               for col = 1 to 640
  4283.                                    data[col] = getpixel( col-1, row-1 )
  4284.                               next
  4285.                               pgBMD( row-1, data )
  4286.                          next
  4287.                          pgBME()
  4288.                          pgEND()
  4289.  
  4290.  
  4291.                                  *************
  4292.                                  ** pgBMEnd **
  4293.                                  *************
  4294.  
  4295.  
  4296. DESCRIPTION    The pgBMEnd function is used to end the bitmap processing
  4297.                sequence.  You must first call the pgBMInit function to
  4298.                initialize the bitmap processing sequence.
  4299.  
  4300.                When you have finished processing bitmap data, you must call
  4301.                pgBMEnd to end the processing sequence before calling any other
  4302.                PGL function or before initializing another bitmap sequence.
  4303.                Failure to do so may cause unpredictable results.
  4304.  
  4305.  
  4306. SYNTAX         C         void pgBMEnd( void );
  4307.  
  4308.                Pascal    PROCEDURE pgBMEnd;
  4309.  
  4310.                Basic     SUB pgBMEnd
  4311.  
  4312.                Fortran   SUBROUTINE pgBMEnd
  4313.  
  4314.                Clipper   PROCEDURE pgBME()
  4315.  
  4316.  
  4317. PARAMETERS     None.
  4318.  
  4319.  
  4320. RETURN         None.
  4321.  
  4322.  
  4323. SEE ALSO       pgBMData, pgBMInit
  4324.  
  4325.  
  4326. EXAMPLES       Save a 640x480 16 color VGA size bitmap to a drawing file using
  4327.                compression.  Assume the bitmap has already been created and
  4328.                you have a 'getpixel' function which returns the color value of
  4329.                the specified pixel.
  4330.  
  4331.                C         short data[640], ierr, row, col;
  4332.                          pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
  4333.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4334.                          for( row=0; row<480; row++ )
  4335.                          {
  4336.                               for( col=0; col<640; col++ )
  4337.                                    data[col] = getpixel( col, row );
  4338.                               pgBMData( row, data );
  4339.                          }
  4340.                          pgBMEnd();
  4341.                          pgEndDrw();
  4342.  
  4343.                Pascal    var
  4344.                          ierr, row, col : integer;
  4345.                          data : array[0..639] of integer;
  4346.                          begin
  4347.                          pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
  4348.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4349.                          for row := 0 to 479
  4350.                               begin
  4351.                               for col := 0 to 639
  4352.                                     begin
  4353.                                         data[col] := getpixel( col, row );
  4354.                                     end;
  4355.                               pgBMData( row, data );
  4356.                               end;
  4357.                          pgBMEnd;
  4358.                          pgEndDrw;
  4359.                          end.
  4360.  
  4361.                Basic     DIM data%(639)
  4362.                          call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
  4363.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4364.                          for row% = 0 to 479
  4365.                               for col% = 0 to 639
  4366.                                    data%(col) = getpixel%( col%, row% )
  4367.                               next
  4368.                               call pgBMData( row%, data%(0) )
  4369.                          next
  4370.                          call pgBMEnd
  4371.                          call pgEndDrw
  4372.                          end
  4373.  
  4374.                Fortran   integer*2 ierr, row, col, data(640)
  4375.                          call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
  4376.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4377.                          do row = 1, 480
  4378.                                do col = 1, 640
  4379.                                     data(col) = getpixel( col-1, row-1 )
  4380.                                end do
  4381.                                call pgBMData( row-1, data )
  4382.                          end do
  4383.                          call pgBMEnd
  4384.                          call pgEndDrw
  4385.                          end
  4386.  
  4387.                Clipper   PUBLIC data[640]
  4388.                          pgINIT( "BITMAP.PGL", 640, 480, @ierr )
  4389.                          pgBMI( 0, 0, 640, 480, 4, 1 )
  4390.                          for row = 1 to 480
  4391.                                for col = 1 to 640
  4392.                                      data[col] = getpixel( col-1, row-1 )
  4393.                                next
  4394.                                pgBMD( row-1, data )
  4395.                          next
  4396.                          pgBME()
  4397.                          pgEND()
  4398.  
  4399.  
  4400.                                 **************
  4401.                                 ** pgBMInit **
  4402.                                 **************
  4403.  
  4404.  
  4405. DESCRIPTION    The pgBMInit function is used to initialize the bitmap output
  4406.                processing sequence by specifying the location of the upper-
  4407.                left hand corner of the bitmap on the printed page, the pixel
  4408.                width and height of the bitmap, the number of bits per pixel,
  4409.                and a flag indicating whether the bitmap information is to be
  4410.                compressed.
  4411.  
  4412.                Once the bitmap image has been output to the drawing file, you
  4413.                must end the bitmap processing sequence with a call to pgBMEnd.
  4414.                You may only call the pgBMData function between the pgBMInit
  4415.                and pgBMEnd commands.  Calling any other PGL function between
  4416.                these two commands may produce unpredictable results.
  4417.  
  4418.  
  4419. SYNTAX         C         void pgBMInit( int x, int y, int width, int height,
  4420.                               int bpp, int compflag );
  4421.  
  4422.                Pascal    PROCEDURE pgBMInit( x, y, width, height, bpp,
  4423.                               compflag:integer );
  4424.  
  4425.                Basic     SUB pgBMInit( x%, y%, width%, height%, bpp%,
  4426.                               compflag% )
  4427.  
  4428.                Fortran   SUBROUTINE pgBMInit( x, y, width, height, bpp,
  4429.                               compflag )
  4430.                          INTEGER*2 x, y, width, height, bpp, compflag
  4431.  
  4432.                Clipper   PROCEDURE pgBMI( x, y, width, height, bpp, compflag )
  4433.  
  4434.  
  4435. PARAMETERS     x,y       The location of the upper-left hand corner of the
  4436.                          bitmap on the printed page specified in terms of the
  4437.                          absolute virtual coordinate system.
  4438.                width     The width of the bitmap in pixels.
  4439.                height    The height of the bitmap in pixels.
  4440.                bpp       The number of bits per pixel (1, 2, 4, or 8).
  4441.                compflag  Flag indicating whether the bitmap information is to
  4442.                          be compressed. (0=OFF, 1=ON).
  4443.  
  4444.  
  4445. RETURN         None.
  4446.  
  4447.  
  4448. SEE ALSO       pgBMData, pgBMEnd
  4449.  
  4450.  
  4451. EXAMPLES       Save a 640x480 16 color VGA size bitmap to a drawing file using
  4452.                compression.  Assume the bitmap has already been created and
  4453.                you have a 'getpixel' function which returns the color value of
  4454.                the specified pixel.
  4455.  
  4456.                C         short data[640], ierr, row, col;
  4457.                          pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
  4458.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4459.                          for( row=0; row<480; row++ )
  4460.                          {
  4461.                               for( col=0; col<640; col++ )
  4462.                                   data[col] = getpixel( col, row );
  4463.                               pgBMData( row, data );
  4464.                          }
  4465.                          pgBMEnd();
  4466.                          pgEndDrw();
  4467.  
  4468.                Pascal    var
  4469.                          ierr, row, col : integer;
  4470.                          data : array[0..639] of integer;
  4471.                          begin
  4472.                          pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
  4473.                          pgBMInit( 0, 0, 640, 480, 4, 1 );
  4474.                          for row := 0 to 479
  4475.                                begin
  4476.                                for col := 0 to 639
  4477.                                      begin
  4478.                                      data[col] := getpixel( col, row );
  4479.                                      end;
  4480.                                pgBMData( row, data );
  4481.                                end;
  4482.                          pgBMEnd;
  4483.                          pgEndDrw;
  4484.                          end.
  4485.  
  4486.                Basic     DIM data%(639)
  4487.                          call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
  4488.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4489.                          for row% = 0 to 479
  4490.                                for col% = 0 to 639
  4491.                                      data%(col) = getpixel%( col%, row% )
  4492.                                next
  4493.                                call pgBMData( row%, data%(0) )
  4494.                          next
  4495.                          call pgBMEnd
  4496.                          call pgEndDrw
  4497.                          end
  4498.  
  4499.                Fortran   integer*2 ierr, row, col, data(640)
  4500.                          call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
  4501.                          call pgBMInit( 0, 0, 640, 480, 4, 1 )
  4502.                          do row = 1, 480
  4503.                               do col = 1, 640
  4504.                                    data(col) = getpixel( col-1, row-1 )
  4505.                               end do
  4506.                               call pgBMData( row-1, data )
  4507.                          end do
  4508.                          call pgBMEnd
  4509.                          call pgEndDrw
  4510.                          end
  4511.  
  4512.                Clipper   PUBLIC data[640]
  4513.                          call pgINIT( "BITMAP.PGL", 640, 480, @ierr )
  4514.                          call pgBMI( 0, 0, 640, 480, 4, 1 )
  4515.                          for row = 1 to 480
  4516.                                for col = 1 to 640
  4517.                                      data[col] = getpixel( col-1, row-1 )
  4518.                                next
  4519.                                pgBMD( row-1, data )
  4520.                          next
  4521.                          pgBME()
  4522.                          pgEND()
  4523.  
  4524.  
  4525.                                 **************
  4526.                                 ** pgCircle **
  4527.                                 **************
  4528.  
  4529.  
  4530. DESCRIPTION    The pgCircle function draws a full circle centered at (x,y) and
  4531.                has a radius of rad.  The circle may be outlined with a solid
  4532.                line, filled using the current fill color and pattern, or both
  4533.                outlined and filled.  The circle center (x,y) is specified in
  4534.                the viewport coordinate system.  The cursor position is not
  4535.                updated after drawing.
  4536.  
  4537.  
  4538. SYNTAX         C         void pgCircle( int x, int y, int rad, int fill );
  4539.  
  4540.                Pascal    PROCEDURE pgCircle( x, y, rad, fill:integer );
  4541.  
  4542.                Basic     SUB pgCircle( x%, y%, rad%, fill% )
  4543.  
  4544.                Fortran   SUBROUTINE pgCircle( x, y, rad, fill )
  4545.                          INTEGER*2 x, y, rad, fill
  4546.  
  4547.                Clipper   PROCEDURE pgCIR( x, y, rad, fill )
  4548.  
  4549.  
  4550. PARAMETERS     x,y       Center of the circle.
  4551.                rad       Radius of the circle.
  4552.                fill      Fill flag.
  4553.  
  4554.                The fill flag parameter can be one of the following manifest
  4555.                constants:
  4556.  
  4557.                Constant  Value     Action
  4558.  
  4559.                pgOUTLINE   1       Draw the outline only using the
  4560.                                    current drawing color.
  4561.                pgFILL      2       Fill the circle using the current fill
  4562.                                    color and fill pattern.  The border
  4563.                                    is not drawn.
  4564.                pgOFILL     3       Draw the outline and fill the
  4565.                                    interior.
  4566.  
  4567.  
  4568. RETURN         None.
  4569.  
  4570.  
  4571. SEE ALSO       pgEllipse, pgPie, pgSector, pgSetColor, pgSetFillMode,
  4572.                pgSetFillPattern, pgSetFillStyle
  4573.  
  4574.  
  4575. EXAMPLES       Draw the outline of a circle of radius 100 centered at
  4576.                (500,500).
  4577.  
  4578.                C         pgSetColor( 2 );
  4579.                          pgCircle( 500, 500, 100, pgOUTLINE );
  4580.  
  4581.                Pascal    pgSetColor( 2 );
  4582.                          pgCircle( 500, 500, 100, pgOUTLINE );
  4583.  
  4584.                Basic     call pgSetColor( 2 )
  4585.                          call pgCircle( 500, 500, 100, pgOUTLINE )
  4586.  
  4587.                Fortran   call pgSetColor( 2 )
  4588.                          call pgCircle( 500, 500, 100, pgOUTLINE )
  4589.  
  4590.                Clipper   pgSCOLOR( 2 )
  4591.                          pgCIR( 500, 500, 100, pgOUTLINE )
  4592.  
  4593.  
  4594.                                ****************
  4595.                                ** pgClearDrw **
  4596.                                ****************
  4597.  
  4598.  
  4599. DESCRIPTION    The pgClearDrw function clears the current drawing file of all
  4600.                graphics.  The drawing file remains open, therefore, you may
  4601.                continue drawing to this file.
  4602.  
  4603.  
  4604. SYNTAX         C         void pgClearDrw( int far *ierr );
  4605.  
  4606.                Pascal    PROCEDURE pgClearDrw( var ierr:integer );
  4607.  
  4608.                Basic     SUB pgClearDrw( SEG ierr% )
  4609.  
  4610.                Fortran   SUBROUTINE pgClearDrw( ierr )
  4611.                          INTEGER*2 ierr
  4612.  
  4613.                Clipper   PROCEDURE pgCLEAR( <ref>ierr )
  4614.  
  4615.  
  4616. PARAMETERS     ierr      A non-zero value will be returned if an error
  4617.                          occurred.  Possible causes of error might be that
  4618.                          the drawing file was not opened or a failure occurred
  4619.                          in opening the file.
  4620.  
  4621.  
  4622. RETURN         None.
  4623.  
  4624.  
  4625. SEE ALSO       pgInitDrw, pgNewPage, pgOpenDrw
  4626.  
  4627.  
  4628. EXAMPLES       Clear the current drawing file and check the returned error
  4629.                flag.
  4630.  
  4631.                C         int ierr;
  4632.                          pgClearDrw( &ierr );
  4633.                          if( ierr != 0 ) printf( "CLEARDRW ERROR" );
  4634.  
  4635.                Pascal    var
  4636.                          ierr : integer;
  4637.                          pgClearDrw( ierr );
  4638.                          if( ierr <> 0 ) writeln( 'CLEARDRW ERROR' );
  4639.  
  4640.                Basic     call pgClearDrw( ierr% )
  4641.                          if ierr% <> 0 print "CLEARDRW ERROR"
  4642.  
  4643.                Fortran   integer*2 ierr
  4644.                          call pgClearDrw( ierr )
  4645.                          if( ierr .ne. 0 ) print *, 'CLEARDRW ERROR'
  4646.  
  4647.                Clipper   pgCLEAR( @ierr )
  4648.                          if( ierr <> 0 ) ? "CLEARDRW ERROR"
  4649.  
  4650.  
  4651.                              *********************
  4652.                              ** pgClearViewPort **
  4653.                              *********************
  4654.  
  4655.  
  4656. DESCRIPTION    The pgClearViewPort function clears the currently established
  4657.                viewport without ejecting the page.  The cursor position is
  4658.                placed at the upper-left hand corner of the viewport.
  4659.  
  4660.  
  4661. SYNTAX         C         void pgClearViewPort( void );
  4662.  
  4663.                Pascal    PROCEDURE pgClearViewPort;
  4664.  
  4665.                Basic     SUB pgClearViewPort
  4666.  
  4667.                Fortran   SUBROUTINE pgClearViewPort
  4668.  
  4669.                Clipper   PROCEDURE pgCLEARVP()
  4670.  
  4671.  
  4672. PARAMETERS     None.
  4673.  
  4674.  
  4675. RETURN         None.
  4676.  
  4677.  
  4678. SEE ALSO       pgNewPage, pgSetViewPort
  4679.  
  4680.  
  4681. EXAMPLES       Fill the default viewport with the current pattern, then set a
  4682.                smaller viewport and clear it.
  4683.  
  4684.                C         int ierr;
  4685.                          pgInitDrw( "TEST.DAT", 2000, 2000, &ierr );
  4686.                          pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
  4687.                          pgSetViewPort( 500, 500, 1500, 1500 );
  4688.                          pgClearViewPort();
  4689.  
  4690.                Pascal    var
  4691.                          ierr : integer;
  4692.                          pgInitDrw( 'TEST.DAT', 2000, 2000, ierr );
  4693.                          pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
  4694.                          pgSetViewPort( 500, 500, 1500, 1500 );
  4695.                          pgClearViewPort;
  4696.  
  4697.                Basic     call pgInitDrw( "TEST.DAT", 2000, 2000, ierr% )
  4698.                          call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
  4699.                          call pgSetViewPort( 500, 500, 1500, 1500 )
  4700.                          call pgClearViewPort
  4701.  
  4702.                Fortran   integer*2 ierr
  4703.                          call pgInitDrw('TEST.DAT'//char(0), 2000, 2000, ierr)
  4704.                          call pgRectangle(0, 0, pgGetMaxX, pgGetMaxY, pgFILL)
  4705.                          call pgSetViewPort( 500, 500, 1500, 1500 )
  4706.                          call pgClearViewPort
  4707.  
  4708.                Clipper   pgINIT( "TEST.DAT", 2000, 2000, @ierr )
  4709.                          pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
  4710.                          pgSVIEWP( 500, 500 1500, 1500 )
  4711.                          pgCLEARVP()
  4712.  
  4713.  
  4714.                                ****************
  4715.                                ** pgDrawText **
  4716.                                ****************
  4717.  
  4718.  
  4719. DESCRIPTION    The pgDrawText function is used to display text strings using
  4720.                one of seven PGL font sets.  Text is displayed using the
  4721.                current text color and attributes.
  4722.  
  4723.                Text is displayed at the current cursor position.  The cursor
  4724.                position may be specified with the pgMoveTo family of
  4725.                functions.  The cursor's x-coordinate is updated if text is
  4726.                displayed with left justification.  The cursor's y-coordinate
  4727.                is not updated.
  4728.  
  4729.  
  4730. SYNTAX         C         void pgDrawText( char far *str );
  4731.  
  4732.                Pascal    PROCEDURE pgDrawText( str:string );
  4733.  
  4734.                Basic     SUB pgDrawText( SEG str$ )
  4735.  
  4736.                Fortran   SUBROUTINE pgDrawText( str )
  4737.                          CHARACTER*(*) str
  4738.  
  4739.                Clipper   PROCEDURE pgDT( <expC>str )
  4740.  
  4741.  
  4742. PARAMETERS     str       Text string to be displayed.
  4743.  
  4744.  
  4745. RETURN         None.
  4746.  
  4747.  
  4748. SEE ALSO       pgDrawTextXY, pgGetTextHeight, pgGetTextLength, pgMoveTo,
  4749.                pgMoveRel, pgSetTextBold, pgSetTextJustify, pgSetTextOrient,
  4750.                pgSetTextScaling, pgSetCharSpacing, pgSetTextStyle
  4751.  
  4752.  
  4753. EXAMPLES       Move the cursor to (100,100) and display "Hello World" using
  4754.                the pgDrawText function.  Then use the pgDrawTextXY function to
  4755.                display "Hello World" at (100,300).
  4756.  
  4757.                C         pgSetTextStyle( pgTRIPLEX );
  4758.                          pgMoveTo( 100, 100 );
  4759.                          pgDrawText( "Hello World" );
  4760.                          pgDrawTextXY( 100, 300, "Hello World" );
  4761.  
  4762.                Pascal    pgSetTextStyle( pgTRIPLEX );
  4763.                          pgMoveTo( 100, 100 );
  4764.                          pgDrawText( 'Hello World' );
  4765.                          pgDrawTextXY( 100, 300, 'Hello World' );
  4766.  
  4767.                Basic     call pgSetTextStyle( pgTRIPLEX )
  4768.                          call pgMoveTo( 100, 100 )
  4769.                          call pgDrawText( "Hello World" )
  4770.                          call pgDrawTextXY( 100, 300, "Hello World" )
  4771.  
  4772.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  4773.                          call pgMoveTo( 100, 100 )
  4774.                          call pgDrawText( 'Hello World'//char(0) )
  4775.                          call pgDrawTextXY( 100, 300, 'Hello World'//char(0) )
  4776.  
  4777.                Clipper   pgSTSTYLE( pgTRIPLEX )
  4778.                          pgMOVTO( 100, 100 )
  4779.                          pgDT( "Hello World" )
  4780.                          pgDTXY( 100, 300, "Hello World" )
  4781.  
  4782.  
  4783.                               ******************
  4784.                               ** pgDrawTextXY **
  4785.                               ******************
  4786.  
  4787.  
  4788. DESCRIPTION    The pgDrawTextXY function is used to display text strings using
  4789.                one of seven PGL font sets.  Text is displayed using the current
  4790.                text color and attributes.
  4791.  
  4792.                The pgDrawTextXY function is similar to the pgDrawText function
  4793.                except that the text position is passed in the function call as
  4794.                (x,y) specified in the viewport coordinate system.  The cursor
  4795.                position is not updated.
  4796.  
  4797.  
  4798. SYNTAX         C         void pgDrawTextXY( int x, int y, char far *str );
  4799.  
  4800.                Pascal    PROCEDURE pgDrawTextXY( x, y:integer; str:string );
  4801.  
  4802.                Basic     SUB pgDrawTextXY( x%, y%, SEG str$ )
  4803.  
  4804.                Fortran   SUBROUTINE pgDrawTextXY( x, y, str )
  4805.                          CHARACTER*(*) str
  4806.                          INTEGER*2 x, y
  4807.  
  4808.                Clipper   PROCEDURE pgDTXY( x, y, <expC>str )
  4809.  
  4810.  
  4811. PARAMETERS     x,y       Text positioning coordinate specified in the viewport
  4812.                          coordinate system.
  4813.                str       Text string to be displayed.
  4814.  
  4815.  
  4816. RETURN         None.
  4817.  
  4818.  
  4819. SEE ALSO       pgDrawText, pgGetTextHeight, pgGetTextLength, pgMoveTo,
  4820.                pgMoveRel, pgSetTextBold, pgSetTextJustify, pgSetTextOrient,
  4821.                pgSetTextScaling, pgSetCharSpacing, pgSetTextStyle
  4822.  
  4823.  
  4824. EXAMPLES       Move the cursor to (100,100) and display "Hello World" using
  4825.                the pgDrawText function.  Then use the pgDrawTextXY function to
  4826.                display "Hello World" at (100,300).
  4827.  
  4828.                C         pgSetTextStyle( pgTRIPLEX );
  4829.                          pgMoveTo( 100, 100 );
  4830.                          pgDrawText( "Hello World" );
  4831.                          pgDrawTextXY( 100, 300, "Hello World" );
  4832.  
  4833.                Pascal    pgSetTextStyle( pgTRIPLEX );
  4834.                          pgMoveTo( 100, 100 );
  4835.                          pgDrawText( 'Hello World' );
  4836.                          pgDrawTextXY( 100, 300, 'Hello World' );
  4837.  
  4838.                Basic     call pgSetTextStyle( pgTRIPLEX )
  4839.                          call pgMoveTo( 100, 100 )
  4840.                          call pgDrawText( "Hello World" )
  4841.                          call pgDrawTextXY( 100, 300, "Hello World" )
  4842.  
  4843.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  4844.                          call pgMoveTo( 100, 100 )
  4845.                          call pgDrawText( 'Hello World'//char(0) )
  4846.                          call pgDrawTextXY( 100, 300, 'Hello World'//char(0) )
  4847.  
  4848.                Clipper   pgSTSTYLE( pgTRIPLEX )
  4849.                          pgMOVTO( 100, 100 )
  4850.                          pgDT( "Hello World" )
  4851.                          pgDTXY( 100, 300, "Hello World" )
  4852.  
  4853.  
  4854.                                 **************
  4855.                                 ** pgEllArc **
  4856.                                 **************
  4857.  
  4858.  
  4859. DESCRIPTION    The pgEllArc function draws elliptical arcs of any angular
  4860.                extent using the current drawing color.  The arc is centered at
  4861.                the coordinate (x,y) with radii xrad and yrad.  The start and
  4862.                termination angles of the arc are given by the parameters sa
  4863.                and ea, respectively, specified in degree measure.  Zero
  4864.                degrees is taken to be the 3 o'clock position increasing
  4865.                positively in a counterclockwise direction.  The arc center
  4866.                (x,y) is specified in the viewport coordinate system.  The
  4867.                cursor position is not updated after drawing.
  4868.  
  4869.  
  4870. SYNTAX         C         void pgEllArc( int x, int y, int xrad, int yrad,
  4871.                               int sa, int ea );
  4872.  
  4873.                Pascal    PROCEDURE pgEllArc( x, y, xrad, yrad,
  4874.                               sa, ea:integer );
  4875.  
  4876.                Basic     SUB pgEllArc( x%, y%, xrad%, yrad%, sa%, ea% )
  4877.  
  4878.                Fortran   SUBROUTINE pgEllArc( x, y, xrad, yrad, sa, ea )
  4879.                          INTEGER*2 x, y, xrad, yrad, sa, ea
  4880.  
  4881.                Clipper   PROCEDURE pgELLA( x, y, xrad, yrad, sa, ea )
  4882.  
  4883.  
  4884. PARAMETERS     x,y       Center point of the arc.
  4885.                xrad      Horizontal radius of the arc.
  4886.                yrad      Vertical radius of the arc.
  4887.                sa        Start angle of the arc.
  4888.                ea        End angle of the arc ( > sa ).
  4889.  
  4890.  
  4891. RETURN         None.
  4892.  
  4893.  
  4894. SEE ALSO       pgArc, pgCircle, pgEllipse, pgPie, pgSector, pgSetColor
  4895.  
  4896.  
  4897. EXAMPLES       Draw an elliptic arc of radius 200 by 100 centered at (500,500)
  4898.                from 0 to 90 degrees.
  4899.  
  4900.                C         pgSetColor( 2 );
  4901.                          pgEllArc( 500, 500, 200, 100, 0, 90 );
  4902.  
  4903.                Pascal    pgSetColor( 2 );
  4904.                          pgEllArc( 500, 500, 200, 100, 0, 90 );
  4905.  
  4906.                Basic     call pgSetColor( 2 )
  4907.                          call pgEllArc( 500, 500, 200, 100, 0, 90 )
  4908.  
  4909.                Fortran   call pgSetColor( 2 )
  4910.                          call pgEllArc( 500, 500, 200, 100, 0, 90 )
  4911.  
  4912.                Clipper   pgSCOLOR( 2 )
  4913.                          pgELLA( 500, 500, 200, 100, 0, 90 )
  4914.  
  4915.  
  4916.                                ***************
  4917.                                ** pgEllipse **
  4918.                                ***************
  4919.  
  4920.  
  4921. DESCRIPTION    The pgEllipse function draws a full ellipse centered at (x,y)
  4922.                and having radii xrad and yrad.  The ellipse may be outlined
  4923.                with a solid line, filled using the current fill color and
  4924.                pattern, or both outlined and filled.  The ellipse center (x,y)
  4925.                is specified in the viewport coordinate system.  The cursor
  4926.                position is not updated after drawing.
  4927.  
  4928.  
  4929. SYNTAX         C         void pgEllipse( int x, int y, int xrad, int yrad,
  4930.                               int fill );
  4931.  
  4932.                Pascal    PROCEDURE pgEllipse( x, y, xrad, yrad, fill:integer );
  4933.  
  4934.                Basic     SUB pgEllipse( x%, y%, xrad%, yrad%, fill% )
  4935.  
  4936.                Fortran   SUBROUTINE pgEllipse( x, y, xrad, yrad, fill )
  4937.                          INTEGER*2 x, y, xrad, yrad, fill
  4938.  
  4939.                Clipper   PROCEDURE pgELL( x, y, xrad, yrad, fill )
  4940.  
  4941.  
  4942. PARAMETERS     x,y       Center of the ellipse.
  4943.                xrad      Horizontal radius of the ellipse.
  4944.                yrad      Vertical radius of the ellipse.
  4945.                fill      Fill flag.
  4946.  
  4947.                The fill flag parameter may be one of the following manifest
  4948.                constants:
  4949.  
  4950.                Constant  Value     Action
  4951.  
  4952.                pgOUTLINE   1       Draw the outline only using the
  4953.                                    current drawing color.
  4954.                pgFILL      2       Fill using the current fill color and
  4955.                                    fill pattern.  The border is not
  4956.                                    drawn.
  4957.                pgOFILL     3       Draw the outline and fill the
  4958.                                    interior.
  4959.  
  4960. RETURN         None.
  4961.  
  4962.  
  4963. SEE ALSO       pgCircle, pgPie, pgSector, pgSetColor, pgSetFillMode,
  4964.                pgSetFillPattern, pgSetFillStyle
  4965.  
  4966.  
  4967. EXAMPLES       Draw a filled ellipse of radius 200 by 100 centered at
  4968.                (500,500).
  4969.  
  4970.                C         pgSetColor( 2 );
  4971.                          pgEllipse( 500, 500, 200, 100, pgFILL );
  4972.  
  4973.                Pascal    pgSetColor( 2 );
  4974.                          pgEllipse( 500, 500, 200, 100, pgFILL );
  4975.  
  4976.                Basic     call pgSetColor( 2 )
  4977.                          call pgEllipse( 500, 500, 200, 100, pgFILL )
  4978.  
  4979.                Fortran   call pgSetColor( 2 )
  4980.                          call pgEllipse( 500, 500, 200, 100, pgFILL )
  4981.  
  4982.                Clipper   pgSCOLOR( 2 )
  4983.                          pgELL( 500, 500, 200, 100, pgFILL )
  4984.  
  4985.  
  4986.                                 **************
  4987.                                 ** pgEndDrw **
  4988.                                 **************
  4989.  
  4990.  
  4991. DESCRIPTION    The pgEndDrw function ends the drawing session and closes the
  4992.                drawing file.  Only one drawing file may be open at a time.
  4993.                You must issue a pgEndDrw command before recalling pgInitDrw or
  4994.                pgOpenDrw.  Failure to do so may cause unpredictable results.
  4995.  
  4996.  
  4997. SYNTAX         C         void pgEndDrw( void );
  4998.  
  4999.                Pascal    PROCEDURE pgEndDrw;
  5000.  
  5001.                Basic     SUB pgEndDrw
  5002.  
  5003.                Fortran   SUBROUTINE pgEndDrw
  5004.  
  5005.                Clipper   PROCEDURE pgEND()
  5006.  
  5007.  
  5008. PARAMETERS     None.
  5009.  
  5010.  
  5011. RETURN         None.
  5012.  
  5013.  
  5014. SEE ALSO       pgInitDrw, pgOpenDrw
  5015.  
  5016.  
  5017. EXAMPLES       Close the current drawing file and open a new drawing file
  5018.                named TEST.PLT with a virtual resolution of 2000 x 2000.
  5019.  
  5020.                C         int ierr;
  5021.                          pgEndDrw();
  5022.                          pgInitDrw( "TEST.PLT", 2000, 2000, &ierr );
  5023.  
  5024.                Pascal    var
  5025.                          ierr : integer;
  5026.                          pgEndDrw;
  5027.                          pgInitDrw( 'TEST.PLT', 2000, 2000, ierr );
  5028.  
  5029.                Basic     call pgEndDrw
  5030.                          call pgInitDrw( "TEST.PLT", 2000, 2000, ierr% )
  5031.  
  5032.                Fortran   integer*2 ierr
  5033.                          call pgEndDrw
  5034.                          call pgInitDrw('TEST.PLT'//char(0), 2000, 2000, ierr)
  5035.  
  5036.                Clipper   pgEND()
  5037.                          pgINIT( "TEST.PLT", 2000, 2000, @ierr )
  5038.  
  5039.  
  5040.                                ***************
  5041.                                ** pgGetAbsX **
  5042.                                ***************
  5043.  
  5044.  
  5045. DESCRIPTION    The pgGetAbsX function returns the current x-cursor position
  5046.                in terms of the absolute virtual coordinate system.
  5047.  
  5048.  
  5049. SYNTAX         C         int pgGetAbsX( void );
  5050.  
  5051.                Pascal    FUNCTION pgGetAbsX : integer;
  5052.  
  5053.                Basic     FUNCTION pgGetAbsX%
  5054.  
  5055.                Fortran   INTEGER*2 FUNCTION pgGetAbsX
  5056.  
  5057.                Clipper   FUNCTION pgGABSX()
  5058.  
  5059.  
  5060. PARAMETERS     None.
  5061.  
  5062.  
  5063. RETURN         The x-cursor position in terms of the absolute virtual
  5064.                coordinate system.
  5065.  
  5066.  
  5067. SEE ALSO       pgDrawText, pgGetAbsY, pgGetX, pgGetY, pgMoveRel,
  5068.                pgMoveTo, pgLineRel, pgLineTo
  5069.  
  5070.  
  5071. EXAMPLES       Set a viewport, then move the cursor to an arbitrary location.
  5072.                Use the pgGetX and pgGetAbsX functions to return the location
  5073.                of the cursor relative to the viewport and relative to the
  5074.                absolute coordinates, respectively.
  5075.  
  5076.                C         pgSetViewPort( 300, 300, 900, 900 );
  5077.                          pgMoveTo( 100, 100 );
  5078.                          printf( "Viewport X coordinate = %d\n", pgGetX() );
  5079.                          printf( "Absolute X coordinate = %d\n", pgGetAbsX() );
  5080.  
  5081.                Pascal    pgSetViewPort( 300, 300, 900, 900 );
  5082.                          pgMoveTo( 100, 100 );
  5083.                          writeln( 'Viewport X coordinate = ', pgGetX );
  5084.                          writeln( 'Absolute X coordinate = ', pgGetAbsX );
  5085.  
  5086.                Basic     call pgSetViewPort( 300, 300, 900, 900 )
  5087.                          call pgMoveTo( 100, 100 )
  5088.                          print "Viewport X coordinate = ", pgGetX%
  5089.                          print "Absolute X coordinate = ", pgGetAbsX%
  5090.  
  5091.                Fortran   call pgSetViewPort( 300, 300, 900, 900 )
  5092.                          call pgMoveTo( 100, 100 )
  5093.                          print *, 'Viewport X coordinate = ', pgGetX
  5094.                          print *, 'Absolute X coordinate = ', pgGetAbsX
  5095.  
  5096.                Clipper   pgSetViewPort( 300, 300, 900, 900 )
  5097.                          pgMoveTo( 100, 100 )
  5098.                          ? "Viewport X coordinate = ", pgGX()
  5099.                          ? "Absolute X coordinate = ", pgGABSX()
  5100.  
  5101.  
  5102.                                ***************
  5103.                                ** pgGetAbsY **
  5104.                                ***************
  5105.  
  5106.  
  5107. DESCRIPTION    The pgGetAbsY function returns the current y-cursor position in
  5108.                terms of the absolute virtual coordinate system.
  5109.  
  5110.  
  5111. SYNTAX         C         int pgGetAbsY( void );
  5112.  
  5113.                Pascal    FUNCTION pgGetAbsY : integer;
  5114.  
  5115.                Basic     FUNCTION pgGetAbsY%
  5116.  
  5117.                Fortran   INTEGER*2 FUNCTION pgGetAbsY
  5118.  
  5119.                Clipper   FUNCTION pgGABSY()
  5120.  
  5121.  
  5122. PARAMETERS     None.
  5123.  
  5124.  
  5125. RETURN         The y-cursor position in terms of the absolute virtual
  5126.                coordinate system.
  5127.  
  5128.  
  5129. SEE ALSO       pgDrawText, pgGetAbsX, pgGetX, pgGetY, pgMoveRel,
  5130.                pgMoveTo, pgLineRel, pgLineTo
  5131.  
  5132.  
  5133. EXAMPLES       Set a viewport, then move the cursor to an arbitrary location.
  5134.                Use the pgGetY and pgGetAbsY functions to return the location
  5135.                of the cursor relative to the viewport and relative to the
  5136.                absolute coordinates, respectively.
  5137.  
  5138.                C         pgSetViewPort( 300, 300, 900, 900 );
  5139.                          pgMoveTo( 100, 100 );
  5140.                          printf( "Viewport Y coordinate = %d\n", pgGetY() );
  5141.                          printf( "Absolute Y coordinate = %d\n", pgGetAbsY() );
  5142.  
  5143.                Pascal    pgSetViewPort( 300, 300, 900, 900 );
  5144.                          pgMoveTo( 100, 100 );
  5145.                          writeln( 'Viewport Y coordinate = ', pgGetY );
  5146.                          writeln( 'Absolute Y coordinate = ', pgGetAbsY );
  5147.  
  5148.                Basic     call pgSetViewPort( 300, 300, 900, 900 )
  5149.                          call pgMoveTo( 100, 100 )
  5150.                          print "Viewport Y coordinate = ", pgGetY%
  5151.                          print "Absolute Y coordinate = ", pgGetAbsY%
  5152.  
  5153.                Fortran   call pgSetViewPort( 300, 300, 900, 900 )
  5154.                          call pgMoveTo( 100, 100 )
  5155.                          print *, 'Viewport Y coordinate = ', pgGetY
  5156.                          print *, 'Absolute Y coordinate = ', pgGetAbsY
  5157.  
  5158.                Clipper   pgSetViewPort( 300, 300, 900, 900 )
  5159.                          pgMoveTo( 100, 100 )
  5160.                          ? "Viewport Y coordinate = ", pgGY()
  5161.                          ? "Absolute Y coordinate = ", pgGABSY()
  5162.  
  5163.  
  5164.                             **********************
  5165.                             ** pgGetCharSpacing **
  5166.                             **********************
  5167.  
  5168.  
  5169. DESCRIPTION    The pgGetCharSpacing function returns the current level of
  5170.                additional character spacing set by the pgSetCharSpacing
  5171.                function.  The default setting is 0.
  5172.  
  5173.  
  5174. SYNTAX         C         int pgGetCharSpacing( void );
  5175.  
  5176.                Pascal    FUNCTION pgGetCharSpacing : integer;
  5177.  
  5178.                Basic     FUNCTION pgGetCharSpacing%
  5179.  
  5180.                Fortran   INTEGER*2 FUNCTION pgGetCharSpacing
  5181.  
  5182.                Clipper   FUNCTION pgGCHARSP()
  5183.  
  5184.  
  5185. PARAMETERS     None.
  5186.  
  5187.  
  5188. RETURN         Character spacing in pixel units.
  5189.  
  5190.  
  5191. SEE ALSO       pgGetTextLength, pgSetCharSpacing
  5192.  
  5193.  
  5194. EXAMPLES       Set the character spacing to twice the current value, then
  5195.                display the text "Hello World".
  5196.  
  5197.                C         pgSetTextStyle( pgTRIPLEX );
  5198.                          pgSetCharSpacing( 2 * pgGetCharSpacing() );
  5199.                          pgDrawTextXY( 100, 100, "Hello World" );
  5200.  
  5201.                Pascal    pgSetTextStyle( pgTRIPLEX );
  5202.                          pgSetCharSpacing( 2 * pgGetCharSpacing );
  5203.                          pgDrawTextXY( 100, 100, 'Hello World' );
  5204.  
  5205.                Basic     call pgSetTextStyle( pgTRIPLEX )
  5206.                          call pgSetCharSpacing( 2 * pgGetCharSpacing% )
  5207.                          call pgDrawTextXY( 100, 100, "Hello World" )
  5208.  
  5209.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  5210.                          call pgSetCharSpacing( 2 * pgGetCharSpacing )
  5211.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  5212.  
  5213.                Clipper   pgSTSTYLE( pgTRIPLEX )
  5214.                          pgSCHARSP( 2 * pgGCHARSP() )
  5215.                          pgDTXY( 100, 100, "Hello World" )
  5216.  
  5217.  
  5218.                              *******************
  5219.                              ** pgGetClipArea **
  5220.                              *******************
  5221.  
  5222.  
  5223. DESCRIPTION    The pgGetClipArea function returns the clipping region set with
  5224.                the pgSetClipArea function.  The clipping region coordinates
  5225.                are returned in terms of the absolute virtual coordinate system.
  5226.  
  5227.  
  5228. SYNTAX         C         void pgGetClipArea( int far *x1, int far *y1,
  5229.                               int far *x2, int far *y2 );
  5230.  
  5231.                Pascal    PROCEDURE pgGetClipArea( var x1, y1,
  5232.                               x2, y2:integer );
  5233.  
  5234.                Basic     SUB pgGetClipArea( SEG x1%, SEG y1%,
  5235.                               SEG x2%, SEG y2% )
  5236.  
  5237.                Fortran   SUBROUTINE pgGetClipArea( x1, y1, x2, y2 )
  5238.                          INTEGER*2 x1, y1, x2, y2
  5239.  
  5240.                Clipper   PROCEDURE pgGCLIPA( <ref>x1, <ref>y1,
  5241.                               <ref>x2, <ref>y2 )
  5242.  
  5243.  
  5244. PARAMETERS     x1,y1     Upper-left corner of clipping region.
  5245.                x2,y2     Lower-right corner of clipping region.
  5246.  
  5247.  
  5248. RETURN         None.
  5249.  
  5250.  
  5251. SEE ALSO       pgGetClipping, pgGetViewPort, pgSetClipArea, pgSetClipping,
  5252.                pgSetViewPort
  5253.  
  5254.  
  5255. EXAMPLES       Get the current clipping region.  Set the clipping area to the
  5256.                full printable region and fill that region, then restore the
  5257.                clipping region.
  5258.  
  5259.                C         int left, top, right, bottom;
  5260.                          pgGetClipArea( &left, &top, &right, &bottom );
  5261.                          pgSetClipArea( 0, 0, pgGetMaxX(), pgGetMaxY() );
  5262.                          pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
  5263.                          pgSetClipArea( left, top, right, bottom );
  5264.  
  5265.                Pascal    var
  5266.                          left, top, right, bottom : integer;
  5267.                          pgGetClipArea( left, top, right, bottom );
  5268.                          pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY );
  5269.                          pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
  5270.                          pgSetClipArea( left, top, right, bottom );
  5271.  
  5272.                Basic     call pgGetClipArea( left%, top%, right%, bottom% )
  5273.                          call pgSetClipArea( 0, 0, pgGetMaxX%, pgGetMaxY% )
  5274.                          call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
  5275.                          call pgSetClipArea( left%, top%, right%, bottom% )
  5276.  
  5277.                Fortran   integer*2 left, top, right, bottom
  5278.                          call pgGetClipArea( left, top, right, bottom )
  5279.                          call pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY )
  5280.                          call pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL )
  5281.                          call pgSetClipArea( left, top, right, bottom )
  5282.  
  5283.                Clipper   pgGCLIPA( @left, @top, @right, @bottom )
  5284.                          pgSCLIPA( 0, 0, pgGMAXX(), pgGMAXY() )
  5285.                          pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
  5286.                          pgSCLIPA( left, top, right, bottom )
  5287.  
  5288.  
  5289.                              *******************
  5290.                              ** pgGetClipping **
  5291.                              *******************
  5292.  
  5293.  
  5294. DESCRIPTION    The pgGetClipping function returns the current clipping switch
  5295.                status.
  5296.  
  5297.                The clipping switch is used to enable or disable clipping.  If
  5298.                enabled, all subsequent graphics, including text, will be
  5299.                clipped at the boundaries set by the pgSetClipArea function.
  5300.                If disabled, clipping will be performed at the boundaries of
  5301.                the page.
  5302.  
  5303.  
  5304. SYNTAX         C         int pgGetClipping( void );
  5305.  
  5306.                Pascal    FUNCTION pgGetClipping : integer;
  5307.  
  5308.                Basic     FUNCTION pgGetClipping%
  5309.  
  5310.                Fortran   INTEGER*2 FUNCTION pgGetClipping
  5311.  
  5312.                Clipper   FUNCTION pgGCLIP()
  5313.  
  5314.  
  5315. PARAMETERS     None.
  5316.  
  5317.  
  5318. RETURN         The clipping switch status is returned as one of the following:
  5319.  
  5320.                Constant  Value
  5321.  
  5322.                pgON        1
  5323.                pgOFF       0
  5324.  
  5325.  
  5326. SEE ALSO       pgGetClipArea, pgGetViewPort, pgSetClipArea, pgSetClipping,
  5327.                pgSetViewPort
  5328.  
  5329.  
  5330. EXAMPLES       Get the current clipping flag.  Disable clipping and fill a
  5331.                rectangular region, then restore the clipping parameter.
  5332.  
  5333.                C         int clipflag;
  5334.                          clipflag = pgGetClipping();
  5335.                          pgSetClipping( pgOFF );
  5336.                          pgRectangle( 0, 0, 500, 200, pgFILL );
  5337.                          pgSetClipping( clipflag );
  5338.  
  5339.                Pascal    var
  5340.                          clipflag : integer;
  5341.                          clipflag := pgGetClipping;
  5342.                          pgSetClipping( pgOFF );
  5343.                          pgRectangle( 0, 0, 500, 200, pgFILL );
  5344.                          pgSetClipping( clipflag );
  5345.  
  5346.                Basic     clipflag% = pgGetClipping%
  5347.                          call pgSetClipping( pgOFF )
  5348.                          call pgRectangle( 0, 0, 500, 200, pgFILL )
  5349.                          call pgSetClipping( clipflag% )
  5350.  
  5351.                Fortran   integer*2 clipflag
  5352.                          clipflag = pgGetClipping
  5353.                          call pgSetClipping( pgOFF )
  5354.                          call pgRectangle( 0, 0, 500, 200, pgFILL )
  5355.                          call pgSetClipping( clipflag )
  5356.  
  5357.                Clipper   clipflag = pgGCLIP()
  5358.                          pgSCLIP( pgOFF )
  5359.                          pgRECT( 0, 0, 500, 200, pgFILL )
  5360.                          pgSCLIP( clipflag )
  5361.  
  5362.  
  5363.                                ****************
  5364.                                ** pgGetColor **
  5365.                                ****************
  5366.  
  5367.  
  5368. DESCRIPTION    The pgGetColor function returns the current color index.  The
  5369.                default color index is 1.
  5370.  
  5371.                The following functions use the current color:  pgArc, pgCircle,
  5372.                pgDrawText, pgDrawTextXY, pgEllArc, pgEllipse, pgLine,
  5373.                pgLineRel, pgLineTo, pgPie, pgPolygon, pgPolyLine, pgRectangle,
  5374.                and pgSector.
  5375.  
  5376.  
  5377. SYNTAX         C         int pgGetColor( void );
  5378.  
  5379.                Pascal    FUNCTION pgGetColor : integer;
  5380.  
  5381.                Basic     FUNCTION pgGetColor%
  5382.  
  5383.                Fortran   INTEGER*2 FUNCTION pgGetColor
  5384.  
  5385.                Clipper   FUNCTION pgGCOLOR()
  5386.  
  5387.  
  5388. PARAMETERS     None.
  5389.  
  5390.  
  5391. RETURN         The current color index.
  5392.  
  5393.  
  5394. SEE ALSO       pgSetColor
  5395.  
  5396.  
  5397. EXAMPLES       Get the current drawing color and use it as the fill color.
  5398.  
  5399.                C         int color;
  5400.                          color = pgGetColor();
  5401.                          pgSetFillStyle( pgFSOLID, color );
  5402.                          pgRectangle( 200, 200, 500, 500, pgFILL );
  5403.                Pascal    var
  5404.                          color : integer;
  5405.                          color := pgGetColor;
  5406.                          pgSetFillStyle( pgFSOLID, color );
  5407.                          pgRectangle( 200, 200, 500, 500, pgFILL );
  5408.  
  5409.                Basic     color% = pgGetColor%
  5410.                          call pgSetFillStyle( pgFSOLID, color% )
  5411.                          call pgRectangle( 200, 200, 500, 500, pgFILL )
  5412.  
  5413.                Fortran   integer*2 color
  5414.                          color = pgGetColor
  5415.                          call pgSetFillStyle( pgFSOLID, color )
  5416.                          call pgRectangle( 200, 200, 500, 500, pgFILL )
  5417.  
  5418.                Clipper   color = pgGCOLOR()
  5419.                          pgSFSTYLE( pgFSOLID, color )
  5420.                          pgRECT( 200, 200, 500, 500, pgFILL )
  5421.  
  5422.  
  5423.                              ********************
  5424.                              ** pgGetDevColors **
  5425.                              ********************
  5426.  
  5427.  
  5428. DESCRIPTION    The pgGetDevColors function returns the number of available
  5429.                colors for the currently loaded device driver at the specified
  5430.                resolution mode.  For example, an HP PaintJet allows 8 drawing
  5431.                colors at the highest resolution mode, but allows 16 colors in
  5432.                low resolution mode while most laserjets and dot matrix printers
  5433.                only allow 2 colors (black and white).
  5434.  
  5435.                The device driver must first be installed by calling
  5436.                pgLoadDevInfo.  The maximum number of resolution modes may be
  5437.                obtained by calling the pgGetDevModes function.
  5438.  
  5439.  
  5440. SYNTAX         C         int pgGetDevColors( int res );
  5441.  
  5442.                Pascal    FUNCTION pgGetDevColors( res:integer ) : integer;
  5443.  
  5444.                Basic     FUNCTION pgGetDevColors%( res% )
  5445.  
  5446.                Fortran   INTEGER*2 FUNCTION pgGetDevColors( res )
  5447.                          INTEGER*2 res
  5448.  
  5449.                Clipper   FUNCTION pgGDCOLORS( res )
  5450.  
  5451.  
  5452. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  5453.  
  5454.  
  5455. RETURN         The number of available colors for printing.
  5456.  
  5457.  
  5458. SEE ALSO       pgGetDevModes, pgLoadDevInfo
  5459.  
  5460.  
  5461. EXAMPLES       Load the HP PaintJet device driver and determine how many
  5462.                drawing colors are allowed at the highest resolution mode.
  5463.  
  5464.                C         int ncolors, ierr;
  5465.                          ierr = pgLoadDevInfo( "HPPJET" );
  5466.                          ncolors = pgGetDevColors( 3 );
  5467.  
  5468.                Pascal    var
  5469.                          ncolors, ierr : integer;
  5470.                          ierr := pgLoadDevInfo( 'HPPJET' );
  5471.                          ncolors := pgGetDevColors( 3 );
  5472.  
  5473.                Basic     ierr% = pgLoadDevInfo( "HPPJET" )
  5474.                          ncolors% = pgGetDevColors%( 3 )
  5475.  
  5476.                Fortran   integer*2 ncolors, ierr
  5477.                          ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
  5478.                          ncolors = pgGetDevColors( 3 )
  5479.  
  5480.                Clipper   ierr = pgLDINFO( "HPPJET" )
  5481.                          ncolors = pgGDCOLORS( 3 )
  5482.  
  5483.  
  5484.                              ********************
  5485.                              ** pgGetDevHeight **
  5486.                              ********************
  5487.  
  5488.  
  5489. DESCRIPTION    The pgGetDevHeight function returns the paper height for the
  5490.                currently loaded device driver.  You must first load a device
  5491.                driver with the pgLoadDevInfo function.
  5492.  
  5493.  
  5494. SYNTAX         C         int pgGetDevHeight( void );
  5495.  
  5496.                Pascal    FUNCTION pgGetDevHeight : integer;
  5497.  
  5498.                Basic     FUNCTION pgGetDevHeight%
  5499.  
  5500.                Fortran   INTEGER*2 FUNCTION pgGetDevHeight
  5501.  
  5502.                Clipper   FUNCTION pgGDHEIGHT()
  5503.  
  5504.  
  5505. PARAMETERS     None.
  5506.  
  5507.  
  5508. RETURN         The paper height in units of 100=1"
  5509.                (e.g., 850=8.5", 1100=11.0").
  5510.  
  5511.  
  5512. SEE ALSO       pgGetDevWidth, pgLoadDevInfo
  5513.  
  5514.  
  5515. EXAMPLES       Load the 'HPLJET' device driver and get the width and height of
  5516.                the paper.
  5517.  
  5518.                C         int width, height, ierr;
  5519.                          ierr = pgLoadDevInfo( "HPLJET" );
  5520.                          width = pgGetDevWidth();
  5521.                          height = pgGetDevHeight();
  5522.  
  5523.                Pascal    var
  5524.                          width, height, ierr : integer;
  5525.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5526.                          width := pgGetDevWidth;
  5527.                          height := pgGetDevHeight;
  5528.  
  5529.                Basic     ierr% = pgLoadDevInfo( "HPLJET" )
  5530.                          width% = pgGetDevWidth%
  5531.                          height% = pgGetDevHeight%
  5532.  
  5533.                Fortran   integer*2 width, height, ierr
  5534.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5535.                          width = pgGetDevWidth
  5536.                          height = pgGetDevHeight
  5537.  
  5538.                Clipper   ierr = pgLDINFO( "HPLJET" )
  5539.                          width = pgGDWIDTH()
  5540.                          height = pgGDHEIGHT()
  5541.  
  5542.  
  5543.                               ******************
  5544.                               ** pgGetDevMaxX **
  5545.                               ******************
  5546.  
  5547.  
  5548. DESCRIPTION    The pgGetDevMaxX function returns the number of addressable
  5549.                pixels in the x-direction for the specified resolution mode of
  5550.                the current device driver.  The device driver must first be
  5551.                installed by calling pgLoadDevInfo.  The maximum number of
  5552.                resolution modes may be obtained by calling the pgGetDevModes
  5553.                function.  This function accounts for pagesize, margins, and
  5554.                orientation. It should be called after pgSetPageMargins,
  5555.                pgSetPageForm, and pgSetPageSize.
  5556.  
  5557.  
  5558. SYNTAX         C         int pgGetDevMaxX( int res );
  5559.  
  5560.                Pascal    FUNCTION pgGetDevMaxX( res:integer ) : integer;
  5561.  
  5562.                Basic     FUNCTION pgGetDevMaxX%( res% )
  5563.  
  5564.                Fortran   INTEGER*2 FUNCTION pgGetDevMaxX( res )
  5565.                          INTEGER*2 res
  5566.  
  5567.                Clipper   FUNCTION pgGDMAXX( res )
  5568.  
  5569.  
  5570. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  5571.  
  5572.  
  5573. RETURN         The maximum number of addressable pixels in the x-direction.
  5574.  
  5575.  
  5576. SEE ALSO       pgGetDevMaxY, pgLoadDevInfo, pgSetPageForm, pgSetPageSize,
  5577.                pgSetPageMargins
  5578.  
  5579.  
  5580. EXAMPLES       Load the 'HPLJET' device driver and get the maximum number of x
  5581.                and y addressable pixels for the highest resolution mode (3).
  5582.  
  5583.                C         int xmax, ymax, ierr;
  5584.                          ierr = pgLoadDevInfo( "HPLJET" );
  5585.                          pgSetPageMargins( 100,100,100,100 );
  5586.                          pgSetPageForm( pgLANDSCAPE );
  5587.                          pgSetPageSize( pgFULLPAGE );
  5588.                          xmax = pgGetDevMaxX( 3 );
  5589.                          ymax = pgGetDevMaxY( 3 );
  5590.  
  5591.                Pascal    var
  5592.                          xmax, ymax, ierr : integer;
  5593.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5594.                          pgSetPageMargins( 100,100,100,100 );
  5595.                          pgSetPageForm( pgLANDSCAPE );
  5596.                          pgSetPageSize( pgFULLPAGE );
  5597.                          xmax := pgGetDevMaxX( 3 );
  5598.                          ymax := pgGetDevMaxY( 3 );
  5599.  
  5600.                Basic     ierr% = pgLoadDevInfo( "HPLJET" )
  5601.                          call pgSetPageMargins( 100,100,100,100 )
  5602.                          call pgSetPageForm( pgLANDSCAPE )
  5603.                          call pgSetPageSize( pgFULLPAGE )
  5604.                          xmax% = pgGetDevMaxX%( 3 )
  5605.                          ymax% = pgGetDevMaxY%( 3 )
  5606.  
  5607.                Fortran   integer*2 xmax, ymax, ierr
  5608.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5609.                          call pgSetPageMargins( 100,100,100,100 )
  5610.                          call pgSetPageForm( pgLANDSCAPE )
  5611.                          call pgSetPageSize( pgFULLPAGE )
  5612.                          xmax = pgGetDevMaxX( 3 )
  5613.                          ymax = pgGetDevMaxY( 3 )
  5614.  
  5615.                Clipper   ierr = pgLDINFO( "HPLJET" )
  5616.                          pgSPMARGIN( 100,100,100,100 )
  5617.                          pgSPFORM( pgLANDSCAPE )
  5618.                          pgSPSIZE( pgFULLPAGE )
  5619.                          xmax = pgGDMAXX( 3 )
  5620.                          ymax = pgGDMAXY( 3 )
  5621.  
  5622.  
  5623.                               ******************
  5624.                               ** pgGetDevMaxY **
  5625.                               ******************
  5626.  
  5627.  
  5628. DESCRIPTION    The pgGetDevMaxY function returns the number of addressable
  5629.                pixels in the y-direction for the specified resolution mode of
  5630.                the current device driver.  The device driver must first be
  5631.                installed by calling pgLoadDevInfo.  The maximum number of
  5632.                resolution modes may be obtained by calling the pgGetDevModes
  5633.                function.  This function accounts for pagesize, margins, and
  5634.                orientation. It should be called after pgSetPageMargins,
  5635.                pgSetPageForm, and pgSetPageSize.
  5636.  
  5637.  
  5638. SYNTAX         C         int pgGetDevMaxY( int res );
  5639.  
  5640.                Pascal    FUNCTION pgGetDevMaxY( res:integer ) : integer;
  5641.  
  5642.                Basic     FUNCTION pgGetDevMaxY%( res% )
  5643.  
  5644.                Fortran   INTEGER*2 FUNCTION pgGetDevMaxY( res )
  5645.                          INTEGER*2 res
  5646.  
  5647.                Clipper   FUNCTION pgGDMAXY( res )
  5648.  
  5649.  
  5650. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  5651.  
  5652.  
  5653. RETURN         The maximum number of addressable pixels in the y-direction.
  5654.  
  5655.  
  5656. SEE ALSO       pgGetDevMaxX, pgLoadDevInfo, pgSetPageForm, pgSetPageSize,
  5657.                pgSetPageMargins
  5658.  
  5659.  
  5660. EXAMPLES       Load the 'HPLJET' device driver and get the maximum number of x
  5661.                and y addressable pixels for the highest resolution mode (3).
  5662.  
  5663.                C         int xmax, ymax, ierr;
  5664.                          ierr = pgLoadDevInfo( "HPLJET" );
  5665.                          pgSetPageMargins( 100,100,100,100 );
  5666.                          pgSetPageForm( pgLANDSCAPE );
  5667.                          pgSetPageSize( pgFULLPAGE );
  5668.                          xmax = pgGetDevMaxX( 3 );
  5669.                          ymax = pgGetDevMaxY( 3 );
  5670.  
  5671.                Pascal    var
  5672.                          xmax, ymax, ierr : integer;
  5673.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5674.                          pgSetPageMargins( 100,100,100,100 );
  5675.                          pgSetPageForm( pgLANDSCAPE );
  5676.                          pgSetPageSize( pgFULLPAGE );
  5677.                          xmax := pgGetDevMaxX( 3 );
  5678.                          ymax := pgGetDevMaxY( 3 );
  5679.  
  5680.                Basic     ierr% = pgLoadDevInfo( "HPLJET" )
  5681.                          call pgSetPageMargins( 100,100,100,100 )
  5682.                          call pgSetPageForm( pgLANDSCAPE )
  5683.                          call pgSetPageSize( pgFULLPAGE )
  5684.                          xmax% = pgGetDevMaxX%( 3 )
  5685.                          ymax% = pgGetDevMaxY%( 3 )
  5686.  
  5687.                Fortran   integer*2 xmax, ymax, ierr
  5688.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5689.                          call pgSetPageMargins( 100,100,100,100 )
  5690.                          call pgSetPageForm( pgLANDSCAPE )
  5691.                          call pgSetPageSize( pgFULLPAGE )
  5692.                          xmax = pgGetDevMaxX( 3 )
  5693.                          ymax = pgGetDevMaxY( 3 )
  5694.  
  5695.                Clipper   ierr = pgLDINFO( "HPLJET" )
  5696.                          pgSPMARGIN( 100,100,100,100 )
  5697.                          pgSPFORM( pgLANDSCAPE )
  5698.                          pgSPSIZE( pgFULLPAGE )
  5699.                          xmax = pgGDMAXX( 3 )
  5700.                          ymax = pgGDMAXY( 3 )
  5701.  
  5702.  
  5703.                              *******************
  5704.                              ** pgGetDevModes **
  5705.                              *******************
  5706.  
  5707.  
  5708. DESCRIPTION    The pgGetDevModes function returns the number of available
  5709.                resolution modes for the currently loaded device driver.  The
  5710.                device driver must first be installed by calling pgLoadDevInfo.
  5711.  
  5712.  
  5713. SYNTAX         C         int pgGetDevModes( void );
  5714.  
  5715.                Pascal    FUNCTION pgGetDevModes : integer;
  5716.  
  5717.                Basic     FUNCTION pgGetDevModes%
  5718.  
  5719.                Fortran   INTEGER*2 FUNCTION pgGetDevModes
  5720.  
  5721.                Clipper   FUNCTION pgGDMODES()
  5722.  
  5723.  
  5724. PARAMETERS     None.
  5725.  
  5726.  
  5727. RETURN         The number of resolution modes for the currently loaded device
  5728.                driver.
  5729.  
  5730.  
  5731. SEE ALSO       pgGetDevMaxX, pgGetDevMaxY, pgGetDevResX, pgGetDevResY,
  5732.                pgGetDevColors, pgGetDevPlanes, pgLoadDevInfo
  5733.  
  5734.  
  5735. EXAMPLES       Load the HP PaintJet device driver and determine how many
  5736.                resolution modes are available.
  5737.  
  5738.                C         int nmodes, ierr;
  5739.                          ierr = pgLoadDevInfo( "HPPJET" );
  5740.                          nmodes = pgGetDevModes();
  5741.  
  5742.                Pascal    var
  5743.                          nmodes, ierr : integer;
  5744.                          ierr := pgLoadDevInfo( 'HPPJET' );
  5745.                          nmodes := pgGetDevModes;
  5746.  
  5747.                Basic     ierr% = pgLoadDevInfo( "HPPJET" )
  5748.                          nmodes% = pgGetDevModes%
  5749.  
  5750.                Fortran   integer*2 nmodes, ierr
  5751.                          ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
  5752.                          nmodes = pgGetDevModes
  5753.  
  5754.                Clipper   ierr = pgLDINFO( "HPPJET" )
  5755.                          nmodes = pgGDMODES()
  5756.  
  5757.  
  5758.                             *********************
  5759.                             ** pgGetDevOffsetX **
  5760.                             *********************
  5761.  
  5762.  
  5763. DESCRIPTION    Most printers enforce a slight left and top margin to prevent
  5764.                you from writing at the very edge of the paper.  The
  5765.                pgGetDevOffsetX function returns the left margin offset for the
  5766.                current device driver.  You must first install the device driver
  5767.                of interest with the pgLoadDevInfo function.
  5768.  
  5769.  
  5770. SYNTAX         C         int pgGetDevOffsetX( void );
  5771.  
  5772.                Pascal    FUNCTION pgGetDevOffsetX : integer;
  5773.  
  5774.                Basic     FUNCTION pgGetDevOffsetX%
  5775.  
  5776.                Fortran   INTEGER*2 FUNCTION pgGetDevOffsetX
  5777.  
  5778.                Clipper   FUNCTION pgGDOFFX()
  5779.  
  5780.  
  5781. PARAMETERS     None.
  5782.  
  5783.  
  5784. RETURN         The left margin offset based on the scale of 100=1" (i.e.,
  5785.                25=0.25", 59=0.59", etc.).
  5786.  
  5787.  
  5788. SEE ALSO       pgGetDevOffsetY, pgLoadDevInfo
  5789.  
  5790.  
  5791. EXAMPLES       Load the 'HPLJET' device driver and get the x and y offsets.
  5792.  
  5793.                C         int offx, offy, ierr;
  5794.                          ierr = pgLoadDevInfo( "HPLJET" );
  5795.                          offx = pgGetDevOffsetX();
  5796.                          offy = pgGetDevOffsetY();
  5797.  
  5798.                Pascal    var
  5799.                          offx, offy, ierr : integer;
  5800.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5801.                          offx := pgGetDevOffsetX;
  5802.                          offy := pgGetDevOffsetY;
  5803.  
  5804.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  5805.                          offx% = pgGetDevOffsetX%
  5806.                          offy% = pgGetDevOffsetY%
  5807.  
  5808.                Fortran   integer*2 offx, offy, ierr
  5809.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5810.                          offx = pgGetDevOffsetX
  5811.                          offy = pgGetDevOffsetY
  5812.  
  5813.                Clipper   ierr = pgLDINFO( "HPLJET" )
  5814.                          offx = pgGDOFFX()
  5815.                          offy = pgGDOFFY()
  5816.  
  5817.  
  5818.                             *********************
  5819.                             ** pgGetDevOffsetY **
  5820.                             *********************
  5821.  
  5822.  
  5823. DESCRIPTION    Most printers enforce a slight left and top margin to prevent
  5824.                you from writing at the very edge of the paper.  The
  5825.                pgGetDevOffsetY function returns the top margin offset for the
  5826.                current device driver.  You must first install the device driver
  5827.                of interest with the pgLoadDevInfo function.
  5828.  
  5829.  
  5830. SYNTAX         C         int pgGetDevOffsetY( void );
  5831.  
  5832.                Pascal    FUNCTION pgGetDevOffsetY : integer;
  5833.  
  5834.                Basic     FUNCTION pgGetDevOffsetY%
  5835.  
  5836.                Fortran   INTEGER*2 FUNCTION pgGetDevOffsetY
  5837.  
  5838.                Clipper   FUNCTION pgGDOFFY()
  5839.  
  5840.  
  5841. PARAMETERS     None.
  5842.  
  5843.  
  5844. RETURN         The top margin offset based on the scale of 100=1" (i.e.,
  5845.                25=0.25", 59=0.59", etc.).
  5846.  
  5847.  
  5848. SEE ALSO       pgGetDevOffsetX, pgLoadDevInfo
  5849.  
  5850.  
  5851. EXAMPLES       Load the 'HPLJET' device driver and get the x and y offsets.
  5852.  
  5853.                C         int offx, offy, ierr;
  5854.                          ierr = pgLoadDevInfo( "HPLJET" );
  5855.                          offx = pgGetDevOffsetX();
  5856.                          offy = pgGetDevOffsetY();
  5857.  
  5858.                Pascal    var
  5859.                          offx, offy, ierr : integer;
  5860.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5861.                          offx := pgGetDevOffsetX;
  5862.                          offy := pgGetDevOffsetY;
  5863.  
  5864.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  5865.                          offx% = pgGetDevOffsetX%
  5866.                          offy% = pgGetDevOffsetY%
  5867.  
  5868.                Fortran   integer*2 offx, offy, ierr
  5869.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5870.                          offx = pgGetDevOffsetX
  5871.                          offy = pgGetDevOffsetY
  5872.  
  5873.                Clipper   ierr = pgLDINFO( "HPLJET" )
  5874.                          offx = pgGDOFFX()
  5875.                          offy = pgGDOFFY()
  5876.  
  5877.  
  5878.                              ********************
  5879.                              ** pgGetDevPlanes **
  5880.                              ********************
  5881.  
  5882.  
  5883. DESCRIPTION    The pgGetDevPlanes function returns the number of bitplanes
  5884.                created by the driver when printing to the currently installed
  5885.                printer at the specified resolution.  The device driver must
  5886.                first be installed by calling pgLoadDevInfo.  The maximum
  5887.                number of resolution modes may be obtained by calling the
  5888.                pgGetDevModes function.
  5889.  
  5890.  
  5891. SYNTAX         C         int pgGetDevPlanes( int res );
  5892.  
  5893.                Pascal    FUNCTION pgGetDevPlanes( res:integer ) : integer;
  5894.  
  5895.                Basic     FUNCTION pgGetDevPlanes%( res% )
  5896.  
  5897.                Fortran   INTEGER*2 FUNCTION pgGetDevPlanes( res )
  5898.                          INTEGER*2 res
  5899.  
  5900.                Clipper   FUNCTION pgGDPLANES( res )
  5901.  
  5902.  
  5903. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  5904.  
  5905.  
  5906. RETURN         The number of bitplanes.
  5907.  
  5908.  
  5909. SEE ALSO       pgGetDevModes, pgLoadDevInfo
  5910.  
  5911.  
  5912. EXAMPLES       Load the HP PaintJet device driver and determine how many
  5913.                bitplanes are available at resolution mode 2.
  5914.  
  5915.                C         int nplanes, ierr;
  5916.                          ierr = pgLoadDevInfo( "HPPJET" );
  5917.                          nplanes = pgGetDevPlanes( 2 );
  5918.  
  5919.                Pascal    var
  5920.                          nplanes, ierr : integer;
  5921.                          ierr := pgLoadDevInfo( 'HPPJET' );
  5922.                          nplanes := pgGetDevPlanes( 2 );
  5923.  
  5924.                Basic     ierr% = pgLoadDevInfo%( "HPPJET" )
  5925.                          nplanes% = pgGetDevPlanes%( 2 )
  5926.  
  5927.                Fortran   integer*2 nplanes, ierr
  5928.                          ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
  5929.                          nplanes = pgGetDevPlanes( 2 )
  5930.  
  5931.                Clipper   ierr = pgLDINFO( "HPPJET" )
  5932.                          nplanes = pgGDPLANES( 2 )
  5933.  
  5934.  
  5935.                               ******************
  5936.                               ** pgGetDevResX **
  5937.                               ******************
  5938.  
  5939.  
  5940. DESCRIPTION    The pgGetDevResX function returns the device resolution as the
  5941.                number of dpi (dots per inch) in the x-direction for the
  5942.                specified resolution mode of the current device driver.  The
  5943.                device driver must first be installed by calling pgLoadDevInfo.
  5944.                The maximum number of resolution modes may be obtained by
  5945.                calling the pgGetDevModes function.
  5946.  
  5947.                The dpi resolution is only a function of the resolution mode
  5948.                and is not affected by the page margins, size, and layout.
  5949.  
  5950.                The dpi resolution is a measure of the number of pixel dots
  5951.                there are in an inch.  Therefore, this information is used to
  5952.                determine the aspect ratio of the output device.  For example,
  5953.                if the width:height dpi resolution is 240:72, this means that a
  5954.                rectangle 240 pixels wide by 72 pixels high will print as a
  5955.                square 1" by 1".
  5956.  
  5957.  
  5958. SYNTAX         C         int pgGetDevResX( int res );
  5959.  
  5960.                Pascal    FUNCTION pgGetDevResX( res:integer ) : integer;
  5961.  
  5962.                Basic     FUNCTION pgGetDevResX%( res% )
  5963.  
  5964.                Fortran   INTEGER*2 FUNCTION pgGetDevResX( res )
  5965.                          INTEGER*2 res
  5966.  
  5967.                Clipper   FUNCTION pgGDRESX( res )
  5968.  
  5969.  
  5970. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  5971.  
  5972.  
  5973. RETURN         The dpi (dots per inch) resolution in the x-direction.
  5974.  
  5975.  
  5976. SEE ALSO       pgGetDevModes, pgGetDevResY, pgLoadDevInfo
  5977.  
  5978.  
  5979. EXAMPLES       Load the 'HPLJET' device driver and get the x and y dpi
  5980.                resolution for resolution mode 2.
  5981.  
  5982.                C         int resx, resy, ierr;
  5983.                          ierr = pgLoadDevInfo( "HPLJET" );
  5984.                          resx = pgGetDevResX( 2 );
  5985.                          resy = pgGetDevResY( 2 );
  5986.  
  5987.                Pascal    var
  5988.                          resx, resy, ierr : integer;
  5989.                          ierr := pgLoadDevInfo( 'HPLJET' );
  5990.                          resx := pgGetDevResX( 2 );
  5991.                          resy := pgGetDevResY( 2 );
  5992.  
  5993.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  5994.                          resx% = pgGetDevResX%( 2 )
  5995.                          resy% = pgGetDevResY%( 2 )
  5996.  
  5997.                Fortran   integer*2 resx, resy, ierr
  5998.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  5999.                          resx = pgGetDevResX( 2 )
  6000.                          resy = pgGetDevResY( 2 )
  6001.  
  6002.                Clipper   ierr = pgLDINFO( "HPLJET" )
  6003.                          resx = pgGDRESX( 2 )
  6004.                          resy = pgGDRESY( 2 )
  6005.  
  6006.  
  6007.                               ******************
  6008.                               ** pgGetDevResY **
  6009.                               ******************
  6010.  
  6011.  
  6012. DESCRIPTION    The pgGetDevResY function returns the device resolution as the
  6013.                number of dpi (dots per inch) in the y-direction for the
  6014.                specified resolution mode of the current device driver.  The
  6015.                device driver must first be installed by calling pgLoadDevInfo.
  6016.                The maximum number of resolution modes may be obtained by
  6017.                calling the pgGetDevModes function.
  6018.  
  6019.                The dpi resolution is only a function of the resolution mode and
  6020.                is not affected by the page margins, size, and layout.
  6021.  
  6022.                The dpi resolution is a measure of the number of pixel dots
  6023.                there are in an inch.  Therefore, this information is used to
  6024.                determine the aspect ratio of the output device.  For example,
  6025.                if the width:height dpi resolution is 240:72, this means that a
  6026.                rectangle 240 pixels wide by 72 pixels high will print as a
  6027.                square 1" by 1".
  6028.  
  6029.  
  6030. SYNTAX         C         int pgGetDevResY( int res );
  6031.  
  6032.                Pascal    FUNCTION pgGetDevResY( res:integer ) : integer;
  6033.  
  6034.                Basic     FUNCTION pgGetDevResY%( res% )
  6035.  
  6036.                Fortran   INTEGER*2 FUNCTION pgGetDevResY( res )
  6037.                          INTEGER*2 res
  6038.  
  6039.                Clipper   FUNCTION pgGDRESY( res )
  6040.  
  6041.  
  6042. PARAMETERS     res       Printer resolution mode (0, 1, 2, or 3).
  6043.  
  6044.  
  6045. RETURN         The dpi (dots per inch) resolution in the y-direction.
  6046.  
  6047.  
  6048. SEE ALSO       pgGetDevModes, pgGetDevResX, pgLoadDevInfo
  6049.  
  6050.  
  6051. EXAMPLES       Load the 'HPLJET' device driver and get the x and y dpi
  6052.                resolution for resolution mode 2.
  6053.  
  6054.                C         int resx, resy, ierr;
  6055.                          ierr = pgLoadDevInfo( "HPLJET" );
  6056.                          resx = pgGetDevResX( 2 );
  6057.                          resy = pgGetDevResY( 2 );
  6058.  
  6059.                Pascal    var
  6060.                          resx, resy, ierr : integer;
  6061.                          ierr := pgLoadDevInfo( 'HPLJET' );
  6062.                          resx := pgGetDevResX( 2 );
  6063.                          resy := pgGetDevResY( 2 );
  6064.  
  6065.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  6066.                          resx% = pgGetDevResX%( 2 )
  6067.                          resy% = pgGetDevResY%( 2 )
  6068.  
  6069.                Fortran   integer*2 resx, resy, ierr
  6070.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  6071.                          resx = pgGetDevResX( 2 )
  6072.                          resy = pgGetDevResY( 2 )
  6073.  
  6074.                Clipper   ierr = pgLDINFO( "HPLJET" )
  6075.                          resx = pgGDRESX( 2 )
  6076.                          resy = pgGDRESY( 2 )
  6077.  
  6078.  
  6079.                               ******************
  6080.                               ** pgGetDevType **
  6081.                               ******************
  6082.  
  6083.  
  6084. DESCRIPTION    The pgGetDevType function returns the type of printer device
  6085.                for the currently loaded device driver.  A device driver must
  6086.                first be installed by calling pgLoadDevInfo.
  6087.  
  6088.  
  6089. SYNTAX         C         int pgGetDevType( void );
  6090.  
  6091.                Pascal    FUNCTION pgGetDevType : integer;
  6092.  
  6093.                Basic     FUNCTION pgGetDevType%
  6094.  
  6095.                Fortran   INTEGER*2 FUNCTION pgGetDevType
  6096.  
  6097.                Clipper   FUNCTION pgGDTYPE()
  6098.  
  6099.  
  6100. PARAMETERS     None.
  6101.  
  6102.  
  6103. RETURN         Returns a value from 0-3 indicating the type of device.
  6104.  
  6105.                Value     Device Type
  6106.  
  6107.                  0       Dot matrix printer device.
  6108.                  1       LaserJet, DeskJet, PaintJet printer device.
  6109.                  2       PCX file format device driver.
  6110.                  3       Encapsulated PostScript file format device driver.
  6111.  
  6112.  
  6113. SEE ALSO       pgLoadDevInfo
  6114.  
  6115.  
  6116. EXAMPLES       Load the Epson FX device driver and determine the type of
  6117.                printer it is.
  6118.  
  6119.                C         int ptype, ierr;
  6120.                          ierr = pgLoadDevInfo( "EPFX" );
  6121.                          ptype = pgGetDevType();
  6122.  
  6123.                Pascal    var
  6124.                          ptype, ierr : integer;
  6125.                          ierr := pgLoadDevInfo%( 'EPFX' );
  6126.                          ptype := pgGetDevType;
  6127.  
  6128.                Basic     ierr% = pgLoadDevInfo( "EPFX" )
  6129.                          ptype% = pgGetDevType%
  6130.  
  6131.                Fortran   integer*2 ptype, ierr
  6132.                          ierr = pgLoadDevInfo( 'EPFX'//char(0) )
  6133.                          ptype = pgGetDevType
  6134.  
  6135.                Clipper   ierr = pgLDINFO( "EPFX" )
  6136.                          ptype = pgGDTYPE()
  6137.  
  6138.  
  6139.                              *******************
  6140.                              ** pgGetDevWidth **
  6141.                              *******************
  6142.  
  6143.  
  6144. DESCRIPTION    The pgGetDevWidth function returns the paper width for the
  6145.                currently loaded device driver.  You must first load a device
  6146.                driver with the pgLoadDevInfo function.
  6147.  
  6148.  
  6149. SYNTAX         C         int pgGetDevWidth( void );
  6150.  
  6151.                Pascal    FUNCTION pgGetDevWidth : integer;
  6152.  
  6153.                Basic     FUNCTION pgGetDevWidth%
  6154.  
  6155.                Fortran   INTEGER*2 FUNCTION pgGetDevWidth
  6156.  
  6157.                Clipper   FUNCTION pgGDWIDTH()
  6158.  
  6159.  
  6160. PARAMETERS     None.
  6161.  
  6162.  
  6163. RETURN         The paper width in units of 100=1"
  6164.                (e.g., 850=8.5", 1100=11.0" ).
  6165.  
  6166.  
  6167. SEE ALSO       pgGetDevHeight, pgLoadDevInfo
  6168.  
  6169.  
  6170. EXAMPLES       Load the 'HPLJET' device driver and get the width and height of
  6171.                the paper.
  6172.  
  6173.                C         int width, height, ierr;
  6174.                          ierr = pgLoadDevInfo( "HPLJET" );
  6175.                          width = pgGetDevWidth();
  6176.                          height = pgGetDevHeight();
  6177.  
  6178.                Pascal    var
  6179.                          width, height, ierr : integer;
  6180.                          ierr := pgLoadDevInfo( 'HPLJET' );
  6181.                          width := pgGetDevWidth;
  6182.                          height := pgGetDevHeight;
  6183.  
  6184.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  6185.                          width% = pgGetDevWidth%
  6186.                          height% = pgGetDevHeight%
  6187.  
  6188.                Fortran   integer*2 width, height, ierr
  6189.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  6190.                          width = pgGetDevWidth
  6191.                          height = pgGetDevHeight
  6192.  
  6193.                Clipper   ierr = pgLDINFO( "HPLJET" )
  6194.                          width = pgGDWIDTH()
  6195.                          height = pgGDHEIGHT()
  6196.  
  6197.  
  6198.                              *******************
  6199.                              ** pgGetFillMode **
  6200.                              *******************
  6201.  
  6202.  
  6203. DESCRIPTION    The pgGetFillMode function returns the current fill mode as
  6204.                either 0 (transparent) or 1 (opaque).
  6205.  
  6206.  
  6207. SYNTAX         C         int pgGetFillMode( void );
  6208.  
  6209.                Pascal    FUNCTION pgGetFillMode : integer;
  6210.  
  6211.                Basic     FUNCTION pgGetFillMode%
  6212.  
  6213.                Fortran   INTEGER*2 FUNCTION pgGetFillMode
  6214.  
  6215.                Clipper   FUNCTION pgGFMODE()
  6216.  
  6217.  
  6218. PARAMETERS     None.
  6219.  
  6220.  
  6221. RETURN         The current fill mode flag
  6222.  
  6223.                Predefined fill mode flags may be specified using one of the
  6224.                following manifest constants:
  6225.  
  6226.                Constant       Value     Description
  6227.  
  6228.                pgTRANS          0       Transparent fill (does not
  6229.                                         clear the fill region before
  6230.                                         filling).
  6231.                pgOPAQ           1       Opaque fill (clears the fill
  6232.                                         region before filling).
  6233.  
  6234.  
  6235. SEE ALSO       pgGetFillPattern, pgGetFillStyle, pgSetFillMode,
  6236.                pgSetFillPattern, pgSetFillStyle
  6237.  
  6238.  
  6239. EXAMPLES       Get the current fill mode, set the fill mode to be transparent
  6240.                and draw two overlapping circles using different fill patterns,
  6241.                then restore the fill mode.
  6242.  
  6243.                C         int mode;
  6244.                          mode = pgGetFillMode();
  6245.                          pgSetFillMode( pgTRANS );
  6246.                          pgSetFillStyle( pgFLTSLASH, 2 );
  6247.                          pgCircle( 400, 400, 300, pgOFILL );
  6248.                          pgSetFillStyle( pgFLTBKSLASH, 2 );
  6249.                          pgCircle( 600, 400, 300, pgOFILL );
  6250.                          pgSetFillMode( mode );
  6251.  
  6252.                Pascal    var
  6253.                          mode : integer;
  6254.                          mode := pgGetFillMode;
  6255.                          pgSetFillMode( pgTRANS );
  6256.                          pgSetFillStyle( pgFLTSLASH, 2 );
  6257.                          pgCircle( 400, 400, 300, pgOFILL );
  6258.                          pgSetFillStyle( pgFLTBKSLASH, 2 );
  6259.                          pgCircle( 600, 400, 300, pgOFILL );
  6260.                          pgSetFillMode( mode );
  6261.  
  6262.                Basic     mode% = pgGetFillMode%
  6263.                          call pgSetFillMode( pgTRANS )
  6264.                          call pgSetFillStyle( pgFLTSLASH, 2 )
  6265.                          call pgCircle( 400, 400, 300, pgOFILL )
  6266.                          call pgSetFillStyle( pgFLTBKSLASH, 2 )
  6267.                          call pgCircle( 600, 400, 300, pgOFILL )
  6268.                          call pgSetFillMode( mode% )
  6269.  
  6270.                Fortran   integer*2 mode
  6271.                          mode = pgGetFillMode
  6272.                          call pgSetFillMode( pgTRANS )
  6273.                          call pgSetFillStyle( pgFLTSLASH, 2 )
  6274.                          call pgCircle( 400, 400, 300, pgOFILL )
  6275.                          call pgSetFillStyle( pgFLTBKSLASH, 2 )
  6276.                          call pgCircle( 600, 400, 300, pgOFILL )
  6277.                          call pgSetFillMode( mode )
  6278.  
  6279.                Clipper   mode = pgGFMODE()
  6280.                          pgSFMODE( pgTRANS )
  6281.                          pgSFSTYLE( pgFLTSLASH, 2 )
  6282.                          pgCIR( 400, 400, 300, pgOFILL )
  6283.                          pgSFSTYLE( pgFLTBKSLASH, 2 )
  6284.                          pgCIR( 600, 400, 300, pgOFILL )
  6285.                          pgSFMODE( mode )
  6286.  
  6287.  
  6288.                             **********************
  6289.                             ** pgGetFillPattern **
  6290.                             **********************
  6291.  
  6292.  
  6293. DESCRIPTION    The pgGetFillPattern function returns the current fill color
  6294.                and the 8x8 array of bits that define the current fill pattern
  6295.                set with the pgSetFillPattern function.
  6296.  
  6297.                The fill pattern is an 8x8 array of bits.  Each bit represents
  6298.                a pixel.  A 1 bit sets the corresponding pixel to the current
  6299.                fill color.  In pgTRANS mode a 0 bit leaves the pixel unchanged
  6300.                while in pgOPAQ mode, a 0 bit sets the pixel to the color of
  6301.                the paper.
  6302.  
  6303.                The pgGetFillPattern function always returns the current fill
  6304.                pattern regardless of whether pgSetFillStyle or pgSetFillPattern
  6305.                was called last.
  6306.  
  6307.  
  6308. SYNTAX         C         void pgGetFillPattern( char far *fpat,
  6309.                               int far *color );
  6310.  
  6311.                Pascal    PROCEDURE pgGetFillPattern( var fpat;
  6312.                               var color:integer );
  6313.  
  6314.                Basic     SUB pgGetFillPattern( SEG fpat%, SEG color% )
  6315.  
  6316.                Fortran   SUBROUTINE pgGetFillPattern( fpat, color )
  6317.                          CHARACTER*1 fpat(8)
  6318.                          INTEGER*2 color
  6319.  
  6320.                Clipper   PROCEDURE pgGFPAT( <ref>fpat, <ref>color )
  6321.  
  6322.  
  6323. PARAMETERS     fpat      Current fill pattern array.
  6324.                color     Current fill color.
  6325.  
  6326.  
  6327. RETURN         None.
  6328.  
  6329.  
  6330. SEE ALSO       pgGetFillMode, pgGetFillStyle, pgSetFillMode, pgSetFillPattern,
  6331.                pgSetFillStyle
  6332.  
  6333.  
  6334. EXAMPLES       Get the current fill pattern.
  6335.  
  6336.                C         char pat[8];
  6337.                          int color;
  6338.                          pgGetFillPattern( &pat, &color );
  6339.  
  6340.                Pascal    var
  6341.                          pat : array [0..7] of byte;
  6342.                          color : integer;
  6343.                          pgGetFillPattern( pat, color );
  6344.  
  6345.                Basic     DIM pat%(3), color%
  6346.                          call pgGetFillPattern( pat%(0), color% )
  6347.  
  6348.                Fortran   character*1 pat(8)
  6349.                          integer*2 color
  6350.                          call pgGetFillPattern( pat, color )
  6351.  
  6352.                Clipper   public pat, color
  6353.                          pat = space(8)
  6354.                          pgGFPAT( @pat, @color )
  6355.  
  6356.  
  6357.                              ********************
  6358.                              ** pgGetFillStyle **
  6359.                              ********************
  6360.  
  6361.  
  6362. DESCRIPTION    The pgGetFillStyle function returns the current fill style
  6363.                number and fill color set with the pgSetFillStyle function.
  6364.                The default fill style is pgFSOLID.  The default fill color is
  6365.                color index 1.
  6366.  
  6367.                The returned color will always be the current fill color,
  6368.                however, you should be aware that the returned style may not
  6369.                agree with the current fill pattern.  This will occur if you
  6370.                called pgSetFillPattern after calling pgSetFillStyle.  You
  6371.                should use the pgGetFillPattern to return the current fill
  6372.                pattern.
  6373.  
  6374.  
  6375. SYNTAX         C         void pgGetFillStyle( int far *style, int far *color );
  6376.  
  6377.                Pascal    PROCEDURE pgGetFillStyle( var style, color:integer );
  6378.  
  6379.                Basic     SUB pgGetFillStyle( SEG style%, SEG color% )
  6380.  
  6381.                Fortran   SUBROUTINE pgGetFillStyle( style, color )
  6382.                          INTEGER*2 style, color
  6383.  
  6384.                Clipper   PROCEDURE pgGFSTYLE( <ref>style, <ref>color )
  6385.  
  6386.  
  6387. PARAMETERS     style     Current fill style number.
  6388.                color     Current fill color.
  6389.  
  6390.                Predefined fill patterns are one of the following values:
  6391.  
  6392.                Constant       ValueDescription
  6393.  
  6394.                pgFEMPTY         0  Fill with background color
  6395.                pgFSOLID         1  Solid fill with current fill color
  6396.                pgFLINE          2  Fill with line (---)
  6397.                pgFLTSLASH       3  Fill with /// normal width lines
  6398.                pgFSLASH         4  Fill with /// thick lines
  6399.                pgFBKSLASH       5  Fill with \\\ thick lines
  6400.                pgFLTBKSLASH     6  Fill with \\\ normal width lines
  6401.                pgFHATCH         7  Light hatch fill
  6402.                pgFXHATCH        8  Heavy cross hatch fill
  6403.                pgFINTERLEAVE    9  Interleaving line fill
  6404.                pgFWIDEDOT      10  Fill with widely spaced dots
  6405.                pgFCLOSEDOT     11  Fill with closely spaced dots
  6406.  
  6407.  
  6408. RETURN         None.
  6409.  
  6410.  
  6411. SEE ALSO       pgGetFillMode, pgGetFillPattern, pgSetFillMode,
  6412.                pgSetFillPattern, pgSetFillStyle
  6413.  
  6414.  
  6415. EXAMPLES       Get the current fill style and color, set a different fill
  6416.                style and color and draw a circle, then restore the original
  6417.                fill style and color.
  6418.  
  6419.                C         int fstyle, fcolor;
  6420.                          pgGetFillStyle( &fstyle, &fcolor );
  6421.                          pgSetFillStyle( pgFINTERLEAVE, 1 );
  6422.                          pgCircle( 500, 500, 200, pgFILL );
  6423.                          pgSetFillStyle( fstyle, fcolor );
  6424.  
  6425.                Pascal    var
  6426.                          fstyle, fcolor : integer;
  6427.                          pgGetFillStyle( fstyle, fcolor );
  6428.                          pgSetFillStyle( pgFINTERLEAVE, 1 );
  6429.                          pgCircle( 500, 500, 200, pgFILL );
  6430.                          pgSetFillStyle( fstyle, fcolor );
  6431.  
  6432.                Basic     call pgGetFillStyle( fstyle%, fcolor% )
  6433.                          call pgSetFillStyle( pgFINTERLEAVE, 1 )
  6434.                          call pgCircle( 500, 500, 200, pgFILL )
  6435.                          call pgSetFillStyle( fstyle%, fcolor% )
  6436.  
  6437.                Fortran   integer*2 fstyle, fcolor
  6438.                          call pgGetFillStyle( fstyle, fcolor )
  6439.                          call pgSetFillStyle( pgFINTERLEAVE, 1 )
  6440.                          call pgCircle( 500, 500, 200, pgFILL )
  6441.                          call pgSetFillStyle( fstyle, fcolor )
  6442.  
  6443.                Clipper   pgGFSTYLE( @fstyle, @fcolor )
  6444.                          pgSFSTYLE( pgFINTERLEAVE, 1 )
  6445.                          pgCIR( 500, 500, 200, pgFILL )
  6446.                          pgSFSTYLE( fstyle, fcolor )
  6447.  
  6448.  
  6449.                             **********************
  6450.                             ** pgGetLinePattern **
  6451.                             **********************
  6452.  
  6453.  
  6454. DESCRIPTION    The pgGetLinePattern function returns the current mask and
  6455.                thickness used for line drawing.  The mask argument is a 16-bit
  6456.                array, where each bit represents a pixel in the line being
  6457.                drawn.  If a bit is 1, the corresponding pixel is set to the
  6458.                color of the line (the current color).  If a bit is 0, the
  6459.                corresponding pixel is left unchanged.  The template is repeated
  6460.                for the entire length of the line.  The default mask is hex
  6461.                FFFF.
  6462.  
  6463.  
  6464. SYNTAX         C         void pgGetLinePattern( int far *mask,
  6465.                               int far *thickness );
  6466.  
  6467.                Pascal    PROCEDURE pgGetLinePattern( var mask,
  6468.                               thickness:integer );
  6469.  
  6470.                Basic     SUB pgGetLinePattern( SEG mask%, SEG thickness% )
  6471.  
  6472.                Fortran   SUBROUTINE pgGetLinePattern( mask, thickness )
  6473.                          INTEGER*2 mask, thickness
  6474.  
  6475.                Clipper   PROCEDURE pgGLPAT( <ref>mask, <ref>thickness )
  6476.  
  6477.  
  6478. PARAMETERS     mask      Line style mask.
  6479.                thickness Pixel width for line thickness.
  6480.  
  6481.  
  6482. RETURN         None.
  6483.  
  6484.  
  6485. SEE ALSO       pgGetLineWeight, pgSetLinePattern, pgSetLineWeight
  6486.  
  6487.  
  6488. EXAMPLES       Get the current line pattern and thickness.
  6489.  
  6490.                C         int lpat, thickness;
  6491.                          pgGetLinePattern( &lpat, &thickness );
  6492.  
  6493.                Pascal    var
  6494.                          lpat, thickness: integer;
  6495.                          pgGetLinePattern( lpat, thickness );
  6496.  
  6497.                Basic     call pgGetLinePattern( lpat%, thickness% )
  6498.  
  6499.                Fortran   integer*2 lpat, thickness
  6500.                          call pgGetLinePattern( lpat, thickness )
  6501.  
  6502.                Clipper   public lpat, thickness
  6503.                          pgGLPAT( @lpat, @thickness )
  6504.  
  6505.  
  6506.                              ********************
  6507.                              ** pgGetLineStyle **
  6508.                              ********************
  6509.  
  6510.  
  6511. DESCRIPTION    The pgGetLineStyle function returns the current line style
  6512.                number and line thickness value previously set with the
  6513.                pgSetLineStyle function.  The default line style is pgLSOLID.
  6514.                The default line thickness is 1.
  6515.  
  6516.                The returned thickness will always be the current line
  6517.                thickness, however, you should be aware that the returned style
  6518.                may not agree with the current line pattern.  This will occur
  6519.                if you called pgSetLinePattern after calling pgSetLineStyle.
  6520.                You should use the pgGetLinePattern to return the current line
  6521.                pattern.
  6522.  
  6523.  
  6524. SYNTAX         C         void pgGetLineStyle( int far *lstyle,
  6525.                               int far *thickness );
  6526.  
  6527.                Pascal    PROCEDURE pgGetLineStyle( var lstyle,
  6528.                               thickness:integer );
  6529.  
  6530.                Basic     SUB pgGetLineStyle( SEG lstyle%, SEG thickness% )
  6531.  
  6532.                Fortran   SUBROUTINE pgGetLineStyle( lstyle, thickness )
  6533.                          INTEGER*2 lstyle, thickness
  6534.  
  6535.                Clipper   PROCEDURE pgGLSTYLE( <ref>lstyle, <ref>thickness )
  6536.  
  6537.  
  6538. PARAMETERS     lstyle    Code specifying a predefined line style.
  6539.                thickness Thickness of lines in pixels.
  6540.  
  6541.  
  6542.                Predefined line styles may be specified using one of the
  6543.                following manifest constants:
  6544.  
  6545.                Constant       ValueDescription
  6546.  
  6547.                pgLSOLID       0    Solid line.
  6548.                pgLHUGEDASH    1    Huge dash line.
  6549.                pgLBIGDASH     2    Big dash line.
  6550.                pgLMEDDASH     3    Medium dash line.
  6551.                pgLSMALLDASH   4    Small dash line.
  6552.                pgLWIDEDOT     5    Wide dot line.
  6553.                pgLCLOSEDOT    6    Close dot line.
  6554.                pgLDASHDOT     7    Dash dot line.
  6555.                pgLCENTER      8    Center line.
  6556.  
  6557.  
  6558. RETURN         None.
  6559.  
  6560.  
  6561. SEE ALSO       pgGetLinePattern, pgGetLineWeight, pgSetLinePattern,
  6562.                pgSetLineStyle, pgSetLineWeight
  6563.  
  6564.  
  6565. EXAMPLES       Get the current line style and thickness.
  6566.  
  6567.                C         int lstyle, lthickness;
  6568.                          pgGetLineStyle( &lstyle, <hickness );
  6569.  
  6570.                Pascal    var
  6571.                          lstyle, lthickness : integer;
  6572.                          pgGetLineStyle( lstyle, lthickness );
  6573.  
  6574.                Basic     call pgGetLineStyle( lstyle%, lthickness% )
  6575.  
  6576.                Fortran   integer*2 lstyle, lthickness
  6577.                          call pgGetLineStyle( lstyle, lthickness )
  6578.  
  6579.                Clipper   pgGLSTYLE( @lstyle, @lthickness )
  6580.  
  6581.  
  6582.                             *********************
  6583.                             ** pgGetLineWeight **
  6584.                             *********************
  6585.  
  6586.  
  6587. DESCRIPTION    The pgGetLineWeight function returns the current weighting
  6588.                factor for line drawing.  The weighting factor represents the
  6589.                number of thousandsths of an inch for the line width.  For
  6590.                example, 1=0.001", 6=0.006", etc.  The actual line width is
  6591.                rounded off somewhat due to your printer's resolution.
  6592.  
  6593.  
  6594. SYNTAX         C         int pgGetLineWeight( void );
  6595.  
  6596.                Pascal    FUNCTION pgGetLineWeight : integer;
  6597.  
  6598.                Basic     FUNCTION pgGetLineWeight%
  6599.  
  6600.                Fortran   INTEGER*2 FUNCTION pgGetLineWeight
  6601.  
  6602.                Clipper   FUNCTION pgGLWGT()
  6603.  
  6604.  
  6605. PARAMETERS     None.
  6606.  
  6607.  
  6608. RETURN         The current line weight.
  6609.  
  6610.  
  6611. SEE ALSO       pgGetLineStyle, pgGetLinePattern, pgSetLinePattern,
  6612.                pgSetLineStyle, pgSetLineWeight
  6613.  
  6614.  
  6615. EXAMPLES       Get the current line weight.
  6616.  
  6617.                C         printf( "LineWeight = %d", pgGetLineWeight() );
  6618.  
  6619.                Pascal    WriteLn( 'LineWeight = ', pgGetLineWeight );
  6620.  
  6621.                Basic     print "LineWeight = ", pgGetLineWeight%
  6622.  
  6623.                Fortran   print *, 'LineWeight = ', pgGetLineWeight
  6624.  
  6625.                Clipper   ? "LineWeight = ", pgGLWGT()
  6626.  
  6627.  
  6628.                                ***************
  6629.                                ** pgGetMaxX **
  6630.                                ***************
  6631.  
  6632.  
  6633. DESCRIPTION    The pgGetMaxX function returns the maximum x-coordinate of the
  6634.                virtual resolution.
  6635.  
  6636.  
  6637. SYNTAX         C         int pgGetMaxX( void );
  6638.  
  6639.                Pascal    FUNCTION pgGetMaxX : integer;
  6640.  
  6641.                Basic     FUNCTION pgGetMaxX%
  6642.  
  6643.                Fortran   INTEGER*2 FUNCTION pgGetMaxX
  6644.  
  6645.                Clipper   FUNCTION pgGMAXX()
  6646.  
  6647.  
  6648. PARAMETERS     None.
  6649.  
  6650.  
  6651. RETURN         The maximum x-coordinate of the virtual resolution.
  6652.  
  6653.  
  6654. SEE ALSO       pgGetMaxY, pgInitDrw
  6655.  
  6656.  
  6657. EXAMPLES       Get the maximum x coordinate.
  6658.  
  6659.                C         printf( " max X = %d", pgGetMaxX() );
  6660.  
  6661.                Pascal    Writeln( ' max X = ', pgGetMaxX );
  6662.  
  6663.                Basic     print " max X = ", pgGetMaxX%
  6664.  
  6665.                Fortran   print *, ' max X = ', pgGetMaxX
  6666.  
  6667.                Clipper   ? " max X = ", pgGMAXX()
  6668.  
  6669.  
  6670.                                ***************
  6671.                                ** pgGetMaxY **
  6672.                                ***************
  6673.  
  6674.  
  6675. DESCRIPTION    The pgGetMaxY function returns the maximum y-coordinate of the
  6676.                virtual resolution.
  6677.  
  6678.  
  6679. SYNTAX         C         int pgGetMaxY( void );
  6680.  
  6681.                Pascal    FUNCTION pgGetMaxY : integer;
  6682.  
  6683.                Basic     FUNCTION pgGetMaxY%
  6684.  
  6685.                Fortran   INTEGER*2 FUNCTION pgGetMaxY
  6686.  
  6687.                Clipper   FUNCTION pgGMAXY()
  6688.  
  6689.  
  6690. PARAMETERS     None.
  6691.  
  6692.  
  6693. RETURN         The maximum y-coordinate of the virtual resolution.
  6694.  
  6695.  
  6696. SEE ALSO       pgGetMaxX, pgInitDrw
  6697.  
  6698.  
  6699. EXAMPLES       Get the maximum y coordinate.
  6700.  
  6701.                C         printf( " max Y = %d",pgGetMaxY() );
  6702.  
  6703.                Pascal    Writeln( ' max Y = ', pgGetMaxY );
  6704.  
  6705.                Basic     print " max Y = ", pgGetMaxY%
  6706.  
  6707.                Fortran   print *, ' max Y = ', pgGetMaxY
  6708.  
  6709.                Clipper   ? " max Y = ", pgGetMaxY()
  6710.  
  6711.  
  6712.                               *****************
  6713.                               ** pgGetStatus **
  6714.                               *****************
  6715.  
  6716.  
  6717. DESCRIPTION    The pgGetStatus function returns a non-zero value if a disk or
  6718.                file I/O error occurred while writing graphics commands to the
  6719.                drawing file.  After the function is called, the internal error
  6720.                flag is automatically cleared.  This command flushes the
  6721.                internal PGL output buffer.
  6722.  
  6723.  
  6724. SYNTAX         C         int pgGetStatus( void );
  6725.  
  6726.                Pascal    FUNCTION pgGetStatus : integer;
  6727.  
  6728.                Basic     FUNCTION pgGetStatus%
  6729.  
  6730.                Fortran   INTEGER*2 FUNCTION pgGetStatus
  6731.  
  6732.                Clipper   FUNCTION pgSTATUS()
  6733.  
  6734.  
  6735. PARAMETERS     None.
  6736.  
  6737.  
  6738. RETURN         A return value of zero indicates there were no I/O error.  A
  6739.                non-zero value indicates a file I/O error while writing the PGL
  6740.                buffer to disk.
  6741.  
  6742.  
  6743. SEE ALSO       None.
  6744.  
  6745.  
  6746. EXAMPLES       Check the PGL error status.
  6747.  
  6748.                C         int ierr;
  6749.                          pgSetColor(2);
  6750.                          ierr = pgGetStatus();
  6751.                          if( ierr ) printf( "I/O ERROR" );
  6752.  
  6753.                Pascal    var
  6754.                          ierr : integer;
  6755.                          pgSetColor(2);
  6756.                          ierr := pgGetStatus;
  6757.                          if( ierr <> 0 ) writeln( 'I/O ERROR' );
  6758.  
  6759.                Basic     call pgSetColor(2)
  6760.                          ierr% = pgGetStatus%
  6761.                          if ierr% <> 0 print "I/O ERROR"
  6762.  
  6763.                Fortran   integer*2 ierr
  6764.                          call pgSetColor(2)
  6765.                          ierr = pgGetStatus
  6766.                          if( ierr .ne. 0 ) print *, 'I/O ERROR'
  6767.  
  6768.                Clipper   pgSCOLOR(2)
  6769.                          ierr = pgSTATUS()
  6770.                          if( ierr <> 0 ) ? "I/O ERROR"
  6771.  
  6772.  
  6773.                             **********************
  6774.                             ** pgGetTextBolding **
  6775.                             **********************
  6776.  
  6777.  
  6778. DESCRIPTION    The pgGetTextBolding function returns the current text bolding
  6779.                parameter.  The default level of bolding is 1.
  6780.  
  6781.  
  6782. SYNTAX         C         int pgGetTextBolding( void );
  6783.  
  6784.                Pascal    FUNCTION pgGetTextBolding : integer;
  6785.  
  6786.                Basic     FUNCTION pgGetTextBolding%
  6787.  
  6788.                Fortran   INTEGER*2 FUNCTION pgGetTextBolding
  6789.  
  6790.                Clipper   FUNCTION pgGTBOLD()
  6791.  
  6792.  
  6793. PARAMETERS     None.
  6794.  
  6795.  
  6796. RETURN         The current text bolding parameter.
  6797.  
  6798.  
  6799. SEE ALSO       pgSetTextBolding
  6800.  
  6801.  
  6802. EXAMPLES       Set text bolding to five times the current value, then display
  6803.                the text "Bold Text".
  6804.  
  6805.                C         pgSetTextStyle( pgTRIPLEX );
  6806.                          pgSetTextBolding( 5 * pgGetTextBolding() );
  6807.                          pgDrawTextXY( 100, 100, "Bold Text" );
  6808.  
  6809.                Pascal    pgSetTextStyle( pgTRIPLEX );
  6810.                          pgSetTextBolding( 5 * pgGetTextBolding );
  6811.                          pgDrawTextXY( 100, 100, 'Bold Text' );
  6812.  
  6813.  
  6814.                Basic     call pgSetTextStyle( pgTRIPLEX )
  6815.                          call pgSetTextBolding( 5 * pgGetTextBolding% )
  6816.                          call pgDrawTextXY( 100, 100, "Bold Text" )
  6817.  
  6818.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  6819.                          call pgSetTextBolding( 5 * pgGetTextBolding )
  6820.                          call pgDrawTextXY( 100, 100, 'Bold Text'//char(0) )
  6821.  
  6822.                Clipper   pgSTSTYLE( pgTRIPLEX )
  6823.                          pgSTBOLD( 5 * pgGTBOLD() )
  6824.                          pgDTXY( 100, 100, "Bold Text" )
  6825.  
  6826.  
  6827.                             *********************
  6828.                             ** pgGetTextHeight **
  6829.                             *********************
  6830.  
  6831.  
  6832. DESCRIPTION    The pgGetTextHeight function returns the maximum height of the
  6833.                current font style based on the current text size scale factors.
  6834.                The height is returned in pixel units.  When printing on
  6835.                PostScript printers using PGL2PS, this function can only return
  6836.                an approximate length.  You may need to adjust your text
  6837.                positioning to account for this.
  6838.  
  6839.  
  6840. SYNTAX         C         int pgGetTextHeight( void );
  6841.  
  6842.                Pascal    FUNCTION pgGetTextHeight : integer;
  6843.  
  6844.                Basic     FUNCTION pgGetTextHeight%
  6845.  
  6846.                Fortran   INTEGER*2 FUNCTION pgGetTextHeight
  6847.  
  6848.                Clipper   FUNCTION pgGTHGT()
  6849.  
  6850.  
  6851. PARAMETERS     None.
  6852.  
  6853.  
  6854. RETURN         The maximum height of the current font style.
  6855.  
  6856.  
  6857. SEE ALSO       pgGetTextLength, pgSetTextScaling
  6858.  
  6859.  
  6860. EXAMPLES       Draw a rectangle 500 pixels wide by 200 pixels high, then use
  6861.                the pgGetTextHeight and pgGetTextLength functions to determine
  6862.                the proper scale factors to fit the text string "Hello World"
  6863.                inside the rectangle.
  6864.  
  6865.                C         int height, length;
  6866.                          pgRectangle( 100, 100, 600, 300, pgOUTLINE );
  6867.                          pgSetTextStyle( pgTRIPLEX );
  6868.                          pgSetTextScaling( 1, 1, 1, 1 );
  6869.                          length = pgGetTextLength( "Hello World" );
  6870.                          height = pgGetTextHeight();
  6871.                          pgSetTextScaling( 500, length, 200, height );
  6872.                          pgDrawTextXY( 100, 100, "Hello World" );
  6873.  
  6874.                Pascal    var
  6875.                          height, length : integer;
  6876.                          pgRectangle( 100, 100, 600, 300, pgOUTLINE );
  6877.                          pgSetTextStyle( pgTRIPLEX );
  6878.                          pgSetTextScaling( 1, 1, 1, 1 );
  6879.                          length := pgGetTextLength( 'Hello World' );
  6880.                          height := pgGetTextHeight;
  6881.                          pgSetTextScaling( 500, length, 200, height );
  6882.                          pgDrawTextXY( 100, 100, 'Hello World' );
  6883.  
  6884.                Basic     call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
  6885.                          call pgSetTextStyle( pgTRIPLEX )
  6886.                          call pgSetTextScaling( 1, 1, 1, 1 )
  6887.                          length% = pgGetTextLength%( "Hello World" )
  6888.                          height% = pgGetTextHeight%
  6889.                          call pgSetTextScaling( 500, length%, 200, height% )
  6890.                          call pgDrawTextXY( 100, 100, "Hello World" )
  6891.  
  6892.                Fortran   integer*2 height, length
  6893.                          call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
  6894.                          call pgSetTextStyle( pgTRIPLEX )
  6895.                          call pgSetTextScaling( 1, 1, 1, 1 )
  6896.                          length = pgGetTextLength( 'Hello World'//char(0) )
  6897.                          height = pgGetTextHeight
  6898.                          call pgSetTextScaling( 500, length, 200, height )
  6899.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  6900.  
  6901.                Clipper   pgRECT( 100, 100, 600, 300, pgOUTLINE )
  6902.                          pgSTSTYLE( pgTRIPLEX )
  6903.                          pgSTSCALE( 1, 1, 1, 1 )
  6904.                          length = pgGTLEN( "Hello World" )
  6905.                          height = pgGTHGT()
  6906.                          pgSTSCALE( 500, length, 200, height )
  6907.                          pgDTXY( 100, 100, "Hello World" )
  6908.  
  6909.  
  6910.                             **********************
  6911.                             ** pgGetTextJustify **
  6912.                             **********************
  6913.  
  6914.  
  6915. DESCRIPTION    The pgGetTextJustify function returns the current horizontal
  6916.                and vertical justification parameters for displaying text
  6917.                strings.  Text justification is relative to the current cursor
  6918.                position when using pgDrawText and relative to the specified
  6919.                text position passed to the pgDrawTextXY function.
  6920.  
  6921.                The default justification is (pgLEFT, pgBOTTOM).
  6922.  
  6923.  
  6924. SYNTAX         C         void pgGetTextJustify( int far *hor, int far *vert );
  6925.  
  6926.                Pascal    PROCEDURE pgGetTextJustify( var hor, vert:integer );
  6927.  
  6928.                Basic     SUB pgGetTextJustify( SEG hor%, SEG vert% )
  6929.  
  6930.                Fortran   SUBROUTINE pgGetTextJustify( hor, vert )
  6931.                          INTEGER*2 hor, vert
  6932.  
  6933.                Clipper   PROCEDURE pgGTJUST( <ref>hor, <ref>vert )
  6934.  
  6935.  
  6936. PARAMETERS     hor       Specifies horizontal justification of text.
  6937.                vert      Specifies vertical justification of text.
  6938.  
  6939.  
  6940.                Valid text justification manifest constants are as follows:
  6941.  
  6942.                Constant       Value     Description
  6943.  
  6944.                pgLEFT           0       Left justified
  6945.                pgRIGHT          2       Right justified
  6946.                pgCENTER         1       Center justified
  6947.                pgTOP            2       Top justified
  6948.                pgBOTTOM         0       Bottom justified
  6949.  
  6950.  
  6951. RETURN         None.
  6952.  
  6953.  
  6954. SEE ALSO       pgDrawText, pgDrawTextXY, pgSetTextJustify
  6955.  
  6956.  
  6957. EXAMPLES       Determine the current text justification.  If horizontal
  6958.                justification is not currently set to be center justified, then
  6959.                make it so.
  6960.  
  6961.                C         int horiz, vert;
  6962.                          pgGetTextJustify( &horiz, &vert );
  6963.                          if( horiz != 1) pgSetTextJustify( pgCENTER, vert );
  6964.  
  6965.                Pascal    var
  6966.                          horiz, vert : integer;
  6967.                          pgGetTextJustify( horiz, vert );
  6968.                          if( horiz <> 1 ) pgSetTextJustify( pgCENTER, vert );
  6969.  
  6970.                Basic     call pgGetTextJustify( horiz%, vert% )
  6971.                          if horiz% <> 1 pgSetTextJustify( pgCENTER, vert% )
  6972.  
  6973.                Fortran   integer*2 horiz, vert
  6974.                          call pgGetTextJustify( horiz, vert )
  6975.                          if( horiz.ne.1 ) call pgSetTextJustify(pgCENTER,vert)
  6976.  
  6977.                Clipper   pgGTJUST( @horiz, @vert )
  6978.                          if horiz <> 1  pgSTJUST( pgCENTER, vert )
  6979.  
  6980.  
  6981.                             *********************
  6982.                             ** pgGetTextLength **
  6983.                             *********************
  6984.  
  6985.  
  6986. DESCRIPTION    The pgGetTextLength function returns the length of the specified
  6987.                text string in pixel units based on the current font style,
  6988.                current text size scale factors, and character spacing.  When
  6989.                printing on PostScript printers using PGL2PS, this function can
  6990.                only return an approximate length.  You may need to adjust your
  6991.                text positioning to account for this.
  6992.  
  6993.  
  6994. SYNTAX         C         int pgGetTextLength( char far *str );
  6995.  
  6996.                Pascal    FUNCTION pgGetTextLength( str:string ) : integer;
  6997.  
  6998.                Basic     FUNCTION pgGetTextLength%( SEG str$ )
  6999.  
  7000.                Fortran   INTEGER*2 FUNCTION pgGetTextLength( str )
  7001.                          CHARACTER*(*) str
  7002.  
  7003.                Clipper   FUNCTION pgGTLEN( <expC>str )
  7004.  
  7005.  
  7006. PARAMETERS     str       Text string whose length is desired.
  7007.  
  7008.  
  7009. RETURN         The length of the specified text string.
  7010.  
  7011.  
  7012. SEE ALSO       pgGetTextHeight, pgSetCharSpacing, pgSetTextScaling
  7013.  
  7014.  
  7015. EXAMPLES       Draw a rectangle 500 pixels wide by 200 pixels high, then use
  7016.                the pgGetTextHeight and pgGetTextLength functions to determine
  7017.                the proper scale factors to fit the text string "Hello World"
  7018.                inside the rectangle.
  7019.  
  7020.                C         int height, length;
  7021.                          pgRectangle( 100, 100, 600, 300, pgOUTLINE );
  7022.                          pgSetTextStyle( pgTRIPLEX );
  7023.                          pgSetTextScaling( 1, 1, 1, 1 );
  7024.                          length = pgGetTextLength( "Hello World" );
  7025.                          height = pgGetTextHeight();
  7026.                          pgSetTextScaling( 500, length, 200, height );
  7027.                          pgDrawTextXY( 100, 100, "Hello World" );
  7028.  
  7029.                Pascal    var
  7030.                          height, length : integer;
  7031.                          pgRectangle( 100, 100, 600, 300, pgOUTLINE );
  7032.                          pgSetTextStyle( pgTRIPLEX );
  7033.                          pgSetTextScaling( 1, 1, 1, 1 );
  7034.                          length := pgGetTextLength( 'Hello World' );
  7035.                          height := pgGetTextHeight;
  7036.                          pgSetTextScaling( 500, length, 200, height );
  7037.                          pgDrawTextXY( 100, 100, 'Hello World' );
  7038.  
  7039.                Basic     call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
  7040.                          call pgSetTextStyle( pgTRIPLEX )
  7041.                          call pgSetTextScaling( 1, 1, 1, 1 )
  7042.                          length% = pgGetTextLength%( "Hello World" )
  7043.                          height% = pgGetTextHeight%
  7044.                          call pgSetTextScaling( 500, length%, 200, height% )
  7045.                          call pgDrawTextXY( 100, 100, "Hello World" )
  7046.  
  7047.                Fortran   integer*2 height, length
  7048.                          call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
  7049.                          call pgSetTextStyle( pgTRIPLEX )
  7050.                          call pgSetTextScaling( 1, 1, 1, 1 )
  7051.                          length = pgGetTextLength( 'Hello World'//char(0) )
  7052.                          height = pgGetTextHeight
  7053.                          call pgSetTextScaling( 500, length, 200, height )
  7054.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  7055.  
  7056.                Clipper   pgRECT( 100, 100, 600, 300, pgOUTLINE )
  7057.                          pgSTSTYLE( pgTRIPLEX )
  7058.                          pgSTSCALE( 1, 1, 1, 1 )
  7059.                          length = pgGTLEN( "Hello World" )
  7060.                          height = pgGTHGT()
  7061.                          pgSTSCALE( 500, length, 200, height )
  7062.                          pgDTXY( 100, 100, "Hello World" )
  7063.  
  7064.  
  7065.                             *********************
  7066.                             ** pgGetTextOrient **
  7067.                             *********************
  7068.  
  7069.  
  7070. DESCRIPTION    The pgGetTextOrient function returns the current orientation
  7071.                vector indicating the direction of text display.  The default
  7072.                orientation is (1,0).
  7073.  
  7074.  
  7075. SYNTAX         C         void pgGetTextOrient( int far *x, int far *y );
  7076.  
  7077.                Pascal    PROCEDURE pgGetTextOrient( var x, y:integer );
  7078.  
  7079.                Basic     SUB pgGetTextOrient( SEG x%, SEG y% )
  7080.  
  7081.                Fortran   SUBROUTINE pgGetTextOrient( x, y )
  7082.                          INTEGER*2 x, y
  7083.  
  7084.                Clipper   PROCEDURE pgGTORIEN( <ref>x, <ref>y )
  7085.  
  7086.  
  7087. PARAMETERS     x,y       Vector specifying the text orientation.
  7088.  
  7089.  
  7090.                Currently, only four text orientations are allowed.  These are
  7091.                summarized as follows:
  7092.  
  7093.                (x, y)    Description
  7094.  
  7095.                ( 1, 0)  Text displayed horizontally from left to right
  7096.                ( 0, 1)  Text displayed vertically from bottom to top
  7097.                (-1, 0)  Text displayed horizontally from right to left
  7098.                         (inverted)
  7099.                ( 0,-1)  Text displayed vertically from top to bottom
  7100.  
  7101.  
  7102. RETURN         None.
  7103.  
  7104.  
  7105. SEE ALSO       pgDrawText, pgDrawTextXY, pgSetTextOrient
  7106.  
  7107.  
  7108. EXAMPLES       Get the current text orientation and print it to the screen.
  7109.  
  7110.                C         int xdir, ydir;
  7111.                          pgGetTextOrient( &xdir, &ydir );
  7112.                          printf( "x orientation = %d\n", xdir );
  7113.                          printf( "y orientation = %d\n", ydir );
  7114.  
  7115.                Pascal    var
  7116.                          xdir, ydir : integer;
  7117.                          pgGetTextOrient( xdir, ydir );
  7118.                          writeln( 'x orientation = ', xdir );
  7119.                          writeln( 'y orientation = ', ydir );
  7120.  
  7121.                Basic     call pgGetTextOrient( xdir%, ydir% );
  7122.                          print "x orientation = ", xdir%
  7123.                          print "y orientation = ", ydir%
  7124.  
  7125.                Fortran   integer*2 xdir, ydir
  7126.                          call pgGetTextOrient( xdir, ydir )
  7127.                          print *, 'x orientation = ', xdir
  7128.                          print *, 'y orientation = ', ydir
  7129.  
  7130.                Clipper   pgGTORIEN( @xdir, @ydir )
  7131.                          ? "x orientation = ", xdir
  7132.                          ? "y orientation = ", ydir
  7133.  
  7134.  
  7135.                             **********************
  7136.                             ** pgGetTextScaling **
  7137.                             **********************
  7138.  
  7139.  
  7140. DESCRIPTION    The pgGetTextScaling function returns the current horizontal
  7141.                and vertical scale factors used for displaying text strings.
  7142.  
  7143.                The horizontal scale factor is computed as (mx/dx) and is always
  7144.                applied to the direction in which text is drawn, regardless of
  7145.                whether it is displayed horizontally or vertically.  The
  7146.                vertical scale factor is computed as (my/dy) and is always
  7147.                applied to the direction perpendicular to the direction in
  7148.                which the text is drawn.
  7149.  
  7150.                The default scale factors are 1:1 for both directions.
  7151.  
  7152.  
  7153. SYNTAX         C         void pgGetTextScaling( int far *mx, int far *dx,
  7154.                               int far *my, int far *dy );
  7155.  
  7156.                Pascal    PROCEDURE pgGetTextScaling( var mx, dx,
  7157.                               my, dy:integer );
  7158.  
  7159.                Basic     SUB pgGetTextScaling( SEG mx%, SEG dx%,
  7160.                               SEG my%, SEG dy% )
  7161.  
  7162.                Fortran   SUBROUTINE pgGetTextScaling( mx, dx, my, dy )
  7163.                          INTEGER*2 mx, dx, my, dy
  7164.  
  7165.                Clipper   PROCEDURE pgGTSCALE( <ref>mx, <ref>dx,
  7166.                               <ref>my, <ref>dy )
  7167.  
  7168.  
  7169. PARAMETERS     mx,dx     Horizontal scale factor.
  7170.                my,dy     Vertical scale factor.
  7171.  
  7172.  
  7173. RETURN         None.
  7174.  
  7175.  
  7176. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
  7177.                pgSetTextScaling
  7178.  
  7179.  
  7180. EXAMPLES       Set the vertical text scale factor to be twice the current
  7181.                horizontal scale factor, then display the text string "Hello
  7182.                World".
  7183.  
  7184.                C         int mx, dx, my, dy;
  7185.                          pgGetTextScaling( &mx, &dx, &my, &dy );
  7186.                          pgSetTextScaling( mx, dx, 2*my, dy );
  7187.                          pgDrawTextXY( 100, 100, "Hello World" );
  7188.  
  7189.                Pascal    var
  7190.                          mx, dx, my, dy : integer;
  7191.                          pgGetTextScaling( mx, dx, my, dy );
  7192.                          pgSetTextScaling( mx, dx, 2*my, dy );
  7193.                          pgDrawTextXY( 100, 100, 'Hello World' );
  7194.  
  7195.                Basic     call pgGetTextScaling( mx%, dx%, my%, dy% )
  7196.                          call pgSetTextScaling( mx%, dx%, 2*my%, dy% )
  7197.                          call pgDrawTextXY( 100, 100, "Hello World" )
  7198.  
  7199.                Fortran   integer*2 mx, dx, my, dy
  7200.                          call pgGetTextScaling( mx, dx, my, dy )
  7201.                          call pgSetTextScaling( mx, dx, 2*my, dy )
  7202.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  7203.  
  7204.                Clipper   pgGTSCALE( @mx, @dx, @my, @dy )
  7205.                          pgSTSCALE( mx, dx, 2*my, dy )
  7206.                          pgDTXY( 100, 100, "Hello World" )
  7207.  
  7208.  
  7209.                              ********************
  7210.                              ** pgGetTextStyle **
  7211.                              ********************
  7212.  
  7213.  
  7214. DESCRIPTION    The pgGetTextStyle function returns the current font set being
  7215.                used for displaying text.
  7216.  
  7217.  
  7218. SYNTAX         C         int pgGetTextStyle( void );
  7219.  
  7220.                Pascal    FUNCTION pgGetTextStyle : integer;
  7221.  
  7222.                Basic     FUNCTION pgGetTextStyle%
  7223.  
  7224.                Fortran   INTEGER*2 FUNCTION pgGetTextStyle
  7225.  
  7226.                Clipper   FUNCTION pgGTSTYLE()
  7227.  
  7228.  
  7229. PARAMETERS     None.
  7230.  
  7231.  
  7232. RETURN         Current font style.
  7233.  
  7234.                There are currently seven font sets which may be selected.  The
  7235.                font is selected by specifying one of the manifest constants
  7236.                (or its value) listed below:
  7237.  
  7238.                Constant  Value   Description     File Name
  7239.  
  7240.                pgSMALL     0     Small           SMALL.FNT
  7241.                pgSIMPLEX   1     Simplex         SIMPLEX.FNT
  7242.                pgDUPLEX    2     Duplex          DUPLEX.FNT
  7243.                pgTRIPLEX   3     Triplex         TRIPLEX.FNT
  7244.                pgGOTHIC    4     Gothic          GOTHIC.FNT
  7245.                pgSCRIPT    5     Script          SCRIPT.FNT
  7246.                pgSDUPLEX   6     Script Duplex   SDUP.FNT
  7247.  
  7248.  
  7249. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
  7250.                pgSetTextStyle
  7251.  
  7252.  
  7253. EXAMPLES       Determine the current text style.  If it is not style 3, then
  7254.                set it to TRIPLEX font.
  7255.  
  7256.                C         int tstyle;
  7257.                          tstyle = pgGetTextStyle();
  7258.                          if( tstyle != pgTRIPLEX ) pgSetTextStyle( pgTRIPLEX );
  7259.  
  7260.                Pascal    var
  7261.                          tstyle : integer;
  7262.                          tstyle := pgGetTextStyle;
  7263.                          if( tstyle <> pgTRIPLEX ) pgSetTextStyle( pgTRIPLEX );
  7264.  
  7265.                Basic     tstyle% = pgGetTextStyle%
  7266.                          if tstyle% <> pgTRIPLEX call pgSetTextStyle(pgTRIPLEX)
  7267.  
  7268.                Fortran   integer*2 tstyle
  7269.                          tstyle = pgGetTextStyle
  7270.                          if( tstyle .ne. pgTRIPLEX ) pgSetTextStyle(pgTRIPLEX)
  7271.  
  7272.                Clipper   tstyle = pgGTSTYLE()
  7273.                          if tstyle <> pgTRIPLEX pgSTSTYLE( pgTRIPLEX )
  7274.  
  7275.  
  7276.                              *******************
  7277.                              ** pgGetViewPort **
  7278.                              *******************
  7279.  
  7280.  
  7281. DESCRIPTION    The pgGetViewPort function returns the rectangular region on
  7282.                the page specified for displaying graphics by a previous call
  7283.                to pgSetViewPort.  The viewport coordinate origin is defined to
  7284.                be the upper-left hand corner of the viewport.  The coordinates
  7285.                are returned in terms of absolute virtual coordinates.
  7286.  
  7287.  
  7288. SYNTAX         C         void pgGetViewPort( int far *x1, int far *y1,
  7289.                               int far *x2, int far *y2 );
  7290.  
  7291.                Pascal    PROCEDURE pgGetViewPort( var x1, y1,
  7292.                               x2, y2:integer );
  7293.  
  7294.                Basic     SUB pgGetViewPort( SEG x1%, SEG y1%,
  7295.                               SEG x2%, SEG y2% )
  7296.  
  7297.                Fortran   SUBROUTINE pgGetViewPort( x1, y1, x2, y2 )
  7298.                          INTEGER*2 x1, y1, x2, y2
  7299.  
  7300.                Clipper   PROCEDURE pgGVIEWP( <ref>x1, <ref>y1,
  7301.                               <ref>x2, <ref>y2 )
  7302.  
  7303.  
  7304. PARAMETERS     x1,y1     Upper-left corner of viewport.
  7305.                x2,y2     Lower-right corner of viewport.
  7306.  
  7307.  
  7308. RETURN         None.
  7309.  
  7310.  
  7311. SEE ALSO       pgGetClipArea, pgSetClipArea, pgSetClipping, pgSetViewPort
  7312.  
  7313.  
  7314. EXAMPLES       Use the pgGetViewPort and pgSetViewPort functions to fill the
  7315.                current viewport with a pattern, erase a rectangular portion of
  7316.                the fill region leaving a border 20 pixels wide by setting a
  7317.                new viewport and clearing it with the pgClearViewPort function,
  7318.                then restore the viewport to the original size.
  7319.  
  7320.                C         int x1, y1, x2, y2;
  7321.                          pgGetViewPort( &x1, &y1, &x2, &y2 );
  7322.                          pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
  7323.                          pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
  7324.                          pgClearViewPort();
  7325.                          pgSetViewPort( x1, y1, x2, y2 );
  7326.  
  7327.                Pascal    var
  7328.                          x1, y1, x2, y2 : integer;
  7329.                          pgGetViewPort( x1, y1, x2, y2 );
  7330.                          pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
  7331.                          pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
  7332.                          pgClearViewPort;
  7333.                          pgSetViewPort( x1, y1, x2, y2 );
  7334.  
  7335.                Basic     call pgGetViewPort( x1%, y1%, x2%, y2% )
  7336.                          call pgRectangle( 0, 0, x2%-x1%, y2%-y1%, pgOFILL )
  7337.                          call pgSetViewPort( x1%+20, y1%+20, x2%-20, y2%-20 )
  7338.                          call pgClearViewPort
  7339.                          call pgSetViewPort( x1%, y1%, x2%, y2% )
  7340.  
  7341.                Fortran   integer*2 x1, y1, x2, y2
  7342.                          call pgGetViewPort( x1, y1, x2, y2 )
  7343.                          call pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL )
  7344.                          call pgSetViewPort( x1+20, y1+20, x2-20, y2-20 )
  7345.                          call pgClearViewPort
  7346.                          call pgSetViewPort( x1, y1, x2, y2 )
  7347.  
  7348.                Clipper   pgGVIEWP( @x1, @y1, @x2, @y2 )
  7349.                          pgRECT( 0, 0, x2-x1, y2-y1, pgOFILL )
  7350.                          pgSVIEWP( x1+20, y1+20, x2-20, y2-20 )
  7351.                          pgCVIEWP()
  7352.                          pgSVIEWP( left, top, right, bottom )
  7353.  
  7354.  
  7355.                                  ************
  7356.                                  ** pgGetX **
  7357.                                  ************
  7358.  
  7359.  
  7360. DESCRIPTION    The pgGetX function returns the current x-cursor position in
  7361.                the viewport coordinate system.
  7362.  
  7363.  
  7364. SYNTAX         C         int pgGetX( void );
  7365.  
  7366.                Pascal    FUNCTION pgGetX : integer;
  7367.  
  7368.                Basic     FUNCTION pgGetX%
  7369.  
  7370.                Fortran   INTEGER*2 FUNCTION pgGetX
  7371.  
  7372.                Clipper   FUNCTION pgGX()
  7373.  
  7374.  
  7375. PARAMETERS     None.
  7376.  
  7377.  
  7378. RETURN         The x-cursor position in terms of the currently defined
  7379.                viewport.
  7380.  
  7381.  
  7382. SEE ALSO       pgGetAbsX, pgGetAbsY, pgGetY, pgSetViewPort
  7383.  
  7384.  
  7385. EXAMPLES       Set a viewport, then move the cursor to an arbitrary location.
  7386.                Use the pgGetX and pgGetAbsX functions to return the location
  7387.                of the cursor relative to the viewport and relative to the
  7388.                absolute coordinates, respectively.
  7389.  
  7390.                C         pgSetViewPort( 300, 300, 900, 900 );
  7391.                          pgMoveTo( 100, 100 );
  7392.                          printf( "Viewport X coordinate = %d\n", pgGetX() );
  7393.                          printf( "Absolute X coordinate = %d\n", pgGetAbsX() );
  7394.  
  7395.                Pascal    pgSetViewPort( 300, 300, 900, 900 );
  7396.                          pgMoveTo( 100, 100 );
  7397.                          writeln( 'Viewport X coordinate = ', pgGetX );
  7398.                          writeln( 'Absolute X coordinate = ', pgGetAbsX );
  7399.  
  7400.                Basic     call pgSetViewPort( 300, 300, 900, 900 )
  7401.                          call pgMoveTo( 100, 100 )
  7402.                          print "Viewport X coordinate = ", pgGetX%
  7403.                          print "Absolute X coordinate = ", pgGetAbsX%
  7404.  
  7405.                Fortran   call pgSetViewPort( 300, 300, 900, 900 )
  7406.                          call pgMoveTo( 100, 100 )
  7407.                          print *, 'Viewport X coordinate = ', pgGetX
  7408.                          print *, 'Absolute X coordinate = ', pgGetAbsX
  7409.  
  7410.                Clipper   pgSetViewPort( 300, 300, 900, 900 )
  7411.                          pgMoveTo( 100, 100 )
  7412.                          ? "Viewport X coordinate = ", pgGX()
  7413.                          ? "Absolute X coordinate = ", pgGABSX()
  7414.  
  7415.  
  7416.                                  ************
  7417.                                  ** pgGetY **
  7418.                                  ************
  7419.  
  7420.  
  7421. DESCRIPTION    The pgGetY function returns the current y-cursor position in
  7422.                the viewport coordinate system.
  7423.  
  7424.  
  7425. SYNTAX         C         int pgGetY( void );
  7426.  
  7427.                Pascal    FUNCTION pgGetY : integer;
  7428.  
  7429.                Basic     FUNCTION pgGetY%
  7430.  
  7431.                Fortran   INTEGER*2 FUNCTION pgGetY
  7432.  
  7433.                Clipper   FUNCTION pgGY()
  7434.  
  7435.  
  7436. PARAMETERS     None.
  7437.  
  7438.  
  7439. RETURN         The y-cursor position in terms of the currently defined
  7440.                viewport.
  7441.  
  7442.  
  7443. SEE ALSO       pgGetAbsX, pgGetAbsY, pgGetX, pgSetViewPort
  7444.  
  7445.  
  7446. EXAMPLES       Set a viewport, then move the cursor to an arbitrary location.
  7447.                Use the pgGetY and pgGetAbsY functions to return the location
  7448.                of the cursor relative to the viewport and relative to the
  7449.                absolute coordinates, respectively.
  7450.  
  7451.                C         pgSetViewPort( 300, 300, 900, 900 );
  7452.                          pgMoveTo( 100, 100 );
  7453.                          printf( "Viewport Y coordinate = %d\n", pgGetY() );
  7454.                          printf( "Absolute Y coordinate = %d\n", pgGetAbsY() );
  7455.                Pascal    pgSetViewPort( 300, 300, 900, 900 );
  7456.                          pgMoveTo( 100, 100 );
  7457.                          writeln( 'Viewport Y coordinate = ', pgGetY );
  7458.                          writeln( 'Absolute Y coordinate = ', pgGetAbsY );
  7459.  
  7460.                Basic     call pgSetViewPort( 300, 300, 900, 900 )
  7461.                          call pgMoveTo( 100, 100 )
  7462.                          print "Viewport Y coordinate = ", pgGetY%
  7463.                          print "Absolute Y coordinate = ", pgGetAbsY%
  7464.  
  7465.                Fortran   call pgSetViewPort( 300, 300, 900, 900 )
  7466.                          call pgMoveTo( 100, 100 )
  7467.                          print *, 'Viewport Y coordinate = ', pgGetY
  7468.                          print *, 'Absolute Y coordinate = ', pgGetAbsY
  7469.  
  7470.                Clipper   pgSetViewPort( 300, 300, 900, 900 )
  7471.                          pgMoveTo( 100, 100 )
  7472.                          ? "Viewport Y coordinate = ", pgGY()
  7473.                          ? "Absolute Y coordinate = ", pgGABSY()
  7474.  
  7475.  
  7476.                                ***************
  7477.                                ** pgInitDrw **
  7478.                                ***************
  7479.  
  7480.  
  7481. DESCRIPTION    The pgInitDrw function opens a new drawing file named fname for
  7482.                storing graphics commands and sets the virtual drawing
  7483.                resolution to width by height pixels.  All PGL drawing
  7484.                parameters are initialized to their default values.
  7485.  
  7486.                If the drawing file was successfully opened, the ierr parameter
  7487.                will return a value of zero, otherwise, a failure occurred.
  7488.                Possible causes of error might be too many files already opened
  7489.                or the file was specified with an invalid path.
  7490.  
  7491.                PGL does not check if the specified file is an existing file.
  7492.                If you use pgInitDrw to open an existing file, its contents will
  7493.                be overwritten.
  7494.  
  7495.  
  7496. SYNTAX         C         void pgInitDrw( char far *fname, int width,
  7497.                               int height, int far *ierr );
  7498.  
  7499.                Pascal    PROCEDURE pgInitDrw( fname:string;
  7500.                               width, height:integer; var ierr:integer )
  7501.  
  7502.                Basic     SUB pgInitDrw(SEG fname$, width%, height%, SEG ierr%)
  7503.  
  7504.                Fortran   SUBROUTINE pgInitDrw( fname, width, height, ierr )
  7505.                          CHARACTER*(*) fname
  7506.                          INTEGER*2 width, height, ierr
  7507.  
  7508.                Clipper   PROCEDURE pgINIT( <expC>fname, width, height,
  7509.                               <ref>ierr )
  7510.  
  7511.  
  7512. PARAMETERS     fname     User specified name of a drawing file for storing
  7513.                          graphics commands.
  7514.                width     Pixel width of the virtual resolution for drawing.
  7515.                height    Pixel height of the virtual resolution for drawing.
  7516.                ierr      Returns a non-zero value if file fname could not be
  7517.                          opened.  Possible cause of error might be too many
  7518.                          files already opened or an invalid path specification.
  7519.  
  7520.  
  7521. RETURN         None.
  7522.  
  7523.  
  7524. SEE ALSO       pgEndDrw, pgOpenDrw
  7525.  
  7526.  
  7527. EXAMPLES       Open a new drawing file named TEST.PLT with a virtual
  7528.                resolution of 2000 x 2000, draw a circle, then close the drawing
  7529.                file.
  7530.  
  7531.                C         int ierr;
  7532.                          pgInitDrw( "TEST.PLT", 2000, 2000, &ierr );
  7533.                          pgCircle( 1000, 1000, 500, pgFILL );
  7534.                          pgEndDrw();
  7535.  
  7536.                Pascal    var
  7537.                          ierr : integer;
  7538.                          pgInitDrw( 'TEST.PLT', 2000, 2000, ierr );
  7539.                          pgCircle( 1000, 1000, 500, pgFILL );
  7540.                          pgEndDrw;
  7541.  
  7542.                Basic     call pgInitDrw( "TEST.PLT", 2000, 2000, ierr% )
  7543.                          call pgCircle( 1000, 1000, 500, pgFILL )
  7544.                          call pgEndDrw
  7545.  
  7546.                Fortran   integer*2 ierr
  7547.                          call pgInitDrw('TEST.PLT'//char(0), 2000, 2000, ierr)
  7548.                          call pgCircle( 1000, 1000, 500, pgFILL )
  7549.                          call pgEndDrw
  7550.  
  7551.                Clipper   pgINIT( "TEST.PLT", 2000, 2000, @ierr )
  7552.                          pgCIR( 1000, 1000, 500, pgFILL )
  7553.                          pgEND()
  7554.  
  7555.  
  7556.                                  ************
  7557.                                  ** pgLine **
  7558.                                  ************
  7559.  
  7560.  
  7561. DESCRIPTION    The pgLine function draws a line between two specified points
  7562.                using the current drawing color and line style.  The cursor
  7563.                position is not updated after drawing.
  7564.  
  7565.  
  7566. SYNTAX         C         void pgLine( int x1, int y1, int x2, int y2 );
  7567.  
  7568.                Pascal    PROCEDURE pgLine( x1, y1, x2, y2:integer );
  7569.  
  7570.                Basic     SUB pgLine( x1%, y1%, x2%, y2% )
  7571.  
  7572.                Fortran   SUBROUTINE pgLine( x1, y1, x2, y2 )
  7573.                          INTEGER*2 x1, y1, x2, y2
  7574.  
  7575.                Clipper   PROCEDURE pgLIN( x1, y1, x2, y2 )
  7576.  
  7577.  
  7578. PARAMETERS     x1,y1     Coordinate of point the line is drawn from.
  7579.                x2,y2     Coordinate of point the line is drawn to.
  7580.  
  7581.  
  7582. RETURN         None.
  7583.  
  7584.  
  7585. SEE ALSO       pgLineRel, pgLineTo, pgMoveRel, pgMoveTo
  7586.  
  7587.  
  7588. EXAMPLES       Draw a solid line of thickness 1 and a dashed line of thickness
  7589.                7.
  7590.  
  7591.                C         pgSetLineStyle( pgLSOLID, 1 );
  7592.                          pgLine( 100, 100, 900, 100 );
  7593.                          pgSetLineStyle( pgLBIGDASH, 7 );
  7594.                          pgLine( 100, 200, 900, 200 );
  7595.                Pascal    pgSetLineStyle( pgLSOLID, 1 );
  7596.                          pgLine( 100, 100, 900, 100 );
  7597.                          pgSetLineStyle( pgLBIGDASH, 7 );
  7598.                          pgLine( 100, 200, 900, 200 );
  7599.  
  7600.                Basic     call pgSetLineStyle( pgLSOLID, 1 )
  7601.                          call pgLine( 100, 100, 900, 100 )
  7602.                          call pgSetLineStyle( pgLBIGDASH, 7 )
  7603.                          call pgLine( 100, 200, 900, 200 )
  7604.  
  7605.                Fortran   call pgSetLineStyle( pgLSOLID, 1 )
  7606.                          call pgLine( 100, 100, 900, 100 )
  7607.                          call pgSetLineStyle( pgLBIGDASH, 7 )
  7608.                          call pgLine( 100, 200, 900, 200 )
  7609.  
  7610.                Clipper   pgSLSTYLE( pgLSOLID, 1 )
  7611.                          pgLIN( 100, 100, 900, 100 )
  7612.                          pgSLSTYLE( pgLBIGDASH, 7 )
  7613.                          pgLIN( 100, 200, 900, 200 )
  7614.  
  7615.  
  7616.                                ***************
  7617.                                ** pgLineRel **
  7618.                                ***************
  7619.  
  7620.  
  7621. DESCRIPTION    The pgLineRel function draws a line from the current (x,y)
  7622.                cursor position to a new position specified by an offset amount.
  7623.                The line is drawn using the current drawing color and line
  7624.                style.  The cursor position is updated to (x+dx, y+dy) after
  7625.                drawing.
  7626.  
  7627.  
  7628. SYNTAX         C         void pgLineRel( int dx, int dy );
  7629.  
  7630.                Pascal    PROCEDURE pgLineRel( dx, dy:integer );
  7631.  
  7632.                Basic     SUB pgLineRel( dx%, dy% )
  7633.  
  7634.                Fortran   SUBROUTINE pgLineRel( dx, dy )
  7635.                          INTEGER*2 dx, dy
  7636.  
  7637.                Clipper   PROCEDURE pgLINREL( dx, dy )
  7638.  
  7639.  
  7640. PARAMETERS     dx,dy     Amount of offset to add to the current position.  The
  7641.                          coordinate to draw to is given by (x+dx, y+dy).
  7642.  
  7643.  
  7644. RETURN         None.
  7645.  
  7646.  
  7647. SEE ALSO       pgLine, pgLineTo, pgMoveRel, pgMoveTo
  7648.  
  7649.  
  7650. EXAMPLES       Move to coordinate (500,500) and draw a rectangle using relative
  7651.                line draws.
  7652.  
  7653.                C         pgMoveTo( 500, 500 );
  7654.                          pgLineRel( 300, 0 );
  7655.                          pgLineRel( 0, 100 );
  7656.                          pgLineRel( -300, 0 );
  7657.                          pgLineRel( 0, -100 );
  7658.  
  7659.                Pascal    pgMoveTo( 500, 500 );
  7660.                          pgLineRel( 300, 0 );
  7661.                          pgLineRel( 0, 100 );
  7662.                          pgLineRel( -300, 0 );
  7663.                          pgLineRel( 0, -100 );
  7664.  
  7665.                Basic     call pgMoveTo( 500, 500 )
  7666.                          call pgLineRel( 300, 0 )
  7667.                          call pgLineRel( 0, 100 )
  7668.                          call pgLineRel( -300, 0 )
  7669.                          call pgLineRel( 0, -100 )
  7670.  
  7671.                Fortran   call pgMoveTo( 500, 500 )
  7672.                          call pgLineRel( 300, 0 )
  7673.                          call pgLineRel( 0, 100 )
  7674.                          call pgLineRel( -300, 0 )
  7675.                          call pgLineRel( 0, -100 )
  7676.  
  7677.                Clipper   pgMOVTO( 500, 500 )
  7678.                          pgLINREL( 300, 0 )
  7679.                          pgLINREL( 0, 100 )
  7680.                          pgLINREL( -300, 0 )
  7681.                          pgLINREL( 0, -100 )
  7682.  
  7683.  
  7684.                                 **************
  7685.                                 ** pgLineTo **
  7686.                                 **************
  7687.  
  7688.  
  7689. DESCRIPTION    The pgLineTo function draws a line from the current cursor
  7690.                position to a new position specified by the coordinate (x,y).
  7691.                The line is drawn using the current drawing color and line
  7692.                style.  The cursor position is updated after drawing.
  7693.  
  7694.  
  7695. SYNTAX         C         void pgLineTo( int x, int y );
  7696.  
  7697.                Pascal    PROCEDURE pgLineTo( x, y:integer );
  7698.  
  7699.                Basic     SUB pgLineTo( x%, y% )
  7700.  
  7701.                Fortran   SUBROUTINE pgLineTo( x, y )
  7702.                          INTEGER*2 x, y
  7703.  
  7704.                Clipper   PROCEDURE pgLINTO( x, y )
  7705.  
  7706.  
  7707. PARAMETERS     x,y       Coordinate of point to draw to.
  7708.  
  7709.  
  7710. RETURNS        None.
  7711.  
  7712.  
  7713. SEE ALSO       pgLine, pgLineRel, pgMoveRel, pgMoveTo
  7714.  
  7715.  
  7716. EXAMPLES       Move to coordinate (0,0) and draw a line to the coordinate
  7717.                (400,500).
  7718.  
  7719.                C         pgMoveTo( 0, 0 );
  7720.                          pgLineTo( 400, 500 );
  7721.  
  7722.                Pascal    pgMoveTo( 0, 0 );
  7723.                          pgLineTo( 400, 500 );
  7724.  
  7725.                Basic     call pgMoveTo( 0, 0 )
  7726.                          call pgLineTo( 400, 500 )
  7727.  
  7728.                Fortran   call pgMoveTo( 0, 0 )
  7729.                          call pgLineTo( 400, 500 )
  7730.  
  7731.                Clipper   pgMOVTO( 0, 0 )
  7732.                          pgLINTO( 400, 500 )
  7733.  
  7734.  
  7735.                              *******************
  7736.                              ** pgLoadDevInfo **
  7737.                              *******************
  7738.  
  7739.  
  7740. DESCRIPTION    Depending on your application, you may need to know certain
  7741.                information about the device you will be printing to.  The
  7742.                pgLoadDevInfo function loads the information about the
  7743.                specified device driver pertaining to the number of colors, bit
  7744.                planes, device type, paper dimensions, number of resolutions,
  7745.                etc.  The specified driver is not actually installed.
  7746.  
  7747.                Once the information about a particular device is loaded, you
  7748.                may change the page margins, size, and layout.  You may use the
  7749.                various device information functions to return information
  7750.                about the device for a particular print configuration.
  7751.  
  7752.  
  7753. SYNTAX         C         int pgLoadDevInfo( char far *dev );
  7754.  
  7755.                Pascal    FUNCTION pgLoadDevInfo( dev:string ) : integer;
  7756.  
  7757.                Basic     FUNCTION pgLoadDevInfo%( SEG dev$ )
  7758.  
  7759.                Fortran   INTEGER*2 FUNCTION pgLoadDevInfo( dev )
  7760.                          CHARACTER*(*) dev
  7761.  
  7762.                Clipper   FUNCTION pgLDINFO( <expC>dev )
  7763.  
  7764.  
  7765. PARAMETERS     dev       Name of the device driver (include path if driver is
  7766.                          not located in the local directory).  Refer to chapter
  7767.                          8 for a list of valid device driver names.
  7768.  
  7769.  
  7770. RETURN         A non-zero value will be returned if an error occurred in
  7771.                loading the device driver information.  Possible causes of
  7772.                error might be an incorrect device driver name, incorrect path,
  7773.                or too many files already opened.
  7774.  
  7775.  
  7776. SEE ALSO       pgGetDevColors, pgGetDevHeight, pgGetDevMaxX, pgGetDevMaxY,
  7777.                pgGetDevModes, pgGetDevOffsetX, pgGetDevOffsetY, pgGetDevPlanes,
  7778.                pgGetDevResX, pgGetDevResY, pgGetDevType, pgGetDevWidth,
  7779.                pgGetDevInfo, pgSetPageForm, pgSetPageMargins, pgSetPageSize
  7780.  
  7781.  
  7782. EXAMPLES       Load the 'HPLJET' device driver.
  7783.  
  7784.                C         int ierr;
  7785.                          ierr = pgLoadDevInfo( "HPLJET" );
  7786.                          if( ierr != 0 ) printf( "LOAD FAILURE" );
  7787.  
  7788.                Pascal    var
  7789.                          ierr : integer;
  7790.                          ierr := pgLoadDevInfo( 'HPLJET' );
  7791.                          if( ierr <> 0 ) writeln( 'LOAD ERROR' );
  7792.  
  7793.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  7794.                          if ierr% <> 0 print "LOAD ERROR"
  7795.  
  7796.                Fortran   integer*2 ierr
  7797.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  7798.                          if( ierr .ne. 0 ) print *, 'LOAD ERROR'
  7799.  
  7800.                Clipper   ierr = pgLDINFO( "HPLJET" )
  7801.                          if ierr <> 0  ? "LOAD ERROR"
  7802.  
  7803.  
  7804.                                ***************
  7805.                                ** pgMoveRel **
  7806.                                ***************
  7807.  
  7808.  
  7809. DESCRIPTION    The pgMoveRel function moves the cursor from the current (x,y)
  7810.                cursor position to a new position specified by an offset amount.
  7811.                The cursor position is updated to (x+dx,y+dy).
  7812.  
  7813.  
  7814. SYNTAX         C         void pgMoveRel( int dx, int dy );
  7815.  
  7816.                Pascal    PROCEDURE pgMoveRel( dx, dy:integer );
  7817.  
  7818.                Basic     SUB pgMoveRel( dx%, dy% )
  7819.  
  7820.                Fortran   SUBROUTINE pgMoveRel( dx, dy )
  7821.                          INTEGER*2 dx, dy
  7822.  
  7823.                Clipper   PROCEDURE pgMOVREL( dx, dy )
  7824.  
  7825.  
  7826. PARAMETERS     dx,dy     Amount of offset to add to the current position.  The
  7827.                          coordinate to move to is given by (x+dx, y+dy).
  7828.  
  7829.  
  7830. RETURN         None.
  7831.  
  7832.  
  7833. SEE ALSO       pgLine, pgLineRel, pgLineTo, pgMoveTo
  7834.  
  7835.  
  7836. EXAMPLES       Move the cursor 100 pixels to the right and 50 pixels down from
  7837.                the current position, then draw a horizontal line.
  7838.  
  7839.                C         pgMoveRel( 100, 50 );
  7840.                          pgLineRel( 400, 0 );
  7841.  
  7842.                Pascal    pgMoveRel( 100, 50 );
  7843.                          pgLineRel( 400, 0 );
  7844.  
  7845.                Basic     call pgMoveRel( 100, 50 )
  7846.                          call pgLineRel( 400, 0 )
  7847.  
  7848.                Fortran   call pgMoveRel( 100, 50 )
  7849.                          call pgLineRel( 400, 0 )
  7850.  
  7851.                Clipper   pgMOVREL( 100, 50 )
  7852.                          pgLINREL( 400, 0 )
  7853.  
  7854.  
  7855.                                 **************
  7856.                                 ** pgMoveTo **
  7857.                                 **************
  7858.  
  7859.  
  7860. DESCRIPTION    The pgMoveTo function moves the cursor from the current cursor
  7861.                position to the new position specified by the coordinate (x,y).
  7862.  
  7863.  
  7864. SYNTAX         C         void pgMoveTo( int x, int y );
  7865.  
  7866.                Pascal    PROCEDURE pgMoveTo( x, y:integer );
  7867.  
  7868.                Basic     SUB pgMoveTo( x%, y% )
  7869.  
  7870.                Fortran   SUBROUTINE pgMoveTo( x, y )
  7871.                          INTEGER*2 x, y
  7872.  
  7873.                Clipper   PROCEDURE pgMOVTO( x, y )
  7874.  
  7875.  
  7876. PARAMETERS     x,y       Coordinate of point to move to.
  7877.  
  7878.  
  7879. RETURN         None.
  7880.  
  7881.  
  7882. SEE ALSO       pgLine, pgLineRel, pgLineTo, pgMoveRel
  7883.  
  7884.  
  7885. EXAMPLES       Draw a horizontal line from coordinate (100,100) to (300,400).
  7886.  
  7887.                C         pgMoveTo( 100, 100 );
  7888.                          pgLineTo( 300, 400 );
  7889.  
  7890.                Pascal    pgMoveTo( 100, 100 );
  7891.                          pgLineTo( 300, 400 );
  7892.  
  7893.                Basic     call pgMoveTo( 100, 100 )
  7894.                          call pgLineTo( 300, 400 )
  7895.  
  7896.                Fortran   call pgMoveTo( 100, 100 )
  7897.                          call pgLineTo( 300, 400 )
  7898.  
  7899.                Clipper   pgMOVTO( 100, 100 )
  7900.                          pgLINTO( 300, 400 )
  7901.  
  7902.  
  7903.                                ***************
  7904.                                ** pgNewPage **
  7905.                                ***************
  7906.  
  7907.  
  7908. DESCRIPTION    The pgNewPage function inserts a formfeed into the current
  7909.                drawing file.  All subsequent graphic calls will be printed to
  7910.                the next page until another pgNewPage function is encountered.
  7911.  
  7912.                Note that the pgEndDrw command will automatically force a page
  7913.                eject, therefore, it is not necessary to call pgNewPage just
  7914.                before calling pgEndDrw.  Doing so will simply cause an extra
  7915.                blank page to be printed.
  7916.  
  7917.  
  7918. SYNTAX         C         void pgNewPage( void );
  7919.  
  7920.                Pascal    PROCEDURE pgNewPage;
  7921.  
  7922.                Basic     SUB pgNewPage
  7923.  
  7924.                Fortran   SUBROUTINE pgNewPage
  7925.  
  7926.                Clipper   PROCEDURE pgNEWPG()
  7927.  
  7928.  
  7929. PARAMETERS     None.
  7930.  
  7931.  
  7932. RETURN         None.
  7933.  
  7934.  
  7935. SEE ALSO       pgEndDrw, pgClearViewPort
  7936.  
  7937.  
  7938. EXAMPLES       Draw a circle, eject the page, then write the text string "New
  7939.                Page" on the next page.
  7940.  
  7941.                C         pgCircle( 500, 500, 200, pgFILL );
  7942.                          pgNewPage();
  7943.                          pgDrawTextXY( 100, 100, "New Page" );
  7944.  
  7945.                Pascal    pgCircle( 500, 500, 200, pgFILL );
  7946.                          pgNewPage;
  7947.                          pgDrawTextXY( 100, 100, 'New Page' );
  7948.  
  7949.                Basic     call pgCircle( 500, 500, 200, pgFILL )
  7950.                          call pgNewPage
  7951.                          call pgDrawTextXY( 100, 100, "New Page" )
  7952.  
  7953.                Fortran   call pgCircle( 500, 500, 200, pgFILL )
  7954.                          call pgNewPage
  7955.                          call pgDrawTextXY( 100, 100, 'New Page'//char(0) )
  7956.  
  7957.                Clipper   pgCIR( 500, 500, 200, pgFILL )
  7958.                          pgNEWPG()
  7959.                          pgDTXY( 100, 100, "New Page" )
  7960.  
  7961.  
  7962.                                ***************
  7963.                                ** pgOpenDrw **
  7964.                                ***************
  7965.  
  7966.  
  7967. DESCRIPTION    The pgOpenDrw function opens an existing PGL drawing file and
  7968.                sets the pointer to the end of the file for appending new
  7969.                graphics commands.  Note that if a previous drawing file was
  7970.                opened with either the pgInitDrw or pgOpenDrw command, you must
  7971.                first call pgEndDrw before opening another file.  Attempting to
  7972.                open a second file without closing the first may cause
  7973.                unpredictable results.
  7974.  
  7975.                If the drawing file was successfully opened, the ierr parameter
  7976.                will return a value of zero, otherwise, a failure occurred.
  7977.                Possible causes of error might be too many files already opened,
  7978.                the specified file doesn't exist, or the specified file is not
  7979.                a PGL drawing file.
  7980.  
  7981.                Once the file has been opened, you may call the pgGetDevMaxX,
  7982.                and pgGetDevMaxY functions to return the virtual drawing
  7983.                resolution originally used to create the drawing file.
  7984.  
  7985.  
  7986. SYNTAX         C         void pgOpenDrw( char far *fname, int far *ierr );
  7987.  
  7988.                Pascal    PROCEDURE pgOpenDrw( fname:string;
  7989.                               var ierr:integer );
  7990.  
  7991.                Basic     SUB pgOpenDrw( SEG fname$, SEG ierr% )
  7992.  
  7993.                Fortran   SUBROUTINE pgOpenDrw( fname, ierr )
  7994.                          CHARACTER*(*) fname
  7995.                          INTEGER*2 ierr
  7996.  
  7997.                Clipper   PROCEDURE pgOPEN( <expC>fname, <ref>ierr )
  7998.  
  7999.  
  8000. PARAMETERS     fname     Character string name of an existing PGL drawing
  8001.                          file.
  8002.                ierr      Returned error code.
  8003.  
  8004.  
  8005. RETURN         None.
  8006.  
  8007.  
  8008. SEE ALSO       pgEndDrw, pgGetDevMaxX, pgGetDevMaxY, pgInitDrw
  8009.  
  8010.  
  8011. EXAMPLES       Open a drawing file and check for an open failure.
  8012.  
  8013.                C         int ierr, maxx, maxy;
  8014.                          pgOpenDrw( "TEST.PLT", &ierr );
  8015.                          if( ierr != 0 ) printf( "OPEN FAILURE" );
  8016.                          maxx = pgGetMaxX();
  8017.                          maxy = pgGetMaxY();
  8018.  
  8019.                Pascal    var
  8020.                          ierr, maxx, maxy : integer;
  8021.                          pgOpenDrw( 'TEST.PLT', ierr );
  8022.                          if( ierr <> 0 ) writeln( 'OPEN ERROR' );
  8023.                          maxx := pgGetMaxX;
  8024.                          maxy := pgGetMaxY;
  8025.  
  8026.                Basic     call pgOpenDrw( "TEST.PLT", ierr% )
  8027.                          if ierr% <> 0 print "OPEN ERROR"
  8028.                          maxx% = pgGetMaxX%
  8029.                          maxy% = pgGetMaxY%
  8030.  
  8031.                Fortran   integer*2 ierr, maxx, maxy
  8032.                          call pgOpenDrw( 'TEST.PLT'//char(0), ierr )
  8033.                          if( ierr .ne. 0 ) print *, 'OPEN ERROR'
  8034.                          maxx = pgGetMaxX
  8035.                          maxy = pgGetMaxY
  8036.  
  8037.                Clipper   pgOPEN( "TEST.PLT", @ierr )
  8038.                          if( ierr <> 0 ) ? "OPEN ERROR"
  8039.                          maxx = pgGetMaxX()
  8040.                          maxy = pgGetMaxY()
  8041.  
  8042.  
  8043.                                  ***********
  8044.                                  ** pgPie **
  8045.                                  ***********
  8046.  
  8047.  
  8048. DESCRIPTION    The pgPie function draws circular pie slices of any angular
  8049.                extent.  The pie is centered at the coordinate (x,y) with a
  8050.                radius of rad.  The start and termination angles of the pie are
  8051.                given by the parameters sa and ea, respectively, specified in
  8052.                degree measure.  Zero degrees is taken to be the 3 o'clock
  8053.                position increasing positively in a counterclockwise direction.
  8054.                The pie may be outlined with a solid line using the current
  8055.                drawing color, filled using the current fill color and pattern,
  8056.                or both outlined and filled.
  8057.  
  8058.                The center coordinate of the pie, (x,y), is specified in the
  8059.                viewport coordinate system.  The cursor position is not updated
  8060.                after drawing.
  8061.  
  8062.  
  8063. SYNTAX         C         void pgPie( int x, int y, int rad, int sa, int ea,
  8064.                               int fill );
  8065.  
  8066.                Pascal    PROCEDURE pgPie( x, y, rad, sa, ea, fill: integer );
  8067.  
  8068.                Basic     SUB pgPie( x%, y%, rad%, sa%, ea%, fill% )
  8069.  
  8070.                Fortran   SUBROUTINE pgPie( x, y, rad, sa, ea, fill )
  8071.                          INTEGER*2 x, y, rad, sa, ea, fill
  8072.  
  8073.                Clipper   PROCEDURE pgPI( x, y, rad, sa, ea, fill )
  8074.  
  8075.  
  8076. PARAMETERS     x,y       Center point of the pie.
  8077.                rad       Radius of the pie.
  8078.                sa        Start angle of the pie.
  8079.                ea        End angle of the pie.
  8080.                fill      Fill flag.
  8081.  
  8082.  
  8083.                The fill flag parameter may be one of the following manifest
  8084.                constants:
  8085.  
  8086.                Constant  Value     Action
  8087.  
  8088.                pgOUTLINE   1       Draw the outline only using the
  8089.                                    current drawing color.
  8090.                pgFILL      2       Fill using the current fill color and
  8091.                                    fill pattern.  The border is not
  8092.                                    drawn.
  8093.                pgOFILL     3       Draw the outline and fill the
  8094.                                    interior.
  8095.  
  8096.  
  8097. RETURN         None.
  8098.  
  8099.  
  8100. SEE ALSO       pgCircle, pgEllipse, pgSector, pgSetColor, pgSetFillMode,
  8101.                pgSetFillPattern, pgSetFillStyle
  8102.  
  8103.  
  8104. EXAMPLES       Draw an outline of a pie slice of radius 200 centered at
  8105.                (500,500) from 30 to 60 degrees.
  8106.  
  8107.                C         pgSetColor( 2 );
  8108.                          pgPie( 500, 500, 200, 30, 60, pgOUTLINE );
  8109.  
  8110.                Pascal    pgSetColor( 2 );
  8111.                          pgPie( 500, 500, 200, 30, 60, pgOUTLINE );
  8112.  
  8113.                Basic     call pgSetColor( 2 )
  8114.                          call pgPie( 500, 500, 200, 30, 60, pgOUTLINE )
  8115.  
  8116.                Fortran   call pgSetColor( 2 )
  8117.                          call pgPie( 500, 500, 200, 30, 60, pgOUTLINE )
  8118.  
  8119.                Clipper   pgSCOLOR( 2 )
  8120.                          pgPI( 500, 500, 200, 30, 60, pgOUTLINE )
  8121.  
  8122.  
  8123.                                ***************
  8124.                                ** pgPolygon **
  8125.                                ***************
  8126.  
  8127.  
  8128. DESCRIPTION    The pgPolygon function draws self-closing polygons.  The
  8129.                polygon may be outlined with a solid line using the current
  8130.                drawing color, filled using the current fill color and pattern,
  8131.                or both outlined and filled.  The polygon may not be self-
  8132.                intersecting.
  8133.  
  8134.                The coordinates of the polygon vertices are passed in a vector
  8135.                list such that the first two values contained in the vector
  8136.                represents the (x,y) coordinate of the first vertex, the next
  8137.                two values in the vector represents the second vertex and so on.
  8138.                The polygon is self-closing, therefore, it is not necessary for
  8139.                the first and last vertices to be equal.  The coordinates are
  8140.                specified relative to the currently defined viewport.  The
  8141.                cursor position is not updated after drawing.
  8142.  
  8143.  
  8144. SYNTAX         C         void pgPolygon( int far *data, int numpoints,
  8145.                               int fill );
  8146.  
  8147.                Pascal    PROCEDURE pgPolygon( var data; numpoints,
  8148.                               fill:integer );
  8149.  
  8150.                Basic     SUB pgPolygon( SEG data%, numpoints%, fill% )
  8151.  
  8152.                Fortran   SUBROUTINE pgPolygon( data, numpoints, fill )
  8153.                          INTEGER*2 data(n), numpoints, fill
  8154.  
  8155.                Clipper   PROCEDURE pgPOLYGN( data, numpoints, fill )
  8156.  
  8157.  
  8158. PARAMETERS     data      Pointer to a vector of (x,y) coordinate pairs
  8159.                          representing the vertices of the polygon.
  8160.                numpoints Number of points in the polygon.  Each (x,y)
  8161.                          coordinate pair counts as one point.
  8162.                fill      Fill flag.
  8163.  
  8164.                The fill flag parameter may be one of the following manifest
  8165.                constants:
  8166.  
  8167.                Constant  Value     Action
  8168.  
  8169.                pgOUTLINE   1       Draw the outline only using the
  8170.                                    current drawing color.
  8171.                pgFILL      2       Fill using the current fill color and
  8172.                                    fill pattern.  The border is not
  8173.                                    drawn.
  8174.                pgOFILL     3       Draw the outline and fill the
  8175.                                    interior.
  8176.  
  8177.  
  8178. RETURN         None.
  8179.  
  8180.  
  8181. SEE ALSO       pgCircle, pgEllipse, pgPolyLine, pgSector, pgSetColor,
  8182.                pgSetFillMode, pgSetFillPattern, pgSetFillStyle
  8183.  
  8184.  
  8185. EXAMPLES       Draw a right triangle and fill it using the polygon function.
  8186.  
  8187.                C         int polydata[6] = { 100,100,  100,600,  500,600 };
  8188.                          pgSetColor( 2 );
  8189.                          pgPolygon( polydata, 3, pgFILL );
  8190.  
  8191.                Pascal    const polydata : array[0..5] of integer
  8192.                               = ( 100,100,  100,600,  500,600 );
  8193.                          pgPolygon( polydata, 3, pgFILL );
  8194.  
  8195.                Basic     DIM polydata%(5)
  8196.                          polydata%(0) = 100 : polydata%(1) = 100
  8197.                          polydata%(2) = 100 : polydata%(3) = 600
  8198.                          polydata%(4) = 500 : polydata%(5) = 600
  8199.                          pgPolygon( polydata%(0), 3, pgFILL )
  8200.  
  8201.                Fortran   integer*2 polydata(6)
  8202.                          data polydata / 100,100,  100,600,  500,600 /
  8203.                          call pgPolygon( polydata, 3, pgFILL )
  8204.  
  8205.                Clipper   public polydata[6]
  8206.                          polydata[1] = 100
  8207.                          polydata[2] = 100
  8208.                          polydata[3] = 100
  8209.                          polydata[4] = 600
  8210.                          polydata[5] = 500
  8211.                          polydata[6] = 600
  8212.                          pgPOLYGN( polydata, 3, pgFILL )
  8213.  
  8214.  
  8215.                                ****************
  8216.                                ** pgPolyLine **
  8217.                                ****************
  8218.  
  8219.  
  8220. DESCRIPTION    The pgPolyLine function draws straight lines between
  8221.                consecutive data coordinates specified in a vector list using
  8222.                the current color and line style.  If the first and last
  8223.                vertices are equal, then a closed polygon will be drawn.
  8224.  
  8225.                The coordinates of the polyline are passed in a vector list
  8226.                such that the first two values contained in the vector
  8227.                represents the (x,y) coordinate of the first point, the next
  8228.                two values in the vector represents the second point and so on.
  8229.                The coordinates are specified relative to the currently defined
  8230.                viewport.  The cursor position is not updated after drawing.
  8231.  
  8232.  
  8233. SYNTAX         C         void pgPolyLine( int far *data, int numpoints );
  8234.  
  8235.                Pascal    PROCEDURE pgPolyLine( var data; numpoints:integer );
  8236.  
  8237.                Basic     SUB pgPolyLine( SEG data%, numpoints% )
  8238.  
  8239.                Fortran   SUBROUTINE pgPolyLine( data, numpoints )
  8240.                          INTEGER*2 data(n), numpoints
  8241.  
  8242.                Clipper   PROCEDURE pgPOLYLN( polydata, numpoints )
  8243.  
  8244.  
  8245. PARAMETERS     data      Pointer to a vector of (x,y) coordinates pairs.
  8246.                numpoints Number of data points.  Each (x,y) coordinate pair
  8247.                          counts as one point.
  8248.  
  8249.  
  8250. RETURN         None.
  8251.  
  8252.  
  8253. SEE ALSO       pgArc, pgEllArc, pgPolygon, pgSetColor, pgSetLineStyle,
  8254.                pgSetLinePattern
  8255.  
  8256.  
  8257. EXAMPLES       Draw a right triangle using the polyline function.
  8258.  
  8259.                C         int polydata[8]={100,100, 100,600, 500,600, 100,100};
  8260.                          pgPolyLine( polydata, 4 );
  8261.  
  8262.                Pascal    const polydata : array[0..7] of integer
  8263.                               = ( 100,100,  100,600,  500,600, 100,100 );
  8264.                          pgPolyLine( polydata, 4 );
  8265.  
  8266.                Basic     DIM polydata%(0 TO 7)
  8267.                          polydata%(0) = 100 : polydata%(1) = 100
  8268.                          polydata%(2) = 100 : polydata%(3) = 600
  8269.                          polydata%(4) = 500 : polydata%(5) = 600
  8270.                          polydata%(6) = 100 : polydata%(7) = 100
  8271.                          call pgPolyLine( polydata%(0), 4 )
  8272.  
  8273.                Fortran   integer*2 polydata(8)
  8274.                          data polydata / 100,100, 100,600, 500,600,100,100 /
  8275.                          call pgPolyLine( polydata, 4 )
  8276.  
  8277.                Clipper   public polydata[8]
  8278.                          polydata[1] = 100
  8279.                          polydata[2] = 100
  8280.                          polydata[3] = 100
  8281.                          polydata[4] = 600
  8282.                          polydata[5] = 500
  8283.                          polydata[6] = 600
  8284.                          polydata[7] = 100
  8285.                          polydata[8] = 100
  8286.                          pgPOLYLN( polydata, 4 )
  8287.  
  8288.  
  8289.                               *****************
  8290.                               ** pgRectangle **
  8291.                               *****************
  8292.  
  8293.  
  8294. DESCRIPTION    The pgRectangle function draws a rectangle using the current
  8295.                drawing color.  The rectangle may be outlined with a solid line
  8296.                using the current drawing color, filled using the current fill
  8297.                color and pattern, or both outlined and filled.
  8298.  
  8299.                The coordinate of the rectangle are specified relative to the
  8300.                currently defined viewport and may be any two diagonally
  8301.                opposing corners.  The cursor position is not updated after
  8302.                drawing.
  8303.  
  8304.  
  8305. SYNTAX         C         void pgRectangle( int x1, int y1, int x2, int y2,
  8306.                               int fill );
  8307.  
  8308.                Pascal    PROCEDURE pgRectangle( x1, y1, x2, y2,
  8309.                               fill:integer );
  8310.  
  8311.                Basic     SUB pgRectangle( x1%, y1%, x2%, y2%, fill% )
  8312.  
  8313.                Fortran   SUBROUTINE pgRectangle( x1, y1, x2, y2, fill )
  8314.                          INTEGER*2 x1, y1, x2, y2, fill
  8315.  
  8316.                Clipper   PROCEDURE pgRECT( x1, y1, x2, y2, fill )
  8317.  
  8318.  
  8319. PARAMETERS     x1,y1     Coordinate of upper-left corner of rectangle.
  8320.                x2,y2     Coordinate of lower-right corner of rectangle.
  8321.                fill      Fill flag.
  8322.  
  8323.                The fill flag parameter may be one of the following manifest
  8324.                constants:
  8325.  
  8326.                Constant  ValueAction
  8327.  
  8328.                pgOUTLINE   1  Draw the outline only using the current
  8329.                               drawing color.
  8330.                pgFILL      2  Fill using the current fill color and fill
  8331.                               pattern.  The border is not drawn.
  8332.                pgOFILL     3  Draw the outline and fill the interior.
  8333.  
  8334.  
  8335. RETURN         None.
  8336.  
  8337.  
  8338. SEE ALSO       pgEllipse, pgCircle, pgPie, pgSetColor, pgSetFillMode,
  8339.                pgSetFillPattern, pgSetFillStyle
  8340.  
  8341.  
  8342. EXAMPLES       Draw three rectangles to demonstrate the effects of the
  8343.                different fill options.
  8344.  
  8345.                C         pgSetColor( 1 );
  8346.                          pgSetFillStyle( pgFHATCH, 2 );
  8347.                          pgRectangle( 100, 100, 200, 200, pgOUTLINE );
  8348.                          pgRectangle( 300, 300, 400, 400, pgFILL );
  8349.                          pgRectangle( 500, 500, 600, 600, pgOFILL );
  8350.  
  8351.                Pascal    pgSetColor( 1 );
  8352.                          pgSetFillStyle( pgFHATCH, 2 );
  8353.                          pgRectangle( 100, 100, 200, 200, pgOUTLINE );
  8354.                          pgRectangle( 300, 300, 400, 400, pgFILL );
  8355.                          pgRectangle( 500, 500, 600, 600, pgOFILL );
  8356.  
  8357.                Basic     call pgSetColor( 1 )
  8358.                          call pgSetFillStyle( pgFHATCH, 2 )
  8359.                          call pgRectangle( 100, 100, 200, 200, pgOUTLINE )
  8360.                          call pgRectangle( 300, 300, 400, 400, pgFILL )
  8361.                          call pgRectangle( 500, 500, 600, 600, pgOFILL )
  8362.  
  8363.                Fortran   call pgSetColor( 1 )
  8364.                          call pgSetFillStyle( pgFHATCH, 2 )
  8365.                          call pgRectangle( 100, 100, 200, 200, pgOUTLINE )
  8366.                          call pgRectangle( 300, 300, 400, 400, pgFILL )
  8367.                          call pgRectangle( 500, 500, 600, 600, pgOFILL )
  8368.  
  8369.                Clipper   pgSCOLOR( 1 )
  8370.                          pgSFSTYLE( pgFHATCH, 2 )
  8371.                          pgRECT( 100, 100, 200, 200, pgOUTLINE )
  8372.                          pgRECT( 300, 300, 400, 400, pgFILL )
  8373.                          pgRECT( 500, 500, 600, 600, pgOFILL )
  8374.  
  8375.  
  8376.                                 **************
  8377.                                 ** pgSector **
  8378.                                 **************
  8379.  
  8380.  
  8381. DESCRIPTION    The pgSector function draws elliptical pie slices of any
  8382.                angular extent.  The sector is centered at the coordinate (x,y)
  8383.                with radii of xrad and yrad.  The start and termination angles
  8384.                of the sector are given by the parameters sa and ea,
  8385.                respectively, specified in degree measure.  Zero degrees is
  8386.                taken to be the 3 o'clock position increasing positively in a
  8387.                counterclockwise direction.  The sector may be outlined with a
  8388.                solid line using the current drawing color, filled using the
  8389.                current fill color and pattern, or both outlined and filled.
  8390.  
  8391.                The center coordinate of the sector, (x,y), is specified
  8392.                relative to the currently defined viewport.  The cursor
  8393.                position is not updated after drawing.
  8394.  
  8395.  
  8396. SYNTAX         C         void pgSector( int x, int y, int xrad, int yrad,
  8397.                               int sa, int ea, int fill );
  8398.  
  8399.                Pascal    PROCEDURE pgSector( x, y, xrad, yrad, sa, ea,
  8400.                               fill:integer );
  8401.  
  8402.                Basic     SUB pgSector( x%, y%, xrad%, yrad%, sa%, ea%, fill% )
  8403.  
  8404.                Fortran   SUBROUTINE pgSector( x, y, xrad, yrad, sa, ea, fill )
  8405.                          INTEGER*2 x, y, xrad, yrad, sa, ea, fill
  8406.  
  8407.                Clipper   PROCEDURE pgSECT( x, y, xrad, yrad, sa, ea, fill )
  8408.  
  8409.  
  8410. PARAMETERS     x,y       Center point of the sector.
  8411.                xrad      Horizontal radius of the sector.
  8412.                yrad      Vertical radius of the sector.
  8413.                sa        Start angle of the sector.
  8414.                ea        End angle of the sector.
  8415.                fill      Fill flag.
  8416.  
  8417.                The fill flag parameter may be one of the following manifest
  8418.                constants:
  8419.  
  8420.                Constant  Value     Action
  8421.  
  8422.                pgOUTLINE   1       Draw the outline only using the
  8423.                                    current drawing color.
  8424.                pgFILL      2       Fill using the current fill color and
  8425.                                    fill pattern.  The border is not
  8426.                                    drawn.
  8427.                pgOFILL     3       Draw the outline and fill the
  8428.                                    interior.
  8429.  
  8430.  
  8431. RETURN         None.
  8432.  
  8433.  
  8434. SEE ALSO       pgEllipse, pgCircle, pgPie, pgSetColor, pgSetFillMode,
  8435.                pgSetFillPattern, pgSetFillStyle
  8436.  
  8437.  
  8438. EXAMPLES       Draw an elliptic pie slice of radii 200 by 100 centered at
  8439.                (500,500) from 30 to 270 degrees.
  8440.  
  8441.                C         pgSector( 500, 500, 200, 100, 30, 270, pgFILL );
  8442.  
  8443.                Pascal    pgSector( 500, 500, 200, 100, 30, 270, pgFILL );
  8444.  
  8445.                Basic     call pgSector( 500, 500, 200, 100, 30, 270, pgFILL )
  8446.  
  8447.                Fortran   call pgSector( 500, 500, 200, 100, 30, 270, pgFILL )
  8448.  
  8449.                Clipper   pgSECT( 500, 500, 200, 100, 30, 270, pgFILL )
  8450.  
  8451.  
  8452.                             **********************
  8453.                             ** pgSetCharSpacing **
  8454.                             **********************
  8455.  
  8456.  
  8457. DESCRIPTION    The pgSetCharSpacing function is used to place additional
  8458.                spacing between characters in a text string.  The desired
  8459.                spacing is specified in terms of pixel units.  The default
  8460.                setting is 0.
  8461.  
  8462.  
  8463. SYNTAX         C         void pgSetCharSpacing( int space );
  8464.  
  8465.                Pascal    PROCEDURE pgSetCharSpacing( space:integer );
  8466.  
  8467.                Basic     SUB pgSetCharSpacing( space% )
  8468.  
  8469.                Fortran   SUBROUTINE pgSetCharSpacing( space )
  8470.                          INTEGER*2 space
  8471.  
  8472.                Clipper   PROCEDURE pgSCHARSP( space )
  8473.  
  8474.  
  8475. PARAMETERS     space     Additional spacing to use between text string
  8476.                          characters.
  8477.  
  8478.  
  8479. RETURN         None.
  8480.  
  8481.  
  8482. SEE ALSO       pgGetCharSpacing, pgSetTextJustify
  8483.  
  8484.  
  8485. EXAMPLES       Set the character spacing to twice the current value, then
  8486.                display the text "Hello World".
  8487.  
  8488.                C         pgSetTextStyle( pgTRIPLEX );
  8489.                          pgSetCharSpacing( 2 * pgGetCharSpacing() );
  8490.                          pgDrawTextXY( 100, 100, "Hello World" );
  8491.  
  8492.                Pascal    pgSetTextStyle( pgTRIPLEX );
  8493.                          pgSetCharSpacing( 2 * pgGetCharSpacing );
  8494.                          pgDrawTextXY( 100, 100, 'Hello World' );
  8495.  
  8496.                Basic     call pgSetTextStyle( pgTRIPLEX )
  8497.                          call pgSetCharSpacing( 2 * pgGetCharSpacing% )
  8498.                          call pgDrawTextXY( 100, 100, "Hello World" )
  8499.  
  8500.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  8501.                          call pgSetCharSpacing( 2 * pgGetCharSpacing )
  8502.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  8503.  
  8504.                Clipper   pgSTSTYLE( pgTRIPLEX )
  8505.                          pgSCHARSP( 2 * pgGCHARSP() )
  8506.                          pgDTXY( 100, 100, "Hello World" )
  8507.  
  8508.  
  8509.                              *******************
  8510.                              ** pgSetClipArea **
  8511.                              *******************
  8512.  
  8513.  
  8514. DESCRIPTION    The pgSetClipArea function is used to define a rectangular
  8515.                clipping region on the page.  The clipping region is defined in
  8516.                terms of the absolute virtual coordinate system.  All subsequent
  8517.                graphics, including text, is clipped at the boundaries.  By
  8518.                default, the clipping region tracks the viewport area.  If you
  8519.                wish to set a clipping region different from the viewport area,
  8520.                you must first set the viewport, then call pgSetClipArea.
  8521.  
  8522.                When pgSetClipArea is called, clipping is automatically enabled.
  8523.                You may call the pgSetClipping function to turn clipping off.
  8524.  
  8525.  
  8526. SYNTAX         C         void pgSetClipArea( int x1, int y1, int x2, int y2 );
  8527.  
  8528.                Pascal    PROCEDURE pgSetClipArea( x1, y1, x2, y2:integer );
  8529.  
  8530.                Basic     SUB pgSetClipArea( x1%, y1%, x2%, y2% )
  8531.  
  8532.                Fortran   SUBROUTINE pgSetClipArea( x1, y1, x2, y2 )
  8533.                          INTEGER*2 x1, y1, x2, y2
  8534.  
  8535.                Clipper   PROCEDURE pgSCLIPA( x1, y1, x2, y2 )
  8536.  
  8537.  
  8538. PARAMETERS     x1,y1     Upper-left corner of clipping region.
  8539.                x2,y2     Lower-right corner of clipping region.
  8540.  
  8541.  
  8542. RETURN         None.
  8543.  
  8544.  
  8545. SEE ALSO       pgGetClipArea, pgGetClipping, pgSetClipping, pgSetViewPort
  8546.  
  8547.  
  8548. EXAMPLES       Get the current clipping region.  Set the clipping area to the
  8549.                full printable region and fill that region, then restore the
  8550.                clipping region.
  8551.  
  8552.                C         int left, top, right, bottom;
  8553.                          pgGetClipArea( &left, &top, &right, &bottom );
  8554.                          pgSetClipArea( 0, 0, pgGetMaxX(), pgGetMaxY() );
  8555.                          pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
  8556.                          pgSetClipArea( left, top, right, bottom );
  8557.  
  8558.                Pascal    var
  8559.                          left, top, right, bottom : integer;
  8560.                          pgGetClipArea( left, top, right, bottom );
  8561.                          pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY );
  8562.                          pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
  8563.                          pgSetClipArea( left, top, right, bottom );
  8564.  
  8565.                Basic     call pgGetClipArea( left%, top%, right%, bottom% )
  8566.                          call pgSetClipArea( 0, 0, pgGetMaxX%, pgGetMaxY% )
  8567.                          call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
  8568.                          call pgSetClipArea( left%, top%, right%, bottom% )
  8569.  
  8570.                Fortran   integer*2 left, top, right, bottom
  8571.                          call pgGetClipArea( left, top, right, bottom )
  8572.                          call pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY )
  8573.                          call pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL )
  8574.                          call pgSetClipArea( left, top, right, bottom )
  8575.  
  8576.                Clipper   pgGCLIPA( @left, @top, @right, @bottom )
  8577.                          pgSCLIPA( 0, 0, pgGMAXX(), pgGMAXY() )
  8578.                          pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
  8579.                          pgSCLIPA( left, top, right, bottom )
  8580.  
  8581.  
  8582.                              *******************
  8583.                              ** pgSetClipping **
  8584.                              *******************
  8585.  
  8586.  
  8587. DESCRIPTION    The pgSetClipping function is used to enable or disable
  8588.                clipping.  If enabled, all subsequent graphics, including text,
  8589.                will be clipped at the boundaries set by the pgSetClipArea
  8590.                function.  If disabled, clipping will be performed at the
  8591.                boundaries of the page.  By default, clipping is enabled.
  8592.                Clipping is also automatically enabled when you call the
  8593.                pgSetClipArea function.
  8594.  
  8595.  
  8596. SYNTAX         C         void pgSetClipping( int flag );
  8597.  
  8598.                Pascal    PROCEDURE pgSetClipping( flag:integer );
  8599.  
  8600.                Basic     SUB pgSetClipping( flag% )
  8601.  
  8602.                Fortran   SUBROUTINE pgSetClipping( flag )
  8603.                          INTEGER*2 flag
  8604.  
  8605.                Clipper   PROCEDURE pgSCLIP( flag )
  8606.  
  8607.  
  8608. PARAMETERS     flag      Switch flag to enable or disable clipping.
  8609.  
  8610.                The switch flag status may be one of the following manifest
  8611.                constants:
  8612.  
  8613.                Constant  Value
  8614.  
  8615.                  pgON      1
  8616.                  pgOFF     0
  8617.  
  8618.  
  8619. RETURN         None.
  8620.  
  8621.  
  8622. SEE ALSO       pgGetClipArea, pgGetClipping, pgSetClipArea, pgSetViewPort
  8623.  
  8624.  
  8625. EXAMPLES       Get the current clipping flag.  Disable clipping and fill a
  8626.                rectangular region, then restore the clipping parameter.
  8627.  
  8628.                C         int clipflag;
  8629.                          clipflag = pgGetClipping();
  8630.                          pgSetClipping( pgOFF );
  8631.                          pgRectangle( 0, 0, 500, 200, pgFILL );
  8632.                          pgSetClipping( clipflag );
  8633.  
  8634.                Pascal    var
  8635.                          clipflag : integer;
  8636.                          clipflag := pgGetClipping;
  8637.                          pgSetClipping( pgOFF );
  8638.                          pgRectangle( 0, 0, 500, 200, pgFILL );
  8639.                          pgSetClipping( clipflag );
  8640.  
  8641.                Basic     clipflag% = pgGetClipping%
  8642.                          call pgSetClipping( pgOFF )
  8643.                          call pgRectangle( 0, 0, 500, 200, pgFILL )
  8644.                          call pgSetClipping( clipflag% )
  8645.  
  8646.                Fortran   integer*2 clipflag
  8647.                          clipflag = pgGetClipping
  8648.                          call pgSetClipping( pgOFF )
  8649.                          call pgRectangle( 0, 0, 500, 200, pgFILL )
  8650.                          call pgSetClipping( clipflag )
  8651.  
  8652.                Clipper   clipflag = pgGCLIP()
  8653.                          pgSCLIP( pgOFF )
  8654.                          pgRECT( 0, 0, 500, 200, pgFILL )
  8655.                          pgSCLIP( clipflag )
  8656.  
  8657.  
  8658.                                ****************
  8659.                                ** pgSetColor **
  8660.                                ****************
  8661.  
  8662.  
  8663. DESCRIPTION    The pgSetColor function sets the current color index to color.
  8664.                The default color index is 1.
  8665.  
  8666.                The default colors associated with valid color indices are
  8667.                color model dependent.  That is, on black and white printers,
  8668.                index 0 is white and all other color values (1 to 255) are
  8669.                black.  On PaintJet printers, there are 16 colors at 90 dpi and
  8670.                8 colors at 180 dpi.  These may be remapped using pgSetPalette
  8671.                or the RGB content of these colors may be altered using
  8672.                pgSetRgbPalette.  The PaintJet/XL  supports up to 256 colors.
  8673.                The first 8 PaintJet/XL colors correspond to the PaintJet's
  8674.                8 colors @180 dpi.  The colors 8 to 255 are preset by default,
  8675.                but may be remapped using pgSetPalette or may be altered by
  8676.                pgSetRgbPalette.
  8677.  
  8678.                The following functions use the current drawing color:  pgArc,
  8679.                pgCircle, pgDrawText, pgDrawTextXY, pgEllArc, pgEllipse,
  8680.                pgLine, pgLineRel, pgLineTo, pgPie, pgPolygon, pgPolyLine,
  8681.                pgRectangle, and pgSector.
  8682.  
  8683.  
  8684. SYNTAX         C         void pgSetColor( int color );
  8685.  
  8686.                Pascal    PROCEDURE pgSetColor( color:integer );
  8687.  
  8688.                Basic     SUB pgSetColor( color% )
  8689.  
  8690.                Fortran   SUBROUTINE pgSetColor( color )
  8691.                          INTEGER*2 color
  8692.  
  8693.                Clipper   PROCEDURE pgSCOLOR( color )
  8694.  
  8695.  
  8696. PARAMETERS     color     Desired color index.
  8697.  
  8698.  
  8699. RETURN         None.
  8700.  
  8701.  
  8702. SEE ALSO       pgGetColor
  8703.  
  8704.  
  8705. EXAMPLES       Set the current drawing color to 1.
  8706.  
  8707.                C         pgSetColor( 1 );
  8708.  
  8709.                Pascal    pgSetColor( 1 );
  8710.  
  8711.                Basic     call pgSetColor( 1 )
  8712.  
  8713.                Fortran   call pgSetColor( 1 )
  8714.  
  8715.                Clipper   pgSCOLOR( 1 )
  8716.  
  8717.  
  8718.                              *******************
  8719.                              ** pgSetDefaults **
  8720.                              *******************
  8721.  
  8722.  
  8723. DESCRIPTION    The pgSetDefaults function resets all PGL graphics parameters
  8724.                to their default state.  Parameter values are automatically set
  8725.                to their default values when pgInitDrw and pgOpenDrw are called.
  8726.                The default values are listed below:
  8727.  
  8728.                Parameter           Value
  8729.  
  8730.                Viewport            Set to full virtual drawing resolution
  8731.                Clipping region     Set to full virtual drawing region
  8732.                Clipping flag       Clipping is turned ON
  8733.                Cursor position     Cursor placed at (0, 0)
  8734.                Drawing color       Color index 1
  8735.  
  8736.                Fill color          Color index 1
  8737.                Fill mode           pgOPAQ
  8738.                Fill style          pgFSOLID
  8739.  
  8740.                Line style          pgLSOLID
  8741.                Line thickness      1
  8742.                Line weight         Not in effect.  Lines will be drawn with
  8743.                                    line thickness 1.
  8744.  
  8745.                Color palette       Previous palette mapping no longer valid
  8746.                RGB palette         Previous RGB color definitions no longer
  8747.                                    valid
  8748.  
  8749.                Character spacing   0
  8750.                Text bolding        1
  8751.                Text justification  (pgLEFT, pgBOTTOM)
  8752.                Text orientation    (1, 0)
  8753.                Text scaling        (1, 1, 1, 1)
  8754.                Text style          pgSMALL
  8755.  
  8756.  
  8757. SYNTAX         C         void pgSetDefaults( void );
  8758.  
  8759.                Pascal    PROCEDURE pgSetDefaults;
  8760.  
  8761.                Basic     SUB pgSetDefaults
  8762.  
  8763.                Fortran   SUBROUTINE pgSetDefaults
  8764.  
  8765.                Clipper   PROCEDURE pgSDEFAULT()
  8766.  
  8767.  
  8768. PARAMETERS     None.
  8769.  
  8770.  
  8771. RETURN         None.
  8772.  
  8773.  
  8774. SEE ALSO       pgInitDrw, pgOpenDrw
  8775.  
  8776.  
  8777. EXAMPLES       Set all PGL graphics parameters to their default state.
  8778.  
  8779.                C         pgSetDefaults();
  8780.  
  8781.                Pascal    pgSetDefaults;
  8782.  
  8783.                Basic     call pgSetDefaults
  8784.  
  8785.                Fortran   call pgSetDefaults
  8786.  
  8787.                Clipper   pgSDEFAULT()
  8788.  
  8789.  
  8790.                              *******************
  8791.                              ** pgSetFillMode **
  8792.                              *******************
  8793.  
  8794.  
  8795. DESCRIPTION    The pgSetFillMode function specifies whether filling operations
  8796.                are to be performed transparently or opaquely.  When filling in
  8797.                opaque mode, any underlying graphics is replaced by the fill
  8798.                pattern.  In transparent mode, fill patterns are overlaid on
  8799.                the specified region without destroying underlying graphics.
  8800.                The default fill mode is pgOPAQ.
  8801.  
  8802.  
  8803. SYNTAX         C         void pgSetFillMode( int mode );
  8804.  
  8805.                Pascal    PROCEDURE pgSetFillMode( mode:integer );
  8806.  
  8807.                Basic     SUB pgSetFillMode( mode% )
  8808.  
  8809.                Fortran   SUBROUTINE pgSetFillMode( mode )
  8810.                          INTEGER*2 mode
  8811.  
  8812.                Clipper   PROCEDURE pgSFMODE( mode )
  8813.  
  8814.  
  8815. PARAMETERS     mode      Fill mode.
  8816.  
  8817.                Predefined fill mode flags may be specified using one of the
  8818.                following manifest constants:
  8819.  
  8820.                Constant       Value     Description
  8821.  
  8822.                pgTRANS          0       Transparent fill (does not
  8823.                                         clear the fill region before
  8824.                                         filling).
  8825.                pgOPAQ           1       Opaque fill (clears the fill
  8826.                                         region before filling).
  8827.  
  8828.  
  8829. RETURN         None.
  8830.  
  8831.  
  8832. SEE ALSO       pgGetFillMode, pgGetFillPattern, pgGetFillStyle,
  8833.                pgSetFillPattern, pgSetFillStyle
  8834.  
  8835.  
  8836. EXAMPLES       Get the current fill mode, set the fill mode to be transparent
  8837.                and draw two overlapping circles using different fill patterns,
  8838.                then restore the fill mode.
  8839.  
  8840.                C         int mode;
  8841.                          mode = pgGetFillMode();
  8842.                          pgSetFillMode( pgTRANS );
  8843.                          pgSetFillStyle( pgFLTSLASH, 2 );
  8844.                          pgCircle( 400, 400, 300, pgOFILL );
  8845.                          pgSetFillStyle( pgFLTBKSLASH, 2 );
  8846.                          pgCircle( 600, 400, 300, pgOFILL );
  8847.                          pgSetFillMode( mode );
  8848.  
  8849.                Pascal    var
  8850.                          mode : integer;
  8851.                          mode := pgGetFillMode;
  8852.                          pgSetFillMode( pgTRANS );
  8853.                          pgSetFillStyle( pgFLTSLASH, 2 );
  8854.                          pgCircle( 400, 400, 300, pgOFILL );
  8855.                          pgSetFillStyle( pgFLTBKSLASH, 2 );
  8856.                          pgCircle( 600, 400, 300, pgOFILL );
  8857.                          pgSetFillMode( mode );
  8858.  
  8859.                Basic     mode% = pgGetFillMode%
  8860.                          call pgSetFillMode( pgTRANS )
  8861.                          call pgSetFillStyle( pgFLTSLASH, 2 )
  8862.                          call pgCircle( 400, 400, 300, pgOFILL )
  8863.                          call pgSetFillStyle( pgFLTBKSLASH, 2 )
  8864.                          call pgCircle( 600, 400, 300, pgOFILL )
  8865.                          call pgSetFillMode( mode% )
  8866.  
  8867.                Fortran   integer*2 mode
  8868.                          mode = pgGetFillMode
  8869.                          call pgSetFillMode( pgTRANS )
  8870.                          call pgSetFillStyle( pgFLTSLASH, 2 )
  8871.                          call pgCircle( 400, 400, 300, pgOFILL )
  8872.                          call pgSetFillStyle( pgFLTBKSLASH, 2 )
  8873.                          call pgCircle( 600, 400, 300, pgOFILL )
  8874.                          call pgSetFillMode( mode )
  8875.  
  8876.                Clipper   mode = pgGFMODE()
  8877.                          pgSFMODE( pgTRANS )
  8878.                          pgSFSTYLE( pgFLTSLASH, 2 )
  8879.                          pgCIR( 400, 400, 300, pgOFILL )
  8880.                          pgSFSTYLE( pgFLTBKSLASH, 2 )
  8881.                          pgCIR( 600, 400, 300, pgOFILL )
  8882.                          pgSFMODE( mode )
  8883.  
  8884.  
  8885.                             **********************
  8886.                             ** pgSetFillPattern **
  8887.                             **********************
  8888.  
  8889.  
  8890. DESCRIPTION    The pgSetFillPattern function specifies a fill color and
  8891.                defines an 8x8 bit pattern to use in all subsequent fill
  8892.                operations.  The default fill pattern is a solid fill.  The
  8893.                default fill color is color index 1.
  8894.  
  8895.                The following functions use the current fill color and pattern:
  8896.                pgCircle, pgEllipse, pgPie, pgPolygon, pgRectangle, and
  8897.                pgSector.
  8898.  
  8899.  
  8900. SYNTAX         C         void far pgSetFillPattern( char far *pattern,
  8901.                               int fcolor );
  8902.  
  8903.                Pascal    PROCEDURE pgSetFillPattern( var pattern;
  8904.                               fcolor:integer );
  8905.  
  8906.                Basic     SUB pgSetFillPattern( SEG pattern%, fcolor% )
  8907.  
  8908.                Fortran   SUBROUTINE pgSetFillPattern( pattern, fcolor )
  8909.                          CHARACTER*1 pattern(8)
  8910.                          INTEGER*2 fcolor
  8911.  
  8912.                Clipper   PROCEDURE pgSFPAT( pattern, fcolor )
  8913.  
  8914.  
  8915. PARAMETERS     pattern   8x8 bit pattern that determines how the filled region
  8916.                          looks.
  8917.                fcolor    Color index of fill color.
  8918.  
  8919.  
  8920. RETURN         None.
  8921.  
  8922.  
  8923. SEE ALSO       pgGetFillPattern, pgGetFillStyle, pgSetFillStyle
  8924.  
  8925.  
  8926. EXAMPLES       Set a fill pattern.
  8927.  
  8928.                C         char pat[8]={0xFF,0x80,0x80,0x80,0xFF,0x08,0x08,0x08};
  8929.                          int color;
  8930.                          color = 1;
  8931.                          pgSetFillPattern( &pat, &color );
  8932.  
  8933.                Pascal    var
  8934.                          pat : array [0..7] of
  8935.                               byte=($FF,$80,$80,$80,$FF,$08,$08,$08);
  8936.                          color : integer;
  8937.                          color := 1;
  8938.                          pgSetFillPattern( pat, color );
  8939.  
  8940.                Basic     DIM pat%(3)
  8941.                          color% = 1
  8942.                          pat%(0)=&HFF80; pat%(1)=&H8080;
  8943.                          pat%(2)=&HFF08; pat%(3)=&H0808;
  8944.                          call pgSetFillPattern( pat%(0), color% )
  8945.  
  8946.                Fortran   character*1 pat(8)
  8947.                          integer*2 color
  8948.                          C -- Lahey Fortran -- C
  8949.                          data pat/Z'FF',Z'80',Z'80',Z'80',
  8950.                         +         Z'FF',Z'08',Z'08',Z'08'/
  8951.                          C -- Microsoft Fortran -- C
  8952.                          data pat/16#FF,16#80,16#80,16#80,
  8953.                         +         16#FF,16#08,16#08,16#08/
  8954.                          color = 1
  8955.                          call pgSetFillPattern( pat, color )
  8956.  
  8957.                Clipper   public pat, color
  8958.                          color = 1
  8959.                          pat = CHR(255)+CHR(128)+CHR(128)+CHR(128)+;
  8960.                               CHR(255)+CHR(8)+CHR(8)+CHR(8)
  8961.                          pgSFPAT( pat, color )
  8962.  
  8963.  
  8964.                              ********************
  8965.                              ** pgSetFillStyle **
  8966.                              ********************
  8967.  
  8968.  
  8969. DESCRIPTION    The pgSetFillStyle function specifies one of twelve predefined
  8970.                fill styles and a fill color to use in all subsequent fill
  8971.                operations.  The default fill style is pgFSOLID.  The default
  8972.                fill color is color index 1.
  8973.  
  8974.                The following functions use the current fill style:  pgCircle,
  8975.                pgEllipse, pgPie, pgPolygon, pgRectangle, and pgSector.
  8976.  
  8977.  
  8978. SYNTAX         C         void pgSetFillStyle( int style, int color );
  8979.  
  8980.                Pascal    PROCEDURE pgSetFillStyle( style, color:integer );
  8981.  
  8982.                Basic     SUB pgSetFillStyle( style%, color% )
  8983.  
  8984.                Fortran   SUBROUTINE pgSetFillStyle( style, color )
  8985.                          INTEGER*2 style, color
  8986.  
  8987.                Clipper   PROCEDURE pgSFSTYLE( style, color )
  8988.  
  8989.  
  8990. PARAMETERS     style     Code specifying a predefined fill pattern.
  8991.                color     Color index of fill color.
  8992.  
  8993.                Predefined fill patterns may be specified using one of the
  8994.                following manifest constants:
  8995.  
  8996.                Constant       Value   Description
  8997.  
  8998.                pgFEMPTY         0     Empty fill
  8999.                pgFSOLID         1     Solid fill with current color
  9000.                pgFLINE          2     Fill with line (---)
  9001.                pgFLTSLASH       3     Fill with /// normal width lines
  9002.                pgFSLASH         4     Fill with /// thick lines
  9003.                pgFBKSLASH       5     Fill with \\\ thick lines
  9004.                pgFLTBKSLASH     6     Fill with \\\ normal width lines
  9005.                pgFHATCH         7     Light hatch fill
  9006.                pgFXHATCH        8     Heavy cross hatch fill
  9007.                pgFINTERLEAVE    9     Interleaving line fill
  9008.                pgFWIDEDOT      10     Fill with widely spaced dots
  9009.                pgFCLOSEDOT     11     Fill with closely spaced dots
  9010.  
  9011.  
  9012. RETURN         None.
  9013.  
  9014.  
  9015. SEE ALSO       pgGetFillPattern, pgGetFillStyle, pgSetFillPattern
  9016.  
  9017.  
  9018. EXAMPLES       Get the current fill style and color, set a different fill
  9019.                style and color and draw a circle, then restore the original
  9020.                fill style and color.
  9021.  
  9022.                C         int fstyle, fcolor;
  9023.                          pgGetFillStyle( &fstyle, &fcolor );
  9024.                          pgSetFillStyle( pgFINTERLEAVE, 1 );
  9025.                          pgCircle( 500, 500, 200, pgFILL );
  9026.                          pgSetFillStyle( fstyle, fcolor );
  9027.  
  9028.                Pascal    var
  9029.                          fstyle, fcolor : integer;
  9030.                          pgGetFillStyle( fstyle, fcolor );
  9031.                          pgSetFillStyle( pgFINTERLEAVE, 1 );
  9032.                          pgCircle( 500, 500, 200, pgFILL );
  9033.                          pgSetFillStyle( fstyle, fcolor );
  9034.  
  9035.                Basic     call pgGetFillStyle( fstyle%, fcolor% )
  9036.                          call pgSetFillStyle( pgFINTERLEAVE, 1 )
  9037.                          call pgCircle( 500, 500, 200, pgFILL )
  9038.                          call pgSetFillStyle( fstyle%, fcolor% )
  9039.  
  9040.                Fortran   integer*2 fstyle, fcolor
  9041.                          pgGetFillStyle( fstyle, fcolor )
  9042.                          call pgSetFillStyle( pgFINTERLEAVE, 1 )
  9043.                          call pgCircle( 500, 500, 200, pgFILL )
  9044.                          call pgSetFillStyle( fstyle, fcolor )
  9045.                Clipper   pgGFSTYLE( @fstyle, @fcolor )
  9046.                          pgSFSTYLE( pgFINTERLEAVE, 1 )
  9047.                          pgCIR( 500, 500, 200, pgFILL )
  9048.                          pgSFSTYLE( fstyle, fcolor )
  9049.  
  9050.  
  9051.                             **********************
  9052.                             ** pgSetLinePattern **
  9053.                             **********************
  9054.  
  9055.  
  9056. DESCRIPTION    The pgSetLinePattern function sets the mask and thickness used
  9057.                for line drawing.  The mask argument is a 16-bit array, where
  9058.                each bit represents a pixel in the line being drawn.  If a bit
  9059.                is 1, the corresponding pixel is set to the color of the line
  9060.                (the current color).  If a bit is 0, the corresponding pixel is
  9061.                left unchanged.  The template is repeated for the entire length
  9062.                of the line.  The default mask is hex FFFF.
  9063.  
  9064.                The following functions use the current line pattern:  pgLine,
  9065.                pgLineRel, pgLineTo, and pgPolyLine.
  9066.  
  9067.  
  9068. SYNTAX         C         void pgSetLinePattern( int pattern, int thickness );
  9069.  
  9070.                Pascal    PROCEDURE pgSetLinePattern( pattern,
  9071.                               thickness:integer );
  9072.  
  9073.                Basic     SUB pgSetLinePattern( pattern%, thickness% )
  9074.  
  9075.                Fortran   SUBROUTINE pgSetLinePattern( pattern, thickness )
  9076.                          INTEGER*2 pattern, thickness
  9077.  
  9078.                Clipper   PROCEDURE pgSLPAT( pattern, thickness )
  9079.  
  9080.  
  9081. PARAMETERS     pattern   Desired line-style pattern.
  9082.                thickness Desired pixel width for line thickness.
  9083.  
  9084.  
  9085. RETURN         None.
  9086.  
  9087.  
  9088. SEE ALSO       pgGetLinePattern, pgGetLineStyle, pgSetLineStyle
  9089.  
  9090.  
  9091. EXAMPLES       Set the line pattern to be hex 0F0F with a line thickness of 5.
  9092.  
  9093.                C         pgSetLinePattern( 0x0F0F, 5 );
  9094.  
  9095.                Pascal    pgSetLinePattern( $0F0F, 5 );
  9096.  
  9097.                Basic     call pgSetLinePattern( &H0F0F, 5 )
  9098.  
  9099.                Fortran   call pgSetLinePattern( 3855, 5 )
  9100.  
  9101.                Clipper   pgSLPAT( 3855, 5 )
  9102.  
  9103.  
  9104.                              ********************
  9105.                              ** pgSetLineStyle **
  9106.                              ********************
  9107.  
  9108.  
  9109. DESCRIPTION    The pgSetLineStyle function specifies one of nine predefined
  9110.                line styles and a line thickness value to use in all subsequent
  9111.                line drawing operations.  The default line style is pgLSOLID.
  9112.                The default line thickness is 1.
  9113.  
  9114.                The following functions use the current line style:  pgLine,
  9115.                pgLineRel, pgLineTo, and pgPolyLine.
  9116.  
  9117.  
  9118. SYNTAX         C         void pgSetLineStyle( int style, int thickness );
  9119.  
  9120.                Pascal    PROCEDURE pgSetLineStyle( style, thickness:integer );
  9121.  
  9122.                Basic     SUB pgSetLineStyle( style%, thickness% )
  9123.  
  9124.                Fortran   SUBROUTINE pgSetLineStyle( style, thickness )
  9125.                          INTEGER*2 style, thickness
  9126.  
  9127.                Clipper   PROCEDURE pgSLSTYLE( style, thickness )
  9128.  
  9129.  
  9130. PARAMETERS     style     Code specifying a predefined line style.
  9131.                thickness Thickness of lines in pixels.
  9132.  
  9133.                Predefined line styles may be specified using one of the
  9134.                following manifest constants:
  9135.  
  9136.                Constant       Value   Description
  9137.  
  9138.                pgLSOLID       0       Solid line.
  9139.                pgLHUGEDASH    1       Huge dash line.
  9140.                pgLBIGDASH     2       Big dash line.
  9141.                pgLMEDDASH     3       Medium dash line.
  9142.                pgLSMALLDASH   4       Small dash line.
  9143.                pgLWIDEDOT     5       Wide dot line.
  9144.                pgLCLOSEDOT    6       Close dot line.
  9145.                pgLDASHDOT     7       Dash dot line.
  9146.                pgLCENTER      8       Center line.
  9147.  
  9148.  
  9149. RETURN         None.
  9150.  
  9151.  
  9152. SEE ALSO       pgGetLinePattern, pgGetLineStyle, pgGetLineWeight,
  9153.                pgSetLinePattern, pgSetLineWeight
  9154.  
  9155.  
  9156. EXAMPLES       Get the current line style and thickness, set a different line
  9157.                style and thickness and draw a cross hair, then restore the
  9158.                original line style and thickness.
  9159.  
  9160.                C         int lstyle, lthickness;
  9161.                          pgGetLineStyle( &lstyle, <hickness );
  9162.                          pgSetLineStyle( pgLCENTER, 7 );
  9163.                          pgLine( 500, 400, 700, 400 );
  9164.                          pgLine( 600, 300, 600, 500 );
  9165.                          pgSetLineStyle( lstyle, lthickness );
  9166.  
  9167.                Pascal    var
  9168.                          lstyle, lthickness : integer;
  9169.                          pgGetLineStyle( lstyle, lthickness );
  9170.                          pgSetLineStyle( pgLCENTER, 7 );
  9171.                          pgLine( 500, 400, 700, 400 );
  9172.                          pgLine( 600, 300, 600, 500 );
  9173.                          pgSetLineStyle( lstyle, lthickness );
  9174.  
  9175.                Basic     call pgGetLineStyle( lstyle%, lthickness% )
  9176.                          call pgSetLineStyle( pgLCENTER, 7 )
  9177.                          call pgLine( 500, 400, 700, 400 )
  9178.                          call pgLine( 600, 300, 600, 500 )
  9179.                          call pgSetLineStyle( lstyle%, lthickness% )
  9180.  
  9181.                Fortran   integer*2 lstyle, lthickness
  9182.                          call pgGetLineStyle( lstyle, lthickness )
  9183.                          call pgSetLineStyle( pgLCENTER, 7 )
  9184.                          call pgLine( 500, 400, 700, 400 )
  9185.                          call pgLine( 600, 300, 600, 500 )
  9186.                          call pgSetLineStyle( lstyle, lthickness )
  9187.  
  9188.                Clipper   pgGLSTYLE( @lstyle, @lthickness )
  9189.                          pgSLSTYLE( pgLCENTER, 7 )
  9190.                          pgLIN( 500, 400, 700, 400 )
  9191.                          pgLIN( 600, 300, 600, 500 )
  9192.                          pgSLSTYLE( lstyle, lthickness )
  9193.  
  9194.  
  9195.                              *********************
  9196.                              ** pgSetLineWeight **
  9197.                              *********************
  9198.  
  9199.  
  9200. DESCRIPTION    The pgSetLineWeight function is used to specify a weighting
  9201.                factor for line drawing.  This is an alternate method of
  9202.                generating lines of varying thickness.  The weighting factor
  9203.                represents the number of thousandths of an inch for the line
  9204.                width.  For example, 1=0.001", 6=0.006", etc.  The actual line
  9205.                width will be rounded off somewhat due to your printer's
  9206.                resolution.
  9207.  
  9208.                The advantage of using this function is that your plots will
  9209.                look very similar regardless of the resolution of the printer.
  9210.                Line widths specified with the pgSetLineStyle will appear as
  9211.                different widths when printed at different resolutions (i.e. a
  9212.                line with a thickness other than 1 will appear twice as wide
  9213.                when printed at 75 dpi as when printed at 150 dpi).
  9214.  
  9215.                The pgSetLineStyle function also sets the line thickness in
  9216.                pixels.  You must call pgSetLineWeight after calling
  9217.                pgSetLineStyle in order for line weight to take effect.  The
  9218.                pgSetLineWeight function is effective until pgSetLineStyle is
  9219.                called again.
  9220.  
  9221.  
  9222. SYNTAX         C         void pgSetLineWeight( int weight );
  9223.  
  9224.                Pascal    PROCEDURE pgSetLineWeight( weight:integer );
  9225.  
  9226.                Basic     SUB pgSetLineWeight( weight% )
  9227.  
  9228.                Fortran   SUBROUTINE pgSetLineWeight( weight )
  9229.                          INTEGER*2 weight
  9230.  
  9231.                Clipper   PROCEDURE pgSLWGT( weight )
  9232.  
  9233.  
  9234. PARAMETERS     weight    Thickness of the line specified in thousandths of an
  9235.                          inch (e.g. 1=0.001", 100=0.1", etc.).
  9236.  
  9237.  
  9238. RETURN         None.
  9239.  
  9240.  
  9241. SEE ALSO       pgGetLinePattern, pgGetLineStyle, pgGetLineWeight,
  9242.                pgSetLinePattern, pgSetLineStyle
  9243.  
  9244.  
  9245. EXAMPLES       Set the line weight to draw lines which are approximately 0.05"
  9246.                wide.
  9247.  
  9248.                C         pgSetLineWeight( 50 );
  9249.                          pgLine( 0, 0, 1000, 1000 );
  9250.  
  9251.                Pascal    pgSetLineWeight( 50 );
  9252.                          pgLine( 0, 0, 1000, 1000 );
  9253.  
  9254.                Basic     call pgSetLineWeight( 50 )
  9255.                          call pgLine( 0, 0, 1000, 1000 )
  9256.  
  9257.                Fortran   call pgSetLineWeight( 50 )
  9258.                          call pgLine( 0, 0, 1000, 1000 )
  9259.  
  9260.                Clipper   pgSLWGT( 50 )
  9261.                          pgLIN( 0, 0, 1000, 1000 )
  9262.  
  9263.  
  9264.                              *******************
  9265.                              ** pgSetPageForm **
  9266.                              *******************
  9267.  
  9268.  
  9269. DESCRIPTION    The pgSetPageForm function allows you to specify the orientation
  9270.                of the paper as portrait or landscape.  You must first load a
  9271.                device driver with the pgLoadDevInfo function.  There is no
  9272.                default setting for page form.
  9273.  
  9274.                This and other page functions merely allow you to select a
  9275.                specific set of print parameters in order to return information
  9276.                such as paper size, resolution, number of colors, number of bit
  9277.                planes, etc.  Setting a page orientation does not mean your
  9278.                drawings will automatically be printed in that form.  You must
  9279.                select the page orientation at print time.
  9280.  
  9281.  
  9282. SYNTAX         C         void pgSetPageForm( int form );
  9283.  
  9284.                Pascal    PROCEDURE pgSetPageForm( form:integer );
  9285.  
  9286.                Basic     SUB pgSetPageForm( form% )
  9287.  
  9288.                Fortran   SUBROUTINE pgSetPageForm( form )
  9289.                          INTEGER*2 form
  9290.  
  9291.                Clipper   PROCEDURE pgSPFORM( form )
  9292.  
  9293.  
  9294. PARAMETERS     form      The orientation of the paper.  The orientation may be
  9295.                          specified using the following manifest constants.
  9296.  
  9297.                          Constant       Value
  9298.  
  9299.                          pgPORTRAIT       0
  9300.                          pgLANDSCAPE      1
  9301.  
  9302.  
  9303. RETURN         None.
  9304.  
  9305.  
  9306. SEE ALSO       pgLoadDevInfo, pgSetPageMargins, pgSetPageSize
  9307.  
  9308.  
  9309. EXAMPLES       Load the 'HPLJET' device driver and set the page orientation to
  9310.                LANDSCAPE.
  9311.  
  9312.                C         int ierr;
  9313.                          ierr = pgLoadDevInfo( "HPLJET" );
  9314.                          pgSetPageForm( pgLANDSCAPE );
  9315.  
  9316.                Pascal    var
  9317.                          ierr : integer;
  9318.                          ierr := pgLoadDevInfo( 'HPLJET' );
  9319.                          pgSetPageForm( pgLANDSCAPE );
  9320.  
  9321.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  9322.                          call pgSetPageForm( pgLANDSCAPE )
  9323.  
  9324.                Fortran   integer*2 ierr
  9325.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  9326.                          call pgSetPageForm( pgLANDSCAPE )
  9327.  
  9328.                Clipper   ierr = pgLDINFO( "HPLJET" )
  9329.                          pgSPFORM( pgLANDSCAPE )
  9330.  
  9331.  
  9332.                             **********************
  9333.                             ** pgSetPageMargins **
  9334.                             **********************
  9335.  
  9336.  
  9337. DESCRIPTION    The pgSetPageMargins function allows you to specify the left,
  9338.                top, right, and bottom page margins.  You must first load a
  9339.                device driver with the pgLoadDevInfo function.  There are no
  9340.                default settings for page margins.
  9341.  
  9342.                Page margins are specified in units of 100=1" (e.g., 150=1.5",
  9343.                50=0.5", etc.).  No internal checking is performed to insure
  9344.                correct margins.  For example, if the paper width is 8.5" wide,
  9345.                you may not specify left and right margins which are 5" each
  9346.                (presumes paper is at least 10" wide).
  9347.  
  9348.                Note that the bottom page margin is only meaningful if you have
  9349.                specified full page size.  At half or quarter page size, the
  9350.                bottom margin is not applicable.
  9351.  
  9352.                This and other page functions merely allow you to select a
  9353.                specific set of printer parameters in order to return
  9354.                information such as paper size, resolution, number of colors,
  9355.                number of bit planes, etc.  Selecting a set of page margins
  9356.                does not mean your drawings will automatically be printed in
  9357.                that form.  You must select the page margins at print time.
  9358.  
  9359.  
  9360. SYNTAX         C         void pgSetPageMargins( int left, int top,
  9361.                               int right, int bottom );
  9362.  
  9363.                Pascal    PROCEDURE pgSetPageMargins( left, top,
  9364.                               right, bottom:integer );
  9365.  
  9366.                Basic     SUB pgSetPageMargins( left%, top%, right%, bottom% )
  9367.  
  9368.                Fortran   SUBROUTINE pgSetPageMargins( left, top,
  9369.                               right, bottom )
  9370.                          INTEGER*2 left, top, right, bottom
  9371.  
  9372.                Clipper   PROCEDURE pgSPMARGIN( left, top, right, bottom )
  9373.  
  9374.  
  9375. PARAMETERS     left      Left paper margins.
  9376.                top       Top paper margin.
  9377.                right     Right paper margin.
  9378.                bottom    Bottom paper margin.
  9379.  
  9380.  
  9381. RETURN         None.
  9382.  
  9383.  
  9384. SEE ALSO       pgLoadDevInfo, pgSetPageForm, pgSetPageSize
  9385.  
  9386.  
  9387. EXAMPLES       Load the 'HPLJET' device driver and set the left, top, right,
  9388.                and bottom page margins to 1.5", 1.0", 1.5", and 2.0",
  9389.                respectively.
  9390.  
  9391.                C         int ierr;
  9392.                          ierr = pgLoadDevInfo( "HPLJET" );
  9393.                          pgSetPageMargins( 150, 100, 150, 200 );
  9394.  
  9395.                Pascal    var
  9396.                          ierr : integer;
  9397.                          ierr := pgLoadDevInfo( 'HPLJET' );
  9398.                          pgSetPageMargins( 150, 100, 150, 200 );
  9399.  
  9400.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  9401.                          call pgSetPageMargins( 150, 100, 150, 200 )
  9402.  
  9403.                Fortran   integer*2 ierr
  9404.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  9405.                          call pgSetPageMargins( 150, 100, 150, 200 )
  9406.  
  9407.                Clipper   ierr = pgLDINFO( "HPLJET" )
  9408.                          pgSPMARGIN( 150, 100, 150, 200 )
  9409.  
  9410.  
  9411.                              *******************
  9412.                              ** pgSetPageSize **
  9413.                              *******************
  9414.  
  9415.  
  9416. DESCRIPTION    The pgSetPageSize function allows you to specify the portion of
  9417.                the paper to use (FULL, HALF, or QUARTER page).  You must first
  9418.                load a device driver with the pgLoadDevInfo function.  There is
  9419.                no default setting for page size.
  9420.  
  9421.                This and other page functions merely allow you to select a
  9422.                specific set of printer parameters in order to return
  9423.                information such as paper size, resolution, number of colors,
  9424.                number of bit planes, etc.  Selecting a page size does not mean
  9425.                your drawings will automatically be printed in that form.
  9426.                You must select the page size at print time.
  9427.  
  9428.  
  9429. SYNTAX         C         void pgSetPageSize( int size );
  9430.  
  9431.                Pascal    PROCEDURE pgSetPageSize( size:integer );
  9432.  
  9433.                Basic     SUB pgSetPageSize( size% )
  9434.  
  9435.                Fortran   SUBROUTINE pgSetPageSize( size )
  9436.                          INTEGER*2 size
  9437.  
  9438.                Clipper   PROCEDURE pgSPSIZE( size )
  9439.  
  9440.  
  9441. PARAMETERS     size      The size of the paper.  Page size may be specified
  9442.                          using the following manifest constants.
  9443.  
  9444.                          Constant       Value
  9445.  
  9446.                          pgHALFPAGE       0
  9447.                          pgFULLPAGE       1
  9448.                          pgQUARTERPAGE    2
  9449.  
  9450.  
  9451. RETURN         None.
  9452.  
  9453.  
  9454. SEE ALSO       pgLoadDevInfo, pgSetPageMargins, pgSetPageForm
  9455.  
  9456.  
  9457. EXAMPLES       Load the 'HPLJET' device driver and set the page size to FULL.
  9458.  
  9459.                C         int ierr;
  9460.                          ierr = pgLoadDevInfo( "HPLJET" );
  9461.                          pgSetPageSize( pgFULLPAGE );
  9462.  
  9463.                Pascal    var
  9464.                          ierr : integer;
  9465.                          ierr := pgLoadDevInfo( 'HPLJET' );
  9466.                          pgSetPageSize( pgFULLPAGE );
  9467.  
  9468.                Basic     ierr% = pgLoadDevInfo%( "HPLJET" )
  9469.                          call pgSetPageSize( pgFULLPAGE )
  9470.  
  9471.                Fortran   integer*2 ierr
  9472.                          ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
  9473.                          call pgSetPageSize( pgFULLPAGE )
  9474.  
  9475.                Clipper   ierr = pgLDINFO( "HPLJET" )
  9476.                          pgSPSIZE( pgFULLPAGE )
  9477.  
  9478.  
  9479.                               ******************
  9480.                               ** pgSetPalette **
  9481.                               ******************
  9482.  
  9483.  
  9484. DESCRIPTION    The pgSetPalette function is used to associate the color
  9485.                specified in the argument index with the pixel value color.
  9486.                The maximum possible value of the argument color depends on the
  9487.                number of colors that can be simultaneously displayed on the
  9488.                printer you are using.  This function is only valid when
  9489.                printing to a color printer.  For example, for an HP PaintJet,
  9490.                there are eight colors in high resolution mode, therefore,
  9491.                color values can range from 0 to 7.  You can obtain this
  9492.                information by calling pgGetDevColors.
  9493.  
  9494.  
  9495. SYNTAX         C         void pgSetPalette( int index, int color );
  9496.  
  9497.                Pascal    PROCEDURE pgSetPalette( index, color:integer );
  9498.  
  9499.                Basic     SUB pgSetPalette( index%, color% )
  9500.  
  9501.                Fortran   SUBROUTINE pgSetPalette( index, color )
  9502.                          INTEGER*2 index, color
  9503.  
  9504.                Clipper   PROCEDURE pgSPAL( index, color )
  9505.  
  9506.  
  9507. PARAMETERS     index     Color index to be redefined.
  9508.                color     Color to be associated with the index.
  9509.  
  9510.  
  9511. RETURN         None.
  9512.  
  9513.  
  9514. SEE ALSO       pgGetDevColors, pgSetColor, pgSetFillPattern, pgSetFillStyle,
  9515.                pgSetRgbPalette
  9516.  
  9517.  
  9518. EXAMPLES       Draw a line using color index 3, use the pgSetPalette function
  9519.                to reverse the definitions of color index 3 and 4 such that
  9520.                color 4 is associated with index 3 and color 3 is associated
  9521.                with index 4, reset the color to index 3, then draw another
  9522.                line.
  9523.  
  9524.                C         pgSetColor( 3 );
  9525.                          pgLine( 0, 0, pgGetMaxX(), pgGetMaxY() );
  9526.                          pgSetPalette( 3, 4 );
  9527.                          pgSetPalette( 4, 3 );
  9528.                          pgSetColor( 3 );
  9529.                          pgLine( 0, pgGetMaxY(), pgGetMaxX(), 0 );
  9530.  
  9531.                Pascal    pgSetColor( 3 );
  9532.                          pgLine( 0, 0, pgGetMaxX, pgGetMaxY );
  9533.                          pgSetPalette( 3, 4 );
  9534.                          pgSetPalette( 4, 3 );
  9535.                          pgSetColor( 3 );
  9536.                          pgLine( 0, pgGetMaxY, pgGetMaxX, 0 );
  9537.  
  9538.                Basic     call pgSetColor( 3 )
  9539.                          call pgLine( 0, 0, pgGetMaxX%, pgGetMaxY% )
  9540.                          call pgSetPalette( 3, 4 )
  9541.                          call pgSetPalette( 4, 3 )
  9542.                          call pgSetColor( 3 )
  9543.                          call pgLine( 0, pgGetMaxY%, pgGetMaxX%, 0 )
  9544.  
  9545.                Fortran   call pgSetColor( 3 )
  9546.                          call pgLine( 0, 0, pgGetMaxX, pgGetMaxY )
  9547.                          call pgSetPalette( 3, 4 )
  9548.                          call pgSetPalette( 4, 3 )
  9549.                          call pgSetColor( 3 )
  9550.                          call pgLine( 0, pgGetMaxY, pgGetMaxX, 0 )
  9551.  
  9552.                Clipper   pgSCOLOR( 3 )
  9553.                          pgLIN( 0, 0, pgGetMaxX(), pgGetMaxY() )
  9554.                          pgSPAL( 3, 4 )
  9555.                          pgSPAL( 4, 3 )
  9556.                          pgSCOLOR( 3 )
  9557.                          pgLIN( 0, pgGetMaxY(), pgGetMaxX(), 0 )
  9558.  
  9559.  
  9560.                                ****************
  9561.                                ** pgSetPixel **
  9562.                                ****************
  9563.  
  9564.  
  9565. DESCRIPTION    The pgSetPixel function sets a pixel at the coordinate (x,y) to
  9566.                the specified color.  The coordinate is specified in the
  9567.                viewport coordinate system.  The cursor position is not updated
  9568.                after drawing.
  9569.  
  9570.  
  9571. SYNTAX         C         void pgSetPixel( int x, int y, int color );
  9572.  
  9573.                Pascal    PROCEDURE pgSetPixel( x, y, color:integer );
  9574.  
  9575.                Basic     SUB pgSetPixel( x%, y%, color% )
  9576.  
  9577.                Fortran   SUBROUTINE pgSetPixel( x, y, color )
  9578.                          INTEGER*2 x, y, color
  9579.  
  9580.                Clipper   PROCEDURE pgSETPIX( x, y, color )
  9581.  
  9582.  
  9583. PARAMETERS     x,y       Coordinate of target pixel.
  9584.                color     Color to light target pixel.
  9585.  
  9586.  
  9587. RETURN         None.
  9588.  
  9589.  
  9590. SEE ALSO       pgLine, pgLineTo, pgLineRel
  9591.  
  9592.  
  9593. EXAMPLES       Set the pixel at coordinate (100,200) to color 1.
  9594.  
  9595.                C         pgSetPixel( 100, 200, 1 );
  9596.  
  9597.                Pascal    pgSetPixel( 100, 200, 1);
  9598.  
  9599.                Basic     call pgSetPixel( 100, 200, 1 )
  9600.  
  9601.                Fortran   call pgSetPixel( 100, 200, 1 )
  9602.  
  9603.                Clipper   pgSETPIX( 100, 200, 1 )
  9604.  
  9605.  
  9606.                              *********************
  9607.                              ** pgSetRgbPalette **
  9608.                              *********************
  9609.  
  9610.  
  9611. DESCRIPTION    The pgSetRgbPalette function is used to explicitly define how a
  9612.                pixel value or color number maps to an actual printed color.
  9613.                The argument index is the color number between 0 and 255 that
  9614.                is being defined.  The arguments red, green, and blue,
  9615.                respectively, are used to specify the level of the red, green,
  9616.                and blue components of the color corresponding to the pixel
  9617.                value index.
  9618.  
  9619.                Note that eight bits of each color component, red, green, and
  9620.                blue, are used.  Therefore, there are 28=256 possible levels of
  9621.                red, green, and blue in each color which allow for a total of
  9622.                256x256x256 = 16,777,216 possible colors.
  9623.  
  9624.                The actual number of colors available to you is dependent on
  9625.                the printer.  The ToolKit lets you specify RGB color values in
  9626.                a somewhat device independent fashion.  At print time, the
  9627.                ToolKit printing utilities convert the RGB color palette
  9628.                requests into device specific requests, or the RGB information
  9629.                is not used if the output device does not support an RGB
  9630.                palette.  As of this writing, the PaintJet, PaintJet/XL, and
  9631.                PostScript printers are the only printers that support an RGB
  9632.                palette.  The pgSetRgbPalette information is not used if you
  9633.                print on any other output device.
  9634.  
  9635.  
  9636. SYNTAX         C         void pgSetRgbPalette( int index, int red, int green,
  9637.                               int blue );
  9638.  
  9639.                Pascal    PROCEDURE pgSetRgbPalette( index, red, green,
  9640.                               blue:integer );
  9641.  
  9642.                Basic     SUB pgSetRgbPalette( index%, red%, green%, blue% )
  9643.  
  9644.                Fortran   SUBROUTINE pgSetRgbPalette( index, red, green, blue )
  9645.                          INTEGER*2 index, red, green, blue
  9646.  
  9647.                Clipper   PROCEDURE pgSRGB( index, red, green, blue )
  9648.  
  9649.  
  9650. PARAMETERS     index     Color index to be defined.
  9651.                red       Value of red component of the color.
  9652.                green     Value of green component of the color.
  9653.                blue      Value of blue component of the color.
  9654.  
  9655.  
  9656. RETURN         None.
  9657.  
  9658.  
  9659. SEE ALSO       pgGetDevColors, pgSetPalette
  9660.  
  9661.  
  9662. EXAMPLES       Define color indices 1, 2, and 3 to be red, green, and blue,
  9663.                respectively.
  9664.  
  9665.                C         pgSetRgbPalette( 1, 255, 0, 0 );
  9666.                          pgSetRgbPalette( 2, 0, 255, 0 );
  9667.                          pgSetRgbPalette( 3, 0, 0, 255 );
  9668.  
  9669.                Pascal    pgSetRgbPalette( 1, 255, 0, 0 );
  9670.                          pgSetRgbPalette( 2, 0, 255, 0 );
  9671.                          pgSetRgbPalette( 3, 0, 0, 255 );
  9672.  
  9673.                Basic     call pgSetRgbPalette( 1, 255, 0, 0 )
  9674.                          call pgSetRgbPalette( 2, 0, 255, 0 )
  9675.                          call pgSetRgbPalette( 3, 0, 0, 255 )
  9676.  
  9677.                Fortran   call pgSetRgbPalette( 1, 255, 0, 0 )
  9678.                          call pgSetRgbPalette( 2, 0, 255, 0 )
  9679.                          call pgSetRgbPalette( 3, 0, 0, 255 )
  9680.  
  9681.                Clipper   pgSRGB( 1, 255, 0, 0 )
  9682.                          pgSRGB( 2, 0, 255, 0 )
  9683.                          pgSRGB( 3, 0, 0, 255 )
  9684.  
  9685.  
  9686.                             **********************
  9687.                             ** pgSetTextBolding **
  9688.                             **********************
  9689.  
  9690.  
  9691. DESCRIPTION    The pgSetTextBolding function sets the current text bolding
  9692.                parameter.  The bolding parameter simply sets the line thickness
  9693.                to use when drawing text.  The default level of bolding is 1.
  9694.  
  9695.  
  9696. SYNTAX         C         void pgSetTextBolding( int bold );
  9697.  
  9698.                Pascal    PROCEDURE pgSetTextBolding( bold:integer );
  9699.  
  9700.                Basic     SUB pgSetTextBolding( bold% )
  9701.  
  9702.                Fortran   SUBROUTINE pgSetTextBolding( bold )
  9703.                          INTEGER*2 bold
  9704.  
  9705.                Clipper   PROCEDURE pgSTBOLD( bold )
  9706.  
  9707.  
  9708. PARAMETERS     bold      Bolding level.
  9709.  
  9710.  
  9711. RETURN         None.
  9712.  
  9713.  
  9714. SEE ALSO       pgGetTextBolding
  9715.  
  9716.  
  9717. EXAMPLES       Set text bolding to five times the current value, then display
  9718.                the text "Bold Text".
  9719.  
  9720.                C         pgSetTextStyle( pgTRIPLEX );
  9721.                          pgSetTextBolding( 5 * pgGetTextBolding() );
  9722.                          pgDrawTextXY( 100, 100, "Bold Text" );
  9723.  
  9724.                Pascal    pgSetTextStyle( pgTRIPLEX );
  9725.                          pgSetTextBolding( 5 * pgGetTextBolding );
  9726.                          pgDrawTextXY( 100, 100, 'Bold Text' );
  9727.  
  9728.                Basic     call pgSetTextStyle( pgTRIPLEX )
  9729.                          call pgSetTextBolding( 5 * pgGetTextBolding% )
  9730.                          call pgDrawTextXY( 100, 100, "Bold Text" )
  9731.  
  9732.                Fortran   call pgSetTextStyle( pgTRIPLEX )
  9733.                          call pgSetTextBolding( 5 * pgGetTextBolding )
  9734.                          call pgDrawTextXY( 100, 100, 'Bold Text'//char(0) )
  9735.  
  9736.                Clipper   pgSTSTYLE( pgTRIPLEX )
  9737.                          pgSTBOLD( 5 * pgGTBOLD() )
  9738.                          pgDTXY( 100, 100, "Bold Text" )
  9739.  
  9740.  
  9741.                             **********************
  9742.                             ** pgSetTextJustify **
  9743.                             **********************
  9744.  
  9745.  
  9746. DESCRIPTION    The pgSetTextJustify function is used to specify the horizontal
  9747.                and vertical justification of displayed text strings.  Text
  9748.                justification is relative to the current cursor position when
  9749.                using pgDrawText and relative to the specified text position
  9750.                passed to the pgDrawTextXY function.
  9751.  
  9752.                pgLEFT and pgRIGHT justification applies to the direction in
  9753.                which the text is drawn, regardless of whether it is displayed
  9754.                horizontally or vertically.  pgTOP and pgBOTTOM justification
  9755.                applies to the direction perpendicular to the direction in
  9756.                which the text is drawn.
  9757.  
  9758.                The default justification is (pgLEFT, pgBOTTOM).
  9759.  
  9760.  
  9761. SYNTAX         C         void pgSetTextJustify( int horiz, int vert );
  9762.  
  9763.                Pascal    PROCEDURE pgSetTextJustify( horiz, vert:integer );
  9764.  
  9765.                Basic     SUB pgSetTextJustify( horiz%, vert% )
  9766.  
  9767.                Fortran   SUBROUTINE pgSetTextJustify( horiz, vert )
  9768.                          INTEGER*2 horiz, vert
  9769.  
  9770.                Clipper   PROCEDURE pgSTJUST( horiz, vert )
  9771.  
  9772.  
  9773. PARAMETERS     horiz     Specifies horizontal justification of text.
  9774.                vert      Specifies vertical justification of text.
  9775.  
  9776.                Valid text justification manifest constants are as follows:
  9777.  
  9778.                Constant       Value     Description
  9779.  
  9780.                pgLEFT           0       Left justified
  9781.                pgRIGHT          2       Right justified
  9782.                pgCENTER         1       Center justified
  9783.                pgTOP            2       Top justified
  9784.                pgBOTTOM         0       Bottom justified
  9785.  
  9786.  
  9787. RETURN         None.
  9788.  
  9789.  
  9790. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextJustify
  9791.  
  9792.  
  9793. EXAMPLES       Draw a cross hair, then set the text justification to be right
  9794.                justified horizontally and bottom justified vertically and
  9795.                display the text "Hello World".
  9796.  
  9797.                C         pgLine( 0, 500, 1000, 500 );
  9798.                          pgLine( 500, 0, 500, 1000 );
  9799.                          pgSetTextJustify( pgRIGHT, pgBOTTOM );
  9800.                          pgDrawTextXY( 500, 500, "Hello World" );
  9801.  
  9802.                Pascal    pgLine( 0, 500, 1000, 500 );
  9803.                          pgLine( 500, 0, 500, 1000 );
  9804.                          pgSetTextJustify( pgRIGHT, pgBOTTOM );
  9805.                          pgDrawTextXY( 500, 500, 'Hello World' );
  9806.  
  9807.                Basic     call pgLine( 0, 500, 1000, 500 )
  9808.                          call pgLine( 500, 0, 500, 1000 )
  9809.                          call pgSetTextJustify( pgRIGHT, pgBOTTOM )
  9810.                          call pgDrawTextXY( 500, 500, "Hello World" )
  9811.  
  9812.                Fortran   call pgLine( 0, 500, 1000, 500 )
  9813.                          call pgLine( 500, 0, 500, 1000 )
  9814.                          call pgSetTextJustify( pgRIGHT, pgBOTTOM )
  9815.                          call pgDrawTextXY( 500, 500, 'Hello World'//char(0) )
  9816.                Clipper   pgLIN( 0, 500, 1000, 500 )
  9817.                          pgLIN( 500, 0, 500, 1000 )
  9818.                          pgSTJUST( pgRIGHT, pgBOTTOM )
  9819.                          pgDTXY( 500, 500, "Hello World" )
  9820.  
  9821.  
  9822.                             *********************
  9823.                             ** pgSetTextOrient **
  9824.                             *********************
  9825.  
  9826.  
  9827. DESCRIPTION    The pgSetTextOrient function is used to specify a vector
  9828.                indicating the direction of text display.  The default
  9829.                orientation is (1,0).
  9830.  
  9831.  
  9832. SYNTAX         C         void pgSetTextOrient( int x, int y );
  9833.  
  9834.                Pascal    PROCEDURE pgSetTextOrient( x, y:integer );
  9835.  
  9836.                Basic     SUB pgSetTextOrient( x%, y% )
  9837.  
  9838.                Fortran   SUBROUTINE pgSetTextOrient( x, y )
  9839.                          INTEGER*2 x, y
  9840.  
  9841.                Clipper   PROCEDURE pgSTORIEN( x, y )
  9842.  
  9843.  
  9844. PARAMETERS     x,y       Vector specifying the text orientation.
  9845.  
  9846.                Currently, only four text orientations are allowed.  These are
  9847.                summarized as follows:
  9848.  
  9849.                (x, y)    Description
  9850.  
  9851.                ( 1, 0)   Text displayed horizontally from left to right
  9852.                ( 0, 1)   Text displayed vertically from bottom to top
  9853.                (-1, 0)   Text displayed horizontally from right to left
  9854.                          (inverted)
  9855.                ( 0,-1)   Text displayed vertically from top to bottom
  9856.  
  9857.  
  9858. RETURN         None.
  9859.  
  9860.  
  9861. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextOrient
  9862.  
  9863.  
  9864. EXAMPLES       Set the text orientation for upside down drawing, then display
  9865.                the text "Upside-Down".
  9866.  
  9867.                C         pgSetTextOrient( -1, 0 );
  9868.                          pgDrawTextXY( 600, 100, "Upside-Down" );
  9869.  
  9870.                Pascal    pgSetTextOrient( -1, 0 );
  9871.                          pgDrawTextXY( 600, 100, 'Upside-Down' );
  9872.  
  9873.                Basic     call pgSetTextOrient( -1, 0 )
  9874.                          call pgDrawTextXY( 600, 100, "Upside-Down" )
  9875.  
  9876.                Fortran   call pgSetTextOrient( -1, 0 )
  9877.                          call pgDrawTextXY( 600, 100, 'Upside-Down'//char(0) )
  9878.  
  9879.                Clipper   pgSTORIEN( -1, 0 )
  9880.                          pgDTXY( 600, 100, "Upside-Down" )
  9881.  
  9882.  
  9883.                             **********************
  9884.                             ** pgSetTextScaling **
  9885.                             **********************
  9886.  
  9887.  
  9888. DESCRIPTION    The pgSetTextScaling function is used to specify a separate
  9889.                horizontal and vertical scale factor for displaying text
  9890.                strings.
  9891.  
  9892.                The horizontal scale factor is computed as (mx/dx) and is always
  9893.                applied to the direction in which text is drawn, regardless of
  9894.                whether it is displayed horizontally or vertically.  The
  9895.                vertical scale factor is computed as (my/dy) and is always
  9896.                applied to the direction perpendicular to the direction in
  9897.                which the text is drawn.
  9898.  
  9899.                The default scale factors are 1:1 for both directions.
  9900.  
  9901.                The pgSetTextScaling function affects the values returned from
  9902.                the pgGetTextHeight and pgGetTextLength functions.  When
  9903.                printing on PostScript printers using PGL2PS this function is
  9904.                only approximate and may be reliable.
  9905.  
  9906.  
  9907. SYNTAX         C         void pgSetTextScaling( int mx, int dx,
  9908.                               int my, int dy );
  9909.  
  9910.                Pascal    PROCEDURE pgSetTextScaling( mx, dx,
  9911.                               my, dy:integer );
  9912.  
  9913.                Basic     SUB pgSetTextScaling( mx%, dx%, my%, dy% )
  9914.  
  9915.                Fortran   SUBROUTINE pgSetTextScaling( mx, dx, my, dy )
  9916.                          INTEGER*2 mx, dx, my, dy
  9917.  
  9918.                Clipper   PROCEDURE pgSTSCALE( mx, dx, my, dy )
  9919.  
  9920.  
  9921. PARAMETERS     mx,dx     Horizontal scale factor.
  9922.                my,dy     Vertical scale factor.
  9923.  
  9924.  
  9925. RETURN         None.
  9926.  
  9927.  
  9928. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
  9929.                pgGetTextScaling
  9930.  
  9931.  
  9932. EXAMPLES       Set the text scale factor to draw tall and thin text, then
  9933.                short and fat text.
  9934.  
  9935.                C         pgSetTextScaling( 1, 1, 3, 1 );
  9936.                          pgDrawTextXY( 100, 100, "Tall and Thin" );
  9937.                          pgSetTextScaling( 3, 1, 1, 1 );
  9938.                          pgDrawTextXY( 100, 400, "Short and Fat" );
  9939.  
  9940.                Pascal    pgSetTextScaling( 1, 1, 3, 1 );
  9941.                          pgDrawTextXY( 100, 100, 'Tall and Thin' );
  9942.                          pgSetTextScaling( 3, 1, 1, 1 );
  9943.                          pgDrawTextXY( 100, 400, 'Short and Fat' );
  9944.  
  9945.                Basic     call pgSetTextScaling( 1, 1, 3, 1 )
  9946.                          call pgDrawTextXY( 100, 100, "Tall and Thin" )
  9947.                          call pgSetTextScaling( 3, 1, 1, 1 )
  9948.                          call pgDrawTextXY( 100, 400, "Short and Fat" )
  9949.  
  9950.                Fortran   call pgSetTextScaling( 1, 1, 3, 1 )
  9951.                          call pgDrawTextXY(100, 100, 'Tall and Thin'//char(0))
  9952.                          call pgSetTextScaling( 3, 1, 1, 1 )
  9953.                          call pgDrawTextXY(100, 400, 'Short and Fat'//char(0))
  9954.  
  9955.                Clipper   pgSTSCALE( 1, 1, 3, 1 )
  9956.                          pgDTXY( 100, 100, "Tall and Thin" )
  9957.                          pgSTSCALE( 3, 1, 1, 1 )
  9958.                          pgDTXY( 100, 400, "Short and Fat" )
  9959.  
  9960.  
  9961.                              ********************
  9962.                              ** pgSetTextStyle **
  9963.                              ********************
  9964.  
  9965.  
  9966. DESCRIPTION    The pgSetTextStyle function is used to specify one of seven
  9967.                fully scalable vector font sets to use for displaying text.
  9968.                The default font style is pgSMALL.
  9969.  
  9970.  
  9971. SYNTAX         C         void pgSetTextStyle( int fontstyle );
  9972.  
  9973.                Pascal    PROCEDURE pgSetTextStyle( fontstyle:integer );
  9974.  
  9975.                Basic     SUB pgSetTextSyle( fontstyle% )
  9976.  
  9977.                Fortran   SUBROUTINE pgSetTextStyle( fontstyle )
  9978.                          INTEGER*2 fontstyle
  9979.  
  9980.                Clipper   PROCEDURE pgSTSTYLE( fontstyle )
  9981.  
  9982.  
  9983. PARAMETERS     fontstyle Font to be used (loaded from disk file).
  9984.  
  9985.                There are currently seven font sets which may be selected.  The
  9986.                font is selected by specifying one of the manifest constants
  9987.                (or its value) listed below:
  9988.  
  9989.                Constant  Value   Description     File Name
  9990.  
  9991.                pgSMALL     0     Small           SMALL.FNT
  9992.                pgSIMPLEX   1     Simplex         SIMPLEX.FNT
  9993.                pgDUPLEX    2     Duplex          DUPLEX.FNT
  9994.                pgTRIPLEX   3     Triplex         TRIPLEX.FNT
  9995.                pgGOTHIC    4     Gothic          GOTHIC.FNT
  9996.                pgSCRIPT    5     Script          SCRIPT.FNT
  9997.                pgSDUPLEX   6     Script Duplex   SDUP.FNT
  9998.  
  9999.  
  10000. RETURN         None.
  10001.  
  10002.  
  10003. SEE ALSO       pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
  10004.                pgGetTextStyle
  10005.  
  10006.  
  10007. EXAMPLES       Load the DUPLEX font set and display a text string.
  10008.  
  10009.                C         pgSetTextStyle( pgDUPLEX );
  10010.                          pgDrawTextXY( 100, 100, "Hello World" );
  10011.  
  10012.                Pascal    pgSetTextStyle( pgDUPLEX );
  10013.                          pgDrawTextXY( 100, 100, 'Hello World' );
  10014.  
  10015.                Basic     call pgSetTextStyle( pgDUPLEX )
  10016.                          call pgDrawTextXY( 100, 100, "Hello World" )
  10017.  
  10018.                Fortran   call pgSetTextStyle( pgDUPLEX )
  10019.                          call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
  10020.  
  10021.                Clipper   pgSTSTYLE( pgDUPLEX )
  10022.                          pgDTXY( 100, 100, "Hello World" )
  10023.  
  10024.  
  10025.                              *******************
  10026.                              ** pgSetViewPort **
  10027.                              *******************
  10028.  
  10029.  
  10030. DESCRIPTION    The pgSetViewPort function is used to define a rectangular
  10031.                region on the page for displaying graphics.  The viewport
  10032.                coordinate origin is defined to be the upper-left hand corner
  10033.                of the viewport.
  10034.  
  10035.                The viewport region is defined in terms of the absolute virtual
  10036.                coordinate system.  After setting a viewport, the cursor
  10037.                position will be placed at the upper-left hand corner of the
  10038.                viewport.  The coordinate at this point is (0,0) and all
  10039.                subsequent graphics calls are made relative to this coordinate.
  10040.  
  10041.                The clipping region is automatically defined to match the
  10042.                viewport region.  Use the pgSetClipArea command to define a
  10043.                clipping region independent of the viewport.  Use the
  10044.                pgSetClipping command to turn clipping on or off.
  10045.  
  10046.  
  10047. SYNTAX         C         void pgSetViewPort( int x1, int y1, int x2, int y2 );
  10048.  
  10049.                Pascal    PROCEDURE pgSetViewPort( x1, y1, x2, y2 : integer );
  10050.  
  10051.                Basic     SUB pgSetViewPort( x1%, y1%, x2%, y2% )
  10052.  
  10053.                Fortran   SUBROUTINE pgSetViewPort( x1, y1, x2, y2 )
  10054.                          INTEGER*2 x1, y1, x2, y2
  10055.  
  10056.                Clipper   PROCEDURE pgSVIEWP( x1, y1, x2, y2 )
  10057.  
  10058.  
  10059. PARAMETERS     x1,y1     Upper-left corner of viewport.
  10060.                x2,y2     Lower-right corner of viewport.
  10061.  
  10062.  
  10063. RETURN         None.
  10064.  
  10065.  
  10066. SEE ALSO       pgGetClipArea, pgGetClipping, pgGetViewPort, pgSetClipArea,
  10067.                pgSetClipping
  10068.  
  10069.  
  10070. EXAMPLES       Use the pgGetViewPort and pgSetViewPort functions to fill the
  10071.                current viewport with a pattern, erase a rectangular portion of
  10072.                the fill region leaving a border 20 pixels wide by setting a
  10073.                new viewport and clearing it with the pgClearViewPort function,
  10074.                then restore the viewport to the original size.
  10075.  
  10076.                C         int x1, y1, x2, y2;
  10077.                          pgGetViewPort( &x1, &y1, &x2, &y2 );
  10078.                          pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
  10079.                          pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
  10080.                          pgClearViewPort();
  10081.                          pgSetViewPort( x1, y1, x2, y2 );
  10082.  
  10083.                Pascal    var
  10084.                          x1, y1, x2, y2 : integer;
  10085.                          pgGetViewPort( x1, y1, x2, y2 );
  10086.                          pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
  10087.                          pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
  10088.                          pgClearViewPort;
  10089.                          pgSetViewPort( x1, y1, x2, y2 );
  10090.  
  10091.                Basic     call pgGetViewPort( x1%, y1%, x2%, y2% )
  10092.                          call pgRectangle( 0, 0, x2%-x1%, y2%-y1%, pgOFILL )
  10093.                          call pgSetViewPort( x1%+20, y1%+20, x2%-20,
  10094.                               y2%-20)
  10095.                          call pgClearViewPort
  10096.                          call pgSetViewPort( x1%, y1%, x2%, y2% )
  10097.  
  10098.                Fortran   integer*2 x1, y1, x2, y2
  10099.                          call pgGetViewPort( x1, y1, x2, y2 )
  10100.                          call pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL )
  10101.                          call pgSetViewPort( x1+20, y1+20, x2-20, y2-20 )
  10102.                          call pgClearViewPort
  10103.                          call pgSetViewPort( x1, y1, x2, y2 )
  10104.  
  10105.                Clipper   pgGVIEWP( @x1, @y1, @x2, @y2 )
  10106.                          pgRECT( 0, 0, x2-x1, y2-y1, pgOFILL )
  10107.                          pgSVIEWP( x1+20, y1+20, x2-20, y2-20 )
  10108.                          pgCVIEWP()
  10109.                          pgSVIEWP( x1, top, right, y2 )
  10110.  
  10111.  
  10112. ***********************************
  10113. ** Appendix A:  FUNCTION SUMMARY **
  10114. ***********************************
  10115.  
  10116.  
  10117. The following is an alphabetical summary of PGL ToolKit function prototypes.
  10118. The READ.ME file on your distribution diskettes may contain new and/or updated
  10119. function definitions.
  10120.  
  10121.  
  10122.  
  10123. C             void pgArc( int x, int y, int rad, int sa, int ea );
  10124. Pascal        PROCEDURE pgArc( x, y, rad, sa, ea:integer );
  10125. Basic         SUB pgArc( x%, y%, rad%, sa%, ea% )
  10126. Fortran       SUBROUTINE pgArc( x, y, rad, sa, ea )
  10127.               INTEGER*2 x, y, rad, sa, ea
  10128. Clipper       PROCEDURE pgA( x, y, rad, sa, ea )
  10129.  
  10130.  
  10131. C             void pgBMData( int row, int far *data );
  10132. Pascal        PROCEDURE pgBMData( row:integer; var data );
  10133. Basic         SUB pgBMData( row%, SEG data% )
  10134. Fortran       SUBROUTINE pgBMData( row, data )
  10135.               INTEGER*2 row, data(n)
  10136. Clipper       PROCEDURE pgBMD( row, data )
  10137.  
  10138.  
  10139. C             void pgBMEnd();
  10140. Pascal        PROCEDURE pgBMEnd;
  10141. Basic         SUB pgBMEnd
  10142. Fortran       SUBROUTINE pgBMEnd
  10143. Clipper       PROCEDURE pgBMD()
  10144.  
  10145.  
  10146. C             void pgBMInit( int x, int y, int width, int height, int bpp,
  10147.                              int compflag );
  10148. Pascal        PROCEDURE pgBMInit( x, y, width, height, bpp, compflag:integer );
  10149. Basic         SUB pgBMInit( x%, y%, width%, height%, bpp%, compflag% )
  10150. Fortran       SUBROUTINE pgBMInit( x, y, width, height, bpp, compflag )
  10151.               INTEGER*2 x, y, width, height, bpp, compflag
  10152. Clipper       PROCEDURE pgBMI( x, y, width, height, bpp, compflag )
  10153.  
  10154.  
  10155. C             void pgCircle( int x, int y, int rad, int fill );
  10156. Pascal        PROCEDURE pgCircle( x, y, rad, fill:integer );
  10157. Basic         SUB pgCircle( x%, y%, rad%, fill% )
  10158. Fortran       SUBROUTINE pgCircle( x, y, rad, fill )
  10159.               INTEGER*2 x, y, rad, fill
  10160. Clipper       PROCEDURE pgCIR( x, y, rad, fill )
  10161.  
  10162.  
  10163. C             void pgClearDrw( int far *ierr );
  10164. Pascal        PROCEDURE pgClearDrw( var ierr:integer );
  10165. Basic         SUB pgClearDrw( SEG ierr% )
  10166. Fortran       SUBROUTINE pgClearDrw( ierr )
  10167.               INTEGER*2 ierr
  10168. Clipper       PROCEDURE pgCLEAR( <ref>ierr )
  10169.  
  10170.  
  10171. C             void pgClearViewPort( void );
  10172. Pascal        PROCEDURE pgClearViewPort;
  10173. Basic         SUB pgClearViewPort
  10174. Fortran       SUBROUTINE pgClearViewPort
  10175. Clipper       PROCEDURE pgCLEARVP()
  10176.  
  10177.  
  10178. C             void pgDrawText( char far *str );
  10179. Pascal        PROCEDURE pgDrawText( str:string );
  10180. Basic         SUB pgDrawText( SEG str$ )
  10181. Fortran       SUBROUTINE pgDrawText( str )
  10182.               CHARACTER*(*) str
  10183. Clipper       PROCEDURE pgDT( <expC>str )
  10184.  
  10185.  
  10186. C             void pgDrawTextXY( int x, int y, char far *str );
  10187. Pascal        PROCEDURE pgDrawTextXY( x, y:integer; str:string );
  10188. Basic         SUB pgDrawTextXY( x%, y%, SEG str$ )
  10189. Fortran       SUBROUTINE pgDrawTextXY( x, y, str )
  10190.               CHARACTER*(*) str
  10191.               INTEGER*2 x, y
  10192. Clipper       PROCEDURE pgDTXY( x, y, <expC>str )
  10193.  
  10194.  
  10195. C             void pgEllArc( int x, int y, int xrad, int yrad, int sa,
  10196.                              int ea );
  10197. Pascal        PROCEDURE pgEllArc( x, y, xrad, yrad, sa, ea:integer );
  10198. Basic         SUB pgEllArc( x%, y%, xrad%, yrad%, sa%, ea% )
  10199. Fortran       SUBROUTINE pgEllArc( x, y, xrad, yrad, sa, ea )
  10200.               INTEGER*2 x, y, xrad, yrad, sa, ea
  10201. Clipper       PROCEDURE pgELLA( x, y, xrad, yrad, sa, ea )
  10202.  
  10203.  
  10204. C             void pgEllipse( int x, int y, int xrad, int yrad, int fill );
  10205. Pascal        PROCEDURE pgEllipse( x, y, xrad, yrad, fill:integer );
  10206. Basic         SUB pgEllipse( x%, y%, xrad%, yrad%, fill% )
  10207. Fortran       SUBROUTINE pgEllipse( x, y, xrad, yrad, fill )
  10208.               INTEGER*2 x, y, xrad, yrad, fill
  10209. Clipper       PROCEDURE pgELL( x, y, xrad, yrad, fill )
  10210.  
  10211.  
  10212. C             void pgEndDrw( void );
  10213. Pascal        PROCEDURE pgEndDrw;
  10214. Basic         SUB pgEndDrw
  10215. Fortran       SUBROUTINE pgEndDrw
  10216. Clipper       PROCEDURE pgEND()
  10217.  
  10218.  
  10219. C             int pgGetAbsX( void );
  10220. Pascal        FUNCTION pgGetAbsX : integer;
  10221. Basic         FUNCTION pgGetAbsX%
  10222. Fortran       INTEGER*2 FUNCTION pgGetAbsX
  10223. Clipper       FUNCTION pgGABSX()
  10224.  
  10225.  
  10226. C             int pgGetAbsY( void );
  10227. Pascal        FUNCTION pgGetAbsY : integer;
  10228. Basic         FUNCTION pgGetAbsY%
  10229. Fortran       INTEGER*2 FUNCTION pgGetAbsY
  10230. Clipper       FUNCTION pgGABSY()
  10231.  
  10232.  
  10233. C             int pgGetCharSpacing( void );
  10234. Pascal        FUNCTION pgGetCharSpacing : integer;
  10235. Basic         FUNCTION pgGetCharSpacing%
  10236. Fortran       INTEGER*2 FUNCTION pgGetCharSpacing
  10237. Clipper       FUNCTION pgGCHARSP()
  10238.  
  10239.  
  10240. C             void pgGetClipArea( int far *x1, int far *y1,
  10241.                                   int far *x2, int far *y2 );
  10242. Pascal        PROCEDURE pgGetClipArea( var x1, y1, x2, y2:integer );
  10243. Basic         SUB pgGetClipArea( SEG x1%, SEG y1%, SEG x2%, SEG y2% )
  10244. Fortran       SUBROUTINE pgGetClipArea( x1, y1, x2, y2 )
  10245.               INTEGER*2 x1, y1, x2, y2
  10246. Clipper       PROCEDURE pgGCLIPA( <ref>x1, <ref>y1, <ref>x2, <ref>y2 )
  10247.  
  10248.  
  10249. C             int pgGetClipping( void );
  10250. Pascal        FUNCTION pgGetClipping : integer;
  10251. Basic         FUNCTION pgGetClipping%
  10252. Fortran       INTEGER*2 FUNCTION pgGetClipping
  10253. Clipper       FUNCTION pgGCLIP()
  10254.  
  10255.  
  10256. C             int pgGetColor( void );
  10257. Pascal        FUNCTION pgGetColor : integer;
  10258. Basic         FUNCTION pgGetColor%
  10259. Fortran       INTEGER*2 FUNCTION pgGetColor
  10260. Clipper       FUNCTION pgGCOLOR()
  10261.  
  10262.  
  10263. C             int pgGetDevColors( int res );
  10264. Pascal        FUNCTION pgGetDevColors( res:integer ) : integer;
  10265. Basic         FUNCTION pgGetDevColors%( res% )
  10266. Fortran       INTEGER*2 FUNCTION pgGetDevColors( res )
  10267.               INTEGER*2 res
  10268. Clipper       FUNCTION pgGDCOLORS( res )
  10269.  
  10270.  
  10271. C             int pgGetDevHeight( void );
  10272. Pascal        FUNCTION pgGetDevHeight : integer;
  10273. Basic         FUNCTION pgGetDevHeight%
  10274. Fortran       INTEGER*2 FUNCTION pgGetDevHeight
  10275. Clipper       FUNCTION pgGDHEIGHT()
  10276.  
  10277.  
  10278. C             int pgGetDevMaxX( int res );
  10279. Pascal        FUNCTION pgGetDevMaxX( res:integer ) : integer;
  10280. Basic         FUNCTION pgGetDevMaxX%( res% )
  10281. Fortran       INTEGER*2 FUNCTION pgGetDevMaxX( res )
  10282.               INTEGER*2 res
  10283. Clipper       FUNCTION pgGDMAXX( res )
  10284.  
  10285.  
  10286. C             int pgGetDevMaxY( int res );
  10287. Pascal        FUNCTION pgGetDevMaxY( res:integer ) : integer;
  10288. Basic         FUNCTION pgGetDevMaxY%( res% )
  10289. Fortran       INTEGER*2 FUNCTION pgGetDevMaxY( res )
  10290.               INTEGER*2 res
  10291. Clipper       FUNCTION pgGDMAXY( res )
  10292.  
  10293.  
  10294. C             int pgGetDevModes( void );
  10295. Pascal        FUNCTION pgGetDevModes : integer;
  10296. Basic         FUNCTION pgGetDevModes%
  10297. Fortran       INTEGER*2 FUNCTION pgGetDevModes
  10298. Clipper       FUNCTION pgGDMODES()
  10299.  
  10300.  
  10301. C             int pgGetDevOffsetX( void );
  10302. Pascal        FUNCTION pgGetDevOffsetX : integer;
  10303. Basic         FUNCTION pgGetDevOffsetX%
  10304. Fortran       INTEGER*2 FUNCTION pgGetDevOffsetX
  10305. Clipper       FUNCTION pgGDOFFX()
  10306.  
  10307.  
  10308. C             int pgGetDevOffsetY( void );
  10309. Pascal        FUNCTION pgGetDevOffsetY : integer;
  10310. Basic         FUNCTION pgGetDevOffsetY%
  10311. Fortran       INTEGER*2 FUNCTION pgGetDevOffsetY
  10312. Clipper       FUNCTION pgGDOFFY()
  10313.  
  10314.  
  10315. C             int pgGetDevPlanes( int res );
  10316. Pascal        FUNCTION pgGetDevPlanes( res:integer ) : integer;
  10317. Basic         FUNCTION pgGetDevPlanes%( res% )
  10318. Fortran       INTEGER*2 FUNCTION pgGetDevPlanes( res )
  10319.               INTEGER*2 res
  10320. Clipper       FUNCTION pgGDPLANES( res )
  10321.  
  10322.  
  10323. C             int pgGetDevResX( int res );
  10324. Pascal        FUNCTION pgGetDevResX( res:integer ) : integer;
  10325. Basic         FUNCTION pgGetDevResX%( res% )
  10326. Fortran       INTEGER*2 FUNCTION pgGetDevResX( res )
  10327.               INTEGER*2 res
  10328. Clipper       FUNCTION pgGDRESX( res )
  10329.  
  10330.  
  10331. C             int pgGetDevResY( int res );
  10332. Pascal        FUNCTION pgGetDevResY( res:integer ) : integer;
  10333. Basic         FUNCTION pgGetDevResY%( res% )
  10334. Fortran       INTEGER*2 FUNCTION pgGetDevResY( res )
  10335.               INTEGER*2 res
  10336. Clipper       FUNCTION pgGDRESY( res )
  10337.  
  10338.  
  10339. C             int pgGetDevType( void );
  10340. Pascal        FUNCTION pgGetDevType : integer;
  10341. Basic         FUNCTION pgGetDevType%
  10342. Fortran       INTEGER*2 FUNCTION pgGetDevType
  10343. Clipper       FUNCTION pgGDTYPE()
  10344.  
  10345.  
  10346. C             int pgGetDevWidth( void );
  10347. Pascal        FUNCTION pgGetDevWidth : integer;
  10348. Basic         FUNCTION pgGetDevWidth%
  10349. Fortran       INTEGER*2 FUNCTION pgGetDevWidth
  10350. Clipper       FUNCTION pgGDWIDTH()
  10351.  
  10352.  
  10353. C             int pgGetFillMode( void );
  10354. Pascal        FUNCTION pgGetFillMode : integer;
  10355. Basic         FUNCTION pgGetFillMode%
  10356. Fortran       INTEGER*2 FUNCTION pgGetFillMode
  10357. Clipper       FUNCTION pgGFMODE()
  10358.  
  10359.  
  10360. C             void pgGetFillPattern( char far *fpat, int far *color );
  10361. Pascal        PROCEDURE pgGetFillPattern( var fpat; var color:integer );
  10362. Basic         SUB pgGetFillPattern( SEG fpat%, SEG color% )
  10363. Fortran       SUBROUTINE pgGetFillPattern( fpat, color )
  10364.               CHARACTER*1 fpat(8)
  10365.               INTEGER*2 color
  10366. Clipper       PROCEDURE pgGFPAT( <ref>fpat, <ref>color )
  10367.  
  10368.  
  10369. C             void pgGetFillStyle( int far *style, int far *color );
  10370. Pascal        PROCEDURE pgGetFillStyle( var style, color:integer );
  10371. Basic         SUB pgGetFillStyle( SEG style%, SEG color% )
  10372. Fortran       SUBROUTINE pgGetFillStyle( style, color )
  10373.               INTEGER*2 style, color
  10374. Clipper       PROCEDURE pgGFSTYLE( <ref>style, <ref>color )
  10375.  
  10376.  
  10377. C             void pgGetLinePattern( int far *mask, int far *thickness );
  10378. Pascal        PROCEDURE pgGetLinePattern( var mask, thickness:integer );
  10379. Basic         SUB pgGetLinePattern( SEG mask%, SEG thickness% )
  10380. Fortran       SUBROUTINE pgGetLinePattern( mask, thickness )
  10381.               INTEGER*2 mask, thickness
  10382. Clipper       PROCEDURE pgGLPAT( <ref>mask, <ref>thickness )
  10383.  
  10384.  
  10385. C             void pgGetLineStyle( int far *lstyle, int far *thickness );
  10386. Pascal        PROCEDURE pgGetLineStyle( var lstyle, thickness:integer );
  10387. Basic         SUB pgGetLineStyle( SEG lstyle%, SEG thickness% )
  10388. Fortran       SUBROUTINE pgGetLineStyle( lstyle, thickness )
  10389.               INTEGER*2 lstyle, thickness
  10390. Clipper       PROCEDURE pgGLSTYLE( <ref>lstyle, <ref>thickness )
  10391.  
  10392.  
  10393. C             int pgGetLineWeight( void );
  10394. Pascal        FUNCTION pgGetLineWeight : integer;
  10395. Basic         FUNCTION pgGetLineWeight%
  10396. Fortran       INTEGER*2 FUNCTION pgGetLineWeight
  10397. Clipper       FUNCTION pgGLWGT()
  10398.  
  10399.  
  10400. C             int pgGetMaxX( void );
  10401. Pascal        FUNCTION pgGetMaxX : integer;
  10402. Basic         FUNCTION pgGetMaxX%
  10403. Fortran       INTEGER*2 FUNCTION pgGetMaxX
  10404. Clipper       FUNCTION pgGMAXX()
  10405.  
  10406.  
  10407. C             int pgGetMaxY( void );
  10408. Pascal        FUNCTION pgGetMaxY : integer;
  10409. Basic         FUNCTION pgGetMaxY%
  10410. Fortran       INTEGER*2 FUNCTION pgGetMaxY
  10411. Clipper       FUNCTION pgGMAXY()
  10412.  
  10413.  
  10414. C             int pgGetStatus( void );
  10415. Pascal        FUNCTION pgGetStatus : integer;
  10416. Basic         FUNCTION pgGetStatus%
  10417. Fortran       INTEGER*2 FUNCTION pgGetStatus
  10418. Clipper       FUNCTION pgSTATUS()
  10419.  
  10420.  
  10421. C             int pgGetTextBolding( void );
  10422. Pascal        FUNCTION pgGetTextBolding : integer;
  10423. Basic         FUNCTION pgGetTextBolding%
  10424. Fortran       INTEGER*2 FUNCTION pgGetTextBolding
  10425. Clipper       FUNCTION pgGTBOLD()
  10426.  
  10427.  
  10428. C             int pgGetTextHeight( void );
  10429. Pascal        FUNCTION pgGetTextHeight : integer;
  10430. Basic         FUNCTION pgGetTextHeight%
  10431. Fortran       INTEGER*2 FUNCTION pgGetTextHeight
  10432. Clipper       FUNCTION pgGTHGT()
  10433.  
  10434.  
  10435. C             void pgGetTextJustify( int far *hor, int far *vert );
  10436. Pascal        PROCEDURE pgGetTextJustify( var hor, vert:integer );
  10437. Basic         SUB pgGetTextJustify( SEG hor%, SEG vert% )
  10438. Fortran       SUBROUTINE pgGetTextJustify( hor, vert )
  10439.               INTEGER*2 hor, vert
  10440. Clipper       PROCEDURE pgGTJUST( <ref>hor, <ref>vert )
  10441.  
  10442.  
  10443. C             int pgGetTextLength( char far *str );
  10444. Pascal        FUNCTION pgGetTextLength( str:string ) : integer;
  10445. Basic         FUNCTION pgGetTextLength%( SEG str$ )
  10446. Fortran       INTEGER*2 FUNCTION pgGetTextLength( str )
  10447.               CHARACTER*(*) str
  10448. Clipper       FUNCTION pgGTLEN( <expC>str )
  10449.  
  10450.  
  10451. C             void pgGetTextOrient( int far *x, int far *y );
  10452. Pascal        PROCEDURE pgGetTextOrient( var x, y:integer );
  10453. Basic         SUB pgGetTextOrient( SEG x%, SEG y% )
  10454. Fortran       SUBROUTINE pgGetTextOrient( x, y )
  10455.               INTEGER*2 x, y
  10456. Clipper       PROCEDURE pgGTORIEN( <ref>x, <ref>y )
  10457.  
  10458.  
  10459. C             void pgGetTextScaling( int far *mx, int far *dx,
  10460.                                      int far *my, int far *dy );
  10461. Pascal        PROCEDURE pgGetTextScaling( var mx, dx, my, dy:integer );
  10462. Basic         SUB pgGetTextScaling( SEG mx%, SEG dx%, SEG my%, SEG dy% )
  10463. Fortran       SUBROUTINE pgGetTextScaling( mx, dx, my, dy )
  10464.               INTEGER*2 mx, dx, my, dy
  10465. Clipper       PROCEDURE pgGTSCALE( <ref>mx, <ref>dx, <ref>my, <ref>dy)
  10466.  
  10467.  
  10468. C             int pgGetTextStyle( void );
  10469. Pascal        FUNCTION pgGetTextStyle : integer;
  10470. Basic         FUNCTION pgGetTextStyle%
  10471. Fortran       INTEGER*2 FUNCTION pgGetTextStyle
  10472. Clipper       FUNCTION pgGTSTYLE()
  10473.  
  10474.  
  10475. C             void pgGetViewPort( int far *x1, int far *y1,
  10476.                                   int far *x2, int far *y2 );
  10477. Pascal        PROCEDURE pgGetViewPort( var x1, y1, x2, y2:integer );
  10478. Basic         SUB pgGetViewPort( SEG x1%, SEG y1%, SEG x2%, SEG y2% )
  10479. Fortran       SUBROUTINE pgGetViewPort( x1, y1, x2, y2 )
  10480.               INTEGER*2 x1, y1, x2, y2
  10481. Clipper       PROCEDURE pgGVIEWP( <ref>x1, <ref>y1, <ref>x2, <ref>y2 )
  10482.  
  10483.  
  10484. C             int pgGetX( void );
  10485. Pascal        FUNCTION pgGetX : integer;
  10486. Basic         FUNCTION pgGetX%
  10487. Fortran       INTEGER*2 FUNCTION pgGetX
  10488. Clipper       FUNCTION pgGX()
  10489.  
  10490.  
  10491. C             int pgGetY( void );
  10492. Pascal        FUNCTION pgGetY : integer;
  10493. Basic         FUNCTION pgGetY%
  10494. Fortran       INTEGER*2 FUNCTION pgGetY
  10495. Clipper       FUNCTION pgGY()
  10496.  
  10497.  
  10498. C             void pgInitDrw( char far *file, int wid, int hgt,
  10499.                               int far *ierr );
  10500. Pascal        PROCEDURE pgInitDrw( file:string; wid, hgt:integer;
  10501.                                    var ierr:integer )
  10502. Basic         SUB pgInitDrw( SEG file$, wid%, hgt%, SEG ierr% )
  10503. Fortran       SUBROUTINE pgInitDrw( file, wid, hgt, ierr )
  10504.               CHARACTER*(*) file
  10505.               INTEGER*2 wid, hgt, ierr
  10506. Clipper       PROCEDURE pgINIT( <expC>file, wid, hgt, <ref>ierr )
  10507.  
  10508.  
  10509. C             void pgLine( int x1, int y1, int x2, int y2 );
  10510. Pascal        PROCEDURE pgLine( x1, y1, x2, y2:integer );
  10511. Basic         SUB pgLine( x1%, y1%, x2%, y2% )
  10512. Fortran       SUBROUTINE pgLine( x1, y1, x2, y2 )
  10513.               INTEGER*2 x1, y1, x2, y2
  10514. Clipper       PROCEDURE pgLIN( x1, y1, x2, y2 )
  10515.  
  10516.  
  10517. C             void pgLineRel( int dx, int dy );
  10518. Pascal        PROCEDURE pgLineRel( dx, dy:integer );
  10519. Basic         SUB pgLineRel( dx%, dy% )
  10520. Fortran       SUBROUTINE pgLineRel( dx, dy )
  10521.               INTEGER*2 dx, dy
  10522. Clipper       PROCEDURE pgLINREL( dx, dy )
  10523.  
  10524.  
  10525. C             void pgLineTo( int x, int y );
  10526. Pascal        PROCEDURE pgLineTo( x, y:integer );
  10527. Basic         SUB pgLineTo( x%, y% )
  10528. Fortran       SUBROUTINE pgLineTo( x, y )
  10529.               INTEGER*2 x, y
  10530. Clipper       PROCEDURE pgLINTO( x, y )
  10531.  
  10532.  
  10533. C             int pgLoadDevInfo( char far *dev );
  10534. Pascal        FUNCTION pgLoadDevInfo( dev:string ) : integer;
  10535. Basic         FUNCTION pgLoadDevInfo%( SEG dev$ )
  10536. Fortran       INTEGER*2 FUNCTION pgLoadDevInfo( dev )
  10537.               CHARACTER*(*) dev
  10538. Clipper       FUNCTION pgLDINFO( <expC>dev )
  10539.  
  10540.  
  10541. C             void pgMoveRel( int dx, int dy );
  10542. Pascal        PROCEDURE pgMoveRel( dx, dy:integer );
  10543. Basic         SUB pgMoveRel( dx%, dy% )
  10544. Fortran       SUBROUTINE pgMoveRel( dx, dy )
  10545.               INTEGER*2 dx, dy
  10546. Clipper       PROCEDURE pgMOVREL( dx, dy )
  10547.  
  10548.  
  10549. C             void pgMoveTo( int x, int y );
  10550. Pascal        PROCEDURE pgMoveTo( x, y:integer );
  10551. Basic         SUB pgMoveTo( x%, y% )
  10552. Fortran       SUBROUTINE pgMoveTo( x, y )
  10553.               INTEGER*2 x, y
  10554. Clipper       PROCEDURE pgMOVTO( x, y )
  10555.  
  10556.  
  10557. C             void pgNewPage( void );
  10558. Pascal        PROCEDURE pgNewPage;
  10559. Basic         SUB pgNewPage
  10560. Fortran       SUBROUTINE pgNewPage
  10561. Clipper       PROCEDURE pgNEWPG()
  10562.  
  10563.  
  10564. C             void pgOpenDrw( char far *fname, int far *ierr );
  10565. Pascal        PROCEDURE pgOpenDrw( fname:string; var ierr:integer );
  10566. Basic         SUB pgOpenDrw( SEG fname$, SEG ierr% )
  10567. Fortran       SUBROUTINE pgOpenDrw( fname, ierr )
  10568.               CHARACTER*(*) fname
  10569.               INTEGER*2 ierr
  10570. Clipper       PROCEDURE pgOPEN( <expC>fname, <ref>ierr )
  10571.  
  10572.  
  10573. C             void pgPie( int x, int y, int rad, int sa, int ea, int fill );
  10574. Pascal        PROCEDURE pgPie( x, y, rad, sa, ea, fill:integer );
  10575. Basic         SUB pgPie( x%, y%, rad%, sa%, ea%, fill% )
  10576. Fortran       SUBROUTINE pgPie( x, y, rad, sa, ea, fill )
  10577.               INTEGER*2 x, y, rad, sa, ea, fill
  10578. Clipper       PROCEDURE pgPI( x, y, rad, sa, ea, fill )
  10579.  
  10580.  
  10581. C             void pgPolygon( int far *data, int numpoints, int fill );
  10582. Pascal        PROCEDURE pgPolygon( var data; numpoints, fill:integer );
  10583. Basic         SUB pgPolygon( SEG data%, numpoints%, fill% )
  10584. Fortran       SUBROUTINE pgPolygon( data, numpoints, fill )
  10585.               INTEGER*2 data(n), numpoints, fill
  10586. Clipper       PROCEDURE pgPOLYGN( data, numpoints, fill )
  10587.  
  10588.  
  10589. C             void pgPolyLine( int far *data, int numpoints );
  10590. Pascal        PROCEDURE pgPolyLine( var data; numpoints:integer );
  10591. Basic         SUB pgPolyLine( SEG data%, numpoints% )
  10592. Fortran       SUBROUTINE pgPolyLine( data, numpoints )
  10593.               INTEGER*2 data(n), numpoints
  10594. Clipper       PROCEDURE pgPOLYLN( polydata, numpoints )
  10595.  
  10596.  
  10597. C             void pgRectangle( int x1, int y1, int x2, int y2, int fill );
  10598. Pascal        PROCEDURE pgRectangle( x1, y1, x2, y2, fill:integer );
  10599. Basic         SUB pgRectangle( x1%, y1%, x2%, y2%, fill% )
  10600. Fortran       SUBROUTINE pgRectangle( x1, y1, x2, y2, fill )
  10601.               INTEGER*2 x1, y1, x2, y2, fill
  10602. Clipper       PROCEDURE pgRECT( x1, y1, x2, y2, fill )
  10603.  
  10604.  
  10605. C             void pgSector( int x, int y, int xrad, int yrad, int sa,
  10606.                              int ea, int fill );
  10607. Pascal        PROCEDURE pgSector( x, y, xrad, yrad, sa, ea, fill:integer );
  10608. Basic         SUB pgSector( x%, y%, xrad%, yrad%, sa%, ea%, fill% )
  10609. Fortran       SUBROUTINE pgSector( x, y, xrad, yrad, sa, ea, fill )
  10610.               INTEGER*2 x, y, xrad, yrad, sa, ea, fill
  10611. Clipper       PROCEDURE pgSECT( x, y, xrad, yrad, sa, ea, fill )
  10612.  
  10613.  
  10614. C             void pgSetCharSpacing( int space );
  10615. Pascal        PROCEDURE pgSetCharSpacing( space:integer );
  10616. Basic         SUB pgSetCharSpacing( space% )
  10617. Fortran       SUBROUTINE pgSetCharSpacing( space )
  10618.               INTEGER*2 space
  10619. Clipper       PROCEDURE pgSCHARSP( space )
  10620.  
  10621.  
  10622. C             void pgSetClipArea( int x1, int y1, int x2, int y2 );
  10623. Pascal        PROCEDURE pgSetClipArea( x1, y1, x2, y2:integer );
  10624. Basic         SUB pgSetClipArea( x1%, y1%, x2%, y2% )
  10625. Fortran       SUBROUTINE pgSetClipArea( x1, y1, x2, y2 )
  10626.               INTEGER*2 x1, y1, x2, y2
  10627. Clipper       PROCEDURE pgSCLIPA( x1, y1, x2, y2 )
  10628.  
  10629.  
  10630. C             void pgSetClipping( int flag );
  10631. Pascal        PROCEDURE pgSetClipping( flag:integer );
  10632. Basic         SUB pgSetClipping( flag% )
  10633. Fortran       SUBROUTINE pgSetClipping( flag )
  10634.               INTEGER*2 flag
  10635. Clipper       PROCEDURE pgSCLIP( flag )
  10636.  
  10637.  
  10638. C             void pgSetColor( int color );
  10639. Pascal        PROCEDURE pgSetColor( color:integer );
  10640. Basic         SUB pgSetColor( color% )
  10641. Fortran       SUBROUTINE pgSetColor( color )
  10642.               INTEGER*2 color
  10643. Clipper       PROCEDURE pgSCOLOR( color )
  10644.  
  10645.  
  10646. C             void pgSetDefaults( void );
  10647. Pascal        PROCEDURE pgSetDefaults;
  10648. Basic         SUB pgSetDefaults
  10649. Fortran       SUBROUTINE pgSetDefaults
  10650. Clipper       PROCEDURE pgSDEFAULT()
  10651.  
  10652.  
  10653. C             void pgSetFillMode( int mode );
  10654. Pascal        PROCEDURE pgSetFillMode( mode:integer );
  10655. Basic         SUB pgSetFillMode( mode% )
  10656. Fortran       SUBROUTINE pgSetFillMode( mode )
  10657.               INTEGER*2 mode
  10658. Clipper       PROCEDURE pgSFMODE( mode )
  10659.  
  10660.  
  10661. C             void far pgSetFillPattern( char far *pattern, int fcolor );
  10662. Pascal        PROCEDURE pgSetFillPattern( var pattern, fcolor:integer );
  10663. Basic         SUB pgSetFillPattern( SEG pattern%, fcolor% )
  10664. Fortran       SUBROUTINE pgSetFillPattern( pattern, fcolor )
  10665.               CHARACTER*1 pattern(8)
  10666.               INTEGER*2 fcolor
  10667. Clipper       PROCEDURE pgSFPAT( pattern, fcolor )
  10668.  
  10669.  
  10670. C             void pgSetFillStyle( int style, int color );
  10671. Pascal        PROCEDURE pgSetFillStyle( style, color:integer );
  10672. Basic         SUB pgSetFillStyle( style%, color% )
  10673. Fortran       SUBROUTINE pgSetFillStyle( style, color )
  10674.               INTEGER*2 style, color
  10675. Clipper       PROCEDURE pgSFSTYLE( style, color )
  10676.  
  10677.  
  10678. C             void pgSetLinePattern( int pattern, int thickness );
  10679. Pascal        PROCEDURE pgSetLinePattern( pattern, thickness:integer );
  10680. Basic         SUB pgSetLinePattern( pattern%, thickness% )
  10681. Fortran       SUBROUTINE pgSetLinePattern( pattern, thickness )
  10682.               INTEGER*2 pattern, thickness
  10683. Clipper       PROCEDURE pgSLPAT( pattern, thickness )
  10684.  
  10685.  
  10686. C             void pgSetLineStyle( int style, int thickness );
  10687. Pascal        PROCEDURE pgSetLineStyle( style, thickness:integer );
  10688. Basic         SUB pgSetLineStyle( style%, thickness% )
  10689. Fortran       SUBROUTINE pgSetLineStyle( style, thickness )
  10690.               INTEGER*2 style, thickness
  10691. Clipper       PROCEDURE pgSLSTYLE( style, thickness )
  10692.  
  10693.  
  10694. C             void pgSetLineWeight( int weight );
  10695. Pascal        PROCEDURE pgSetLineWeight( weight:integer );
  10696. Basic         SUB pgSetLineWeight( weight% )
  10697. Fortran       SUBROUTINE pgSetLineWeight( weight )
  10698.               INTEGER*2 weight
  10699. Clipper       PROCEDURE pgSLWGT( weight )
  10700.  
  10701.  
  10702. C             void pgSetPageForm( int form );
  10703. Pascal        PROCEDURE pgSetPageForm( form:integer );
  10704. Basic         SUB pgSetPageForm( form% )
  10705. Fortran       SUBROUTINE pgSetPageForm( form )
  10706.               INTEGER*2 form
  10707. Clipper       PROCEDURE pgSPFORM( form )
  10708.  
  10709.  
  10710. C             void pgSetPageMargins( int left,  int top,
  10711.                                      int right, int bottom );
  10712. Pascal        PROCEDURE pgSetPageMargins( left, top, right, bottom:integer );
  10713. Basic         SUB pgSetPageMargins( left%, top%, right%, bottom% )
  10714. Fortran       SUBROUTINE pgSetPageMargins( left, top, right, bottom )
  10715.               INTEGER*2 left, top, right, bottom
  10716. Clipper       PROCEDURE pgSPMARGIN( left, top, right, bottom )
  10717.  
  10718.  
  10719. C             void pgSetPageSize( int size );
  10720. Pascal        PROCEDURE pgSetPageSize( size:integer );
  10721. Basic         SUB pgSetPageSize( size% )
  10722. Fortran       SUBROUTINE pgSetPageSize( size )
  10723.               INTEGER*2 size
  10724. Clipper       PROCEDURE pgSPSIZE( size )
  10725.  
  10726.  
  10727. C             void pgSetPalette( int index, int color );
  10728. Pascal        PROCEDURE pgSetPalette( index, color:integer );
  10729. Basic         SUB pgSetPalette( index%, color% )
  10730. Fortran       SUBROUTINE pgSetPalette( index, color )
  10731.               INTEGER*2 index, color
  10732. Clipper       PROCEDURE pgSPAL( index, color )
  10733.  
  10734.  
  10735. C             void pgSetPixel( int x, int y, int color );
  10736. Pascal        PROCEDURE pgSetPixel( x, y, color:integer );
  10737. Basic         SUB pgSetPixel( x%, y%, color% )
  10738. Fortran       SUBROUTINE pgSetPixel( x, y, color )
  10739.               INTEGER*2 x, y, color
  10740. Clipper       PROCEDURE pgSETPIX( x, y, color )
  10741.  
  10742.  
  10743. C             void pgSetRgbPalette( int index, int red, int green, int blue );
  10744. Pascal        PROCEDURE pgSetRgbPalette( index, red, green, blue:integer );
  10745. Basic         SUB pgSetRgbPalette( index%, red%, green%, blue% )
  10746. Fortran       SUBROUTINE pgSetRgbPalette( index, red, green, blue )
  10747.               INTEGER*2 index, red, green, blue
  10748. Clipper       PROCEDURE pgSRGB( index, red, green, blue )
  10749.  
  10750.  
  10751. C             void pgSetTextBolding( int bold );
  10752. Pascal        PROCEDURE pgSetTextBolding( bold:integer );
  10753. Basic         SUB pgSetTextBolding( bold% )
  10754. Fortran       SUBROUTINE pgSetTextBolding( bold )
  10755.               INTEGER*2 bold
  10756. Clipper       PROCEDURE pgSTBOLD( bold )
  10757.  
  10758.  
  10759. C             void pgSetTextJustify( int horiz, int vert );
  10760. Pascal        PROCEDURE pgSetTextJustify( horiz, vert:integer );
  10761. Basic         SUB pgSetTextJustify( horiz%, vert% )
  10762. Fortran       SUBROUTINE pgSetTextJustify( horiz, vert )
  10763.               INTEGER*2 horiz, vert
  10764. Clipper       PROCEDURE pgSTJUST( horiz, vert )
  10765.  
  10766.  
  10767. C             void pgSetTextOrient( int x, int y );
  10768. Pascal        PROCEDURE pgSetTextOrient( x, y:integer );
  10769. Basic         SUB pgSetTextOrient( x%, y% )
  10770. Fortran       SUBROUTINE pgSetTextOrient( x, y )
  10771.               INTEGER*2 x, y
  10772. Clipper       PROCEDURE pgSTORIEN( x, y )
  10773.  
  10774.  
  10775. C             void pgSetTextScaling( int mx, int dx, int my, int dy );
  10776. Pascal        PROCEDURE pgSetTextScaling( mx, dx, my, dy:integer );
  10777. Basic         SUB pgSetTextScaling( mx%, dx%, my%, dy% )
  10778. Fortran       SUBROUTINE pgSetTextScaling( mx, dx, my, dy )
  10779.               INTEGER*2 mx, dx, my, dy
  10780. Clipper       PROCEDURE pgSTSCALE( mx, dx, my, dy )
  10781.  
  10782.  
  10783. C             void pgSetTextStyle( int fontstyle );
  10784. Pascal        PROCEDURE pgSetTextStyle( fontstyle:integer );
  10785. Basic         SUB pgSetTextSyle( fontstyle% )
  10786. Fortran       SUBROUTINE pgSetTextStyle( fontstyle )
  10787.               INTEGER*2 fontstyle
  10788. Clipper       PROCEDURE pgSTSTYLE( fontstyle )
  10789.  
  10790.  
  10791. C             void pgSetViewPort( int x1, int y1, int x2, int y2 );
  10792. Pascal        PROCEDURE pgSetViewPort( x1, y1, x2, y2:integer );
  10793. Basic         SUB pgSetViewPort( x1%, y1%, x2%, y2% )
  10794. Fortran       SUBROUTINE pgSetViewPort( x1, y1, x2, y2 )
  10795.               INTEGER*2 x1, y1, x2, y2
  10796. Clipper       PROCEDURE pgSVIEWP( x1, y1, x2, y2 )
  10797.