home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-15 | 437.1 KB | 10,797 lines |
-
-
-
-
-
-
-
-
-
-
- PGL ToolKit
- Printer Graphics Interface Libraries
-
-
-
-
-
-
-
-
-
-
-
- USER'S GUIDE
- AND
- LIBRARY REFERENCE
-
-
-
-
- ************************
- ** LICENSE AGREEMENT **
- ************************
-
- This is a license agreement between you, the end user, and AnSoft, Inc.
- Please read the following terms and conditions before opening the sealed
- diskette envelope. For the purposes of this agreement "software" is defined
- as any source code, executables, object code libraries, and product docu-
- mentation included in this package. Opening the diskette envelope and use
- of the software indicates your acceptance of these terms and conditions. If
- you do not agree with the terms and conditions of the license agreement,
- promptly return the unopened diskette envelope and the package undamaged
- along with proof of purchase for a full refund. AnSoft, Inc., a Maryland
- corporation, provides this software and licenses its use.
-
-
- LICENSE
-
- You MAY use the software on any machine or machines in your possession, but
- you may not have a copy on more than one machine at any given time. You MAY
- copy the software into any machine-readable form for the expressed of creating
- an archival backup copy only. You MAY distribute any executable programs you
- create as long as it is not a derivative product based on this software. A
- derivative product is one whereby the primary function is to provide graphics
- printer support. You MAY distribute the FONT FILES, PRINTER DRIVERS, and
- PRINTER UTILITY PROGRAMS with any executable programs you create. You MAY NOT
- translate, reverse compile, reverse assemble, or reverse engineer the software.
-
- This software is sold as a single-user version. You MAY install and use the
- software on a network provided only one network user at a time uses the
- software or any portion of it. In order for the software to be used by
- multiple users, a separate SITE LICENSE must be purchased directly from
- AnSoft, Inc.
-
- You MAY transfer the software and license to another party provided the other
- party agrees to accept the terms and conditions of this license agreement. If
- you transfer the software, you must either transfer all copies whether in
- printed or machine readable form to the same party or destroy any copies not
- transferred. When transferring the software to another party, please inform
- AnSoft, Inc. as to the name and address of the new registered owner.
-
- YOU MAY NOT DISTRIBUTE ANY PORTIONS OF THE OBJECT CODE LIBRARIES TO ANOTHER
- PARTY UNDER ANY CIRCUMSTANCES. YOU MAY NOT COPY, MODIFY, OR TRANSFER THE
- SOFTWARE, EITHER IN WHOLE OR IN PART, EXCEPT AS EXPRESSLY PROVIDED FOR IN THIS
- LICENSE AGREEMENT.
-
- The license is effective until terminated. You may terminate it any time by
- destroying the software together with all copies, modifications, and merged
- portions in any form. It will also terminate upon conditions set forth
- elsewhere in this agreement or if you fail to comply with the terms and
- conditions of this agreement. You agree, upon such termination, to destroy
- all copies, modifications, and merged portions in any form except for any
- executable programs you created.
-
- LIMITED WARRANTY
-
- AnSoft, Inc. warrants the diskette and documentation with respect to their
- physical condition to be free of defects in material and workmanship for a
- period of 30 days from the date of purchase. AnSoft, Inc. agrees to replace
- any defective diskette or documentation within the warranty period upon
- notification to that effect.
-
- AnSoft, Inc. specifically disclaims all other warranties, expressed or implied,
- including but not limited to implied warranties as to the suitability of the
- software to meet your requirements or that the software will operate
- uninterrupted or free of error.
-
- AnSoft, Inc. SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO
- ANY LOSS OF PROFITS, LOSS OF SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL
- DAMAGES RESULTING FROM THE USE OR INABILITY TO USE THIS SOFTWARE. YOU ASSUME
- ALL RISKS AND RESPONSIBILITIES AS TO THE RESULTS AND PERFORMANCE OF THE
- SOFTWARE AND MANUAL.
-
- You acknowledge that you have read this agreement, understand it and agree to
- be bound by the terms and conditions listed herein. You further agree that
- this is the complete and exclusive agreement between you, the user, and AnSoft,
- Inc. and that this agreement supersedes all prior agreements, written or oral.
-
- COPYRIGHT
-
- Information in this document is subject to change without notice and does not
- represent a commitment on the part of AnSoft, Inc. The software described in
- this document is furnished under a license agreement. The software may be
- used or copied only in accordance with the terms and conditions of the
- agreement. This document is protected by federal copyright law. No part of
- this manual may be copied or distributed, transmitted, transcribed, stored in
- a retrieval system, or translated in any human or computer language in any
- form or by any means, electronic, mechanical, magnetic, manual or otherwise,
- including photocopying and recording, for any purpose other than the
- purchaser's personal use without receiving prior written permission from
- AnSoft, Inc.
-
- TRADEMARKS
-
- WATCOM is a trademark of WATCOM Systems, Inc.
-
- Microsoft, Microsoft Assembler, Microsoft Basic PDS, Quick Basic, Microsoft C,
- Quick C, Microsoft Fortran, and MS-DOS are trademarks of Microsoft Corporation.
-
- IBM, IBM PC, and PS/2 are trademarks of International Business Machines, Inc.
-
- Borland C++, Turbo Assembler, Turbo C/C++ and Turbo Pascal are trademarks of
- Borland International, Inc.
-
- Clipper is a trademark of Nantucket Corporation.
-
- PC Paintbrush is a trademark of ZSoft Corporation.
-
- Lahey is a trademark of Lahey Computer Systems, Inc.
-
- GX Graphics is a trademark of Genus Microprogramming, Inc.
-
- MetaWINDOW is a trademark of Metagraphics Software Corporation.
-
-
- ***********************
- ** TABLE OF CONTENTS **
- ***********************
-
-
- CHAPTER 1: INTRODUCTION
-
- PGL Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .
- System Requirements. . . . . . . . . . . . . . . . . . . . . . . .
- About This Manual. . . . . . . . . . . . . . . . . . . . . . . . .
- Registration . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Technical Support. . . . . . . . . . . . . . . . . . . . . . . . .
-
- CHAPTER 2: INSTALLATION
-
- Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- About the Distribution Disks . . . . . . . . . . . . . . . . . . .
- Automatic Installation . . . . . . . . . . . . . . . . . . . . . .
- Manual Installation. . . . . . . . . . . . . . . . . . . . . . . .
- Languages and Archives . . . . . . . . . . . . . . . . . . . . . .
- C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Pascal. . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Clipper . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
- CHAPTER 3: QUICKSTART
-
- Supported Compilers. . . . . . . . . . . . . . . . . . . . . . . .
- Function Naming Convention . . . . . . . . . . . . . . . . . . . .
- Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . .
- Integrating the PGL Library. . . . . . . . . . . . . . . . . . . .
- Include Files and Libraries. . . . . . . . . . . . . . . . . . . .
- C Language. . . . . . . . . . . . . . . . . . . . . . . . . .
- Fortran Language. . . . . . . . . . . . . . . . . . . . . . .
- Pascal Language . . . . . . . . . . . . . . . . . . . . . . .
- Basic Language. . . . . . . . . . . . . . . . . . . . . . . .
- Clipper Language. . . . . . . . . . . . . . . . . . . . . . .
- Assembly Language . . . . . . . . . . . . . . . . . . . . . .
- Compiling and Linking. . . . . . . . . . . . . . . . . . . . . . .
- Quick Libraries. . . . . . . . . . . . . . . . . . . . . . . . . .
- Example Programs . . . . . . . . . . . . . . . . . . . . . . . . .
- No Royalties . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
- CHAPTER 4: PGL PHILOSOPHY
-
- Design Philosophy. . . . . . . . . . . . . . . . . . . . . . . . .
- Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
- CHAPTER 5: PROGRAMMING WITH PGL
-
- Supported Compilers. . . . . . . . . . . . . . . . . . . . . . . .
- Function Naming Convention . . . . . . . . . . . . . . . . . . . .
- Coordinate System. . . . . . . . . . . . . . . . . . . . . . . . .
- Virtual Drawing Resolution . . . . . . . . . . . . . . . . . . . .
- Aspect Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Color. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Color Palettes. . . . . . . . . . . . . . . . . . . . . . . .
- HP PaintJet . . . . . . . . . . . . . . . . . . . . . . . . .
- HP PaintJet/XL. . . . . . . . . . . . . . . . . . . . . . . .
- Color PostScript Printers . . . . . . . . . . . . . . . . . .
- Background Colors . . . . . . . . . . . . . . . . . . . . . .
- Saving Your Graphics . . . . . . . . . . . . . . . . . . . . . . .
- Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . .
- Step-By-Step Example . . . . . . . . . . . . . . . . . . . . . . .
- Example Program . . . . . . . . . . . . . . . . . . . . . . .
- Compiling, Linking, and Executing . . . . . . . . . . . . . .
- Printing EXAMPLE.PGL Using GPU. . . . . . . . . . . . . . . .
- Printing EXAMPLE.PGL Using GPMENU . . . . . . . . . . . . . .
-
- CHAPTER 6: WORKING WITH BITMAPS
-
- Saving Bitmap Images . . . . . . . . . . . . . . . . . . . . . . .
- Building the Data Vector . . . . . . . . . . . . . . . . . . . . .
- Color Conversions and Dithering. . . . . . . . . . . . . . . . . .
- Bitmap Scaling . . . . . . . . . . . . . . . . . . . . . . . . . .
- Bitmap Fill Direction. . . . . . . . . . . . . . . . . . . . . . .
- Bitmap Fill Mode . . . . . . . . . . . . . . . . . . . . . . . . .
- Bitmap Image Processing. . . . . . . . . . . . . . . . . . . . . .
- Using Hardware Coordinates and Bitmaps . . . . . . . . . . . . . .
-
- CHAPTER 7: PRINTING
-
- The Printing Process . . . . . . . . . . . . . . . . . . . . . . .
- Printing From Within Your Application. . . . . . . . . . . . . . .
- Printing From Outside Your Application . . . . . . . . . . . . . .
- GPU Command Summary. . . . . . . . . . . . . . . . . . . . . . . .
- Printer Control Parameters . . . . . . . . . . . . . . . . . . . .
- File Name . . . . . . . . . . . . . . . . . . . . . . . . . .
- Output Device Destination (/U). . . . . . . . . . . . . . . .
- Device Driver (/D). . . . . . . . . . . . . . . . . . . . . .
- Resolution (/R) . . . . . . . . . . . . . . . . . . . . . . .
- Page Margins (/M) . . . . . . . . . . . . . . . . . . . . . .
- Page Orientation (/O) . . . . . . . . . . . . . . . . . . . .
- Page Size (/Z). . . . . . . . . . . . . . . . . . . . . . . .
- Invert Flag (/I). . . . . . . . . . . . . . . . . . . . . . .
- EMM Usage (/E). . . . . . . . . . . . . . . . . . . . . . . .
- Path (/P) . . . . . . . . . . . . . . . . . . . . . . . . . .
- Copies (/C) . . . . . . . . . . . . . . . . . . . . . . . . .
- Fill Density (/Y) . . . . . . . . . . . . . . . . . . . . . .
- Form Feed (/F). . . . . . . . . . . . . . . . . . . . . . . .
- Quiet Switch (/Q) . . . . . . . . . . . . . . . . . . . . . .
- Buffer Size (/B). . . . . . . . . . . . . . . . . . . . . . .
- System Files . . . . . . . . . . . . . . . . . . . . . . . . . . .
- PGL2PS Utility . . . . . . . . . . . . . . . . . . . . . . . . . .
- SCPY Utility . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
- CHAPTER 8: SUPPORTED OUTPUT DEVICES
-
- Selecting A Raster Output Device . . . . . . . . . . . . . . . . .
- Printer Emulations . . . . . . . . . . . . . . . . . . . . . . . .
- Epson FX Emulation. . . . . . . . . . . . . . . . . . . . . .
- Epson LQ Emulation. . . . . . . . . . . . . . . . . . . . . .
- HP LaserJet Series II Emulation . . . . . . . . . . . . . . .
- PostScript Emulation. . . . . . . . . . . . . . . . . . . . .
- HP PaintJet Emulation . . . . . . . . . . . . . . . . . . . .
- Device Driver Descriptions . . . . . . . . . . . . . . . . . . . .
- EPFX - Epson FX Series. . . . . . . . . . . . . . . . . . . .
- EPFXWC - Epson FX Wide Carriage Series. . . . . . . . . . . .
- EPLQ - Epson LQ Series. . . . . . . . . . . . . . . . . . . .
- EPLQWC - Epson LQ Wide Carriage Series. . . . . . . . . . . .
- EPLQLO - Epson LQ Series (Low Resolution) . . . . . . . . . .
- EPLQLOWC - Epson LQ Wide Carriage Series (Low Resolution) . .
- CITMSP10 - Citizen MSP-10 . . . . . . . . . . . . . . . . . .
- CITMSP15 - Citizen MSP-15 . . . . . . . . . . . . . . . . . .
- CITGSX140 - Citizen GSX 140 . . . . . . . . . . . . . . . . .
- HPLJET - HP LaserJet Series . . . . . . . . . . . . . . . . .
- HPLJET2P - HP LaserJet IIP . . . . . . . . . . . . . . . . .
- HPLJET3 - HP LaserJet III . . . . . . . . . . . . . . . . . .
- HPLJET3P - HP LaserJet IIIP . . . . . . . . . . . . . . . . .
- HPDJET - HP DeskJet, DeskJet Plus, DeskJet 500. . . . . . . .
- HPDJETC - HP DeskJet 500C . . . . . . . . . . . . . . . . . .
- HPPJET - HP PaintJet. . . . . . . . . . . . . . . . . . . . .
- HPPJETXL - HP PaintJet/XL . . . . . . . . . . . . . . . . . .
- HPTJET - HP ThinkJet. . . . . . . . . . . . . . . . . . . . .
- EPS - PostScript. . . . . . . . . . . . . . . . . . . . . . .
- PCX - PCX Monochrome File Format. . . . . . . . . . . . . . .
- PCXC - PCX Color File Format. . . . . . . . . . . . . . . . .
- PCXEGA - PCX EGA Monochrome File Format . . . . . . . . . . .
- PCXEGAC - PCX EGA Color File Format . . . . . . . . . . . . .
- PCXVGA - PCX VGA Monochrome File Format . . . . . . . . . . .
- PCXVGAC - PCX VGA Color File Format . . . . . . . . . . . . .
- PCXHERC - PCX Hercules Monochrome File Format . . . . . . . .
- PCXSVGA - PCX Super-VGA Monochrome File Format. . . . . . . .
- PCXSVGAC - PCX Super-VGA Color File Format. . . . . . . . . .
- PCX8514 - PCX 8514 Monochrome File Format . . . . . . . . . .
- PCX8514C - PCX 8514 Color File Format . . . . . . . . . . . .
- EGA - EGA Monitor Driver. . . . . . . . . . . . . . . . . . .
- VGA - VGA Monitor Driver. . . . . . . . . . . . . . . . . . .
- EGAMONO - EGAMONO Monitor Driver. . . . . . . . . . . . . . .
- VGAMONO/MCGA - VGAMONO/MCGA Monitor Driver. . . . . . . . . .
- HERC - HERC Monitor Driver. . . . . . . . . . . . . . . . . .
-
- PGL TOOLKIT FUNCTION REFERENCE
-
- System Functions . . . . . . . . . . . . . . . . . . . . . . . . .
- Device Information Functions . . . . . . . . . . . . . . . . . . .
- Bitmap Output Functions. . . . . . . . . . . . . . . . . . . . . .
- Drawing Functions. . . . . . . . . . . . . . . . . . . . . . . . .
- Graphics Attribute Functions . . . . . . . . . . . . . . . . . . .
- Graphics Text Functions. . . . . . . . . . . . . . . . . . . . . .
- Description Format . . . . . . . . . . . . . . . . . . . . . . . .
- Quick Reference: Functional Listing. . . . . . . . . . . . . . . .
- System. . . . . . . . . . . . . . . . . . . . . . . . . . .
- Device Info . . . . . . . . . . . . . . . . . . . . . . . .
- Bitmap. . . . . . . . . . . . . . . . . . . . . . . . . . .
- Drawing . . . . . . . . . . . . . . . . . . . . . . . . . .
- Attributes. . . . . . . . . . . . . . . . . . . . . . . . .
- Text. . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Quick Reference: Alphabetical Listing. . . . . . . . . . . . . . .
- pgArc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgBMData . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgBMEnd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgBMInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgCircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgClearDrw . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgClearViewPort. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgDrawText . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgDrawTextXY . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgEllArc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgEllipse. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgEndDrw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetAbsX. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetAbsY. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetCharSpacing . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetClipArea. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetClipping. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetColor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevColors . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevHeight . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevModes. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevOffsetX. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevOffsetY. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevPlanes . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevResX . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevResY . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevType . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetDevWidth. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetFillMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetFillPattern . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetFillStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetLinePattern . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetLineWeight. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetMaxX. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetMaxY. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextBolding . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextHeight. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextJustify . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextLength. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextOrient. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextScaling . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetTextStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetViewPort. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgGetY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgInitDrw. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgLineRel. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgLineTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgLoadDevInfo. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgMoveRel. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgMoveTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgNewPage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgOpenDrw. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgPie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgPolygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgPolyLine . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgRectangle. . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetCharSpacing . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetClipArea. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetClipping. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetColor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetDefaults. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetFillMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetFillPattern . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetFillStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetLinePattern . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetLineWeight. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetPageForm. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetPageMargins . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetPageSize. . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetPalette . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetPixel . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetRgbPalette. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetTextBolding . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetTextJustify . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetTextOrient. . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetTextScaling . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetTextStyle . . . . . . . . . . . . . . . . . . . . . . . . . .
- pgSetViewPort . . . . . . . . . . . . . . . . . . . . . . . . . .
-
- APPENDICES
-
- A: Function Summary. . . . . . . . . . . . . . . . . . . . . . . .
-
-
- ******************************
- ** Chapter 1: INTRODUCTION **
- ******************************
-
-
- First, we would like to welcome you to the PGL ToolKit. AnSoft is proud
- to introduce the first professional quality set of libraries for producing
- printer graphics. We believe the ToolKit to be highly versatile and
- comprehensive in its functionality. PGL supports six major programming
- languages (C, Pascal, Basic, Fortran, Assembly, and Clipper) and most
- popular printers.
-
-
- PGL Overview
-
- The major features of the PGL ToolKit are:
-
- * 80+ function printer graphics library -- works very much like most
- screen graphics libraries.
-
- * Provides high resolution graphics output at the printer's full
- resolution.
-
- * Unlimited virtual drawing resolution up to 32767x32767 and 256
- colors.
-
- * Supports 28+ compiler versions and six programming languages
- including C, Pascal, Basic, Fortran, Assembly, and Clipper.
-
- * Supports most popular printers including Epson (9 and 24 pin) dot
- matrix printers, HP LaserJet, DeskJet, PaintJet printers, PostScript
- printers, PCX file output, and all printers capable of emulating a
- supported printer.
-
- * Operates independently or may be used in conjunction with any screen
- graphics library.
-
- * Using the printing utilities, you may preview your drawing file on
- screen prior to printing.
-
- * Produces high resolution printouts utilizing as little as 8K of
- memory.
-
- * Small linkable library (approximately 20K).
-
- * Ability to print graphics from within your application by spawning
- the GPU print utility or store your graphics commands in a vector
- drawing file. Stored graphics may be printed from outside your
- application using either a command line utility or a menu driven
- printing utility program. Complete versatility is provided allowing
- you to specify:
-
- Fully adjustable page margins
- Predefined Half, Full, and Quarter page sizes
- Portrait or Landscape page orientation
- Normal or Reverse image printing
- Multiple files
- Multiple copies
- Normal or High density mode for fill operations
- Output at any valid printer resolution
- Enable or Disable use of expanded memory (LIM 3.2 or above)
- User adjustable memory requirements during printing
-
- * Ability to print user generated bitmap images such as graphics
- screens or off-screen bitmaps generated by third party graphics
- libraries.
-
- * Full support is provided for printing through a parallel or serial
- port interface.
-
- * Seven fully scalable stroked font sets including SMALL, SIMPLEX,
- DUPLEX, TRIPLEX, GOTHIC, SCRIPT, and DUPLEX SCRIPT with unlimited
- bolding of each font set.
-
- * NO ROYALTIES!
-
-
- System Requirements
-
- The items listed below are considered to be a minimum operating environ-
- ment for incorporating the ToolKit:
-
- * An IBM PC, PS/2 or 100% compatible computer.
-
- * A floppy drive or hard disk (hard disk is recommended).
-
- * MS-DOS 2.1 or above.
-
- * A supported compiler and printer.
-
-
- About This Manual
-
- This manual is setup to allow you to quickly start programming with PGL.
- You need to read the chapters titled "INSTALLATION" and "QUICKSTART" to
- get started. The PGL product design philosophy is described in the
- chapter "PGL PHILOSOPHY", followed by detailed programming instructions
- in "PROGRAMMING WITH PGL". Next, "WORKING WITH BITMAPS" is devoted
- strictly to the issue of how to output a bitmapped image to the drawing
- file for printing. The chapter "PRINTING" then details the procedure for
- obtaining high resolution printed output with PGL. "SUPPORTED OUTPUT
- DEVICES" describes the supported printers, file formats, and screen
- drivers. The screen drivers allow you to replay drawing files to the
- screen. These drivers are not intended to replace your screen graphics
- libraries. They simply allow you to preview a drawing file before
- printing it. Finally, "PGL TOOLKIT FUNCTION REFERENCE" describes each
- graphics function provided with PGL. The functions are listed
- alphabetically.
-
-
- Registration
-
- It is extremely important that you register the PGL ToolKit by sending in
- the accompanying registration form. This will entitle you to technical
- support and discounts on future products and upgrades.
-
-
- Technical Support
-
- We may be contacted at the following address and phone number:
-
- AnSoft, Inc.
- 8254 Stone Trail Court
- Laurel, Maryland 20723 USA
- Voice/FAX: (301) 470-2335
-
- You may call us by phone Monday through Friday from 9AM to 5PM EST, or
- you may send a FAX or leave a message anytime.
-
-
- ******************************
- ** Chapter 2: INSTALLATION **
- ******************************
-
-
- You may utilize the installation program to prompt you for all necessary
- information and automatically install the PGL ToolKit or you may install
- PGL manually (see Manual Installation below ). Before installing PGL
- you should:
-
- * Create a backup copy of the distribution diskettes and store the
- originals in a safe place.
-
- * Read the READ.ME file from the distribution diskettes for any changes
- to the software and/or manual.
-
-
- Backup
-
- The distribution diskettes are DS, DD (360K) for 5.25" disks and DS, DD
- (720K) for 3.5" disks. You should make a backup copy of the distribution
- diskettes before proceeding any further. You may do this by using the
- DOS DISKCOPY program. This will copy all files, including those in
- subdirectories, from our source disk to your destination disk. Once
- completed, you should work with the backup disks and place the originals
- in a safe place.
-
- EXAMPLE: C:\>DISKCOPY A: A:
-
-
- About the Distribution Disks
-
- The PGL ToolKit supports several languages. The majority of you will
- most likely use only one or two of these. The following general
- description should help you determine which files on the distribution
- diskettes you need to install.
-
- All files located on the System Disk must be installed. These files and
- programs are language independent and include the device drivers, font
- files, print utility programs, etc.
-
- The files which are language specific are grouped in individual sub-
- directories on the Library Disk. These subdirectories are logically
- named C, PASCAL, FORTRAN, BASIC, and CLIPPER (Assembly programmers should
- use the C libraries). Within each subdirectory, there may or may not be
- different libraries for different compilers in that language. For
- example, there are separate libraries for Microsoft Fortran and Lahey
- Fortran. You should refer to the section on Include Files and Libraries
- in the QUICKSTART chapter for further details about which compilers each
- PGL library supports. The installation program only needs to know which
- compiler you are using.
-
-
- Automatic Installation
-
- An installation program is provided on the distribution diskettes. To
- install PGL, place the disk in drive A: and enter the commands:
-
- C:\>A:
- A:\>INSTALL
-
- If you are installing from a different drive, simply substitute that
- drive letter for A. The installation program will prompt you for all
- necessary information. You may rerun the installation program at any
- time to reinstall all files or select additional libraries to install.
-
-
- Manual Installation
-
- Manual installation of PGL requires you to read the Include Files and
- Libraries section in the QUICKSTART chapter to help you decide which
- libraries to install. The PGL libraries are compressed into several
- self-extracting archives. You must copy these archives to your hard disk
- and decompress the libraries as outlined below. A listing of which
- libraries are contained in each archive is listed below. To install PGL
- manually, perform the following steps, assuming the PGL diskettes use
- drive A: and you are installing on the C: hard drive:
-
- 1. Create a PGL subdirectory on your hard disk.
-
- C:\>MD PGL
- C:\>CD PGL
-
- 2. Copy the PGL system files archive and the READ.ME file from the
- System Disk to the PGL directory.
-
- C:\PGL>COPY A:*.*
-
- 3. Decompress the PGL system files and delete the archive. This will
- extract all files from the archive.
-
- C:\PGL>PGLSYS
- C:\PGL>DEL PGLSYS.EXE
-
- 4. Create a subdirectory for each language you wish to install. As an
- example, assume you wish to install libraries for Quick Basic.
-
- C:\PGL>MD QB
- C:\PGL>CD QB
-
- 5. Copy the Quick Basic archives from the Library Disk's BASIC sub-
- directory. The Quick Basic archive names are listed below, as well
- as for each language, and are PGL_QB.EXE, INC_BAS.EXE, and
- EX_BAS.EXE.
-
- C:\PGL\QB>COPY A:\BASIC\PGL_QB.EXE
- C:\PGL\QB>COPY A:\BASIC\INC_BAS.EXE
- C:\PGL\QB>COPY A:\BASIC\EX_BAS.EXE
-
- 6. Decompress the self-extracting Quick Basic archives and delete the
- archives.
-
- C:\PGL\QB>PGL_QB
- C:\PGL\QB>DEL PGL_QB.EXE
-
- C:\PGL\QB>INC_BAS
- C:\PGL\QB>DEL INC_BAS.EXE
-
- C:\PGL\QB>EX_BAS
- C:\PGL\QB>DEL EX_BAS.EXE
-
- 7. You must modify your AUTOEXEC.BAT file to include the PGL environment
- variable. If you installed the PGL system files in C:\PGL, then add
- the following line to your AUTOEXEC.BAT file.
-
- SET PGL=C:\PGL
-
- The above procedure manually installs a single language, BASIC in this
- example. The procedure is the same for each language you wish to
- install. Again, the names of the libraries, include files, and example
- files used by each language are listed in the section Include Files and
- Libraries in the QUICKSTART chapter. A listing of archives is given
- below in Languages and Archives.
-
-
- Languages and Archives
-
- C/C++
-
- Turbo C 1.x, 2.0, Turbo C++ 1.0, Borland C++ 2.0
- Microsoft C 5.x, 6.x, Quick C 1.x, 2.x
- WATCOM 7.0, 8.x
-
- PGL_CL.EXE
- INC_CL.EXE
- EX_CL.EXE
-
-
- Fortran
-
- Microsoft Fortran 3.x, 4.x, 5.x
-
- PGL_MF.EXE
- INC_FOR.EXE
- EX_FOR.EXE
-
- Lahey Fortran 3.x, 4.x, 5.x
-
- PGL_LF.EXE
- INC_FOR.EXE
- EX_FOR.EXE
-
-
- Pascal
-
- Turbo Pascal 4.x, 5.x, 6.0
-
- PGL_TP.EXE
- INC_TP.EXE
- EX_TP.EXE
- Basic
-
- Microsoft Quick Basic 4.x, Basic PDS 6.0
-
- PGL_QB.EXE
- INC_BAS.EXE
- EX_BAS.EXE
-
- Microsoft Basic PDS 7.x
-
- PGL_B7.EXE
- INC_BAS.EXE
- EX_BAS.EXE
-
-
- Clipper
-
- Clipper '87
-
- PGL_CL87.EXE
- INC_CLIP.EXE
- EX_CLIP.EXE
-
- Clipper 5.x
-
- PGL_CL5.EXE
- INC_CLIP.EXE
- EX_CLIP.EXE
-
-
- ****************************
- ** Chapter 3: QUICKSTART **
- ****************************
-
-
- We assume the majority of you programming for printer graphics have
- previous experience working with screen graphics libraries or at least a
- working knowledge of computer graphics in general. With this in mind,
- this chapter is intended to provide the experienced programmer with the
- necessary information to quickly get started programming or integrating
- the ToolKit into existing applications. For those less experienced
- programmers, a more comprehensive discussion on programming with PGL is
- provided in Chapter 5.
-
- All development libraries adopt a design philosophy as to how they work
- -- PGL is no different in this respect. For example, some printer
- graphics libraries allow you to address one device at a time whether it
- be the screen or printer, others can only print from a virtual bitmap
- generated off-screen which requires you to have enough free memory to
- create the bitmap. Whatever the design philosophy, the capabilities and
- limitations of any third party library will undoubtedly influence how you
- design your program. We highly recommend that you also read Chapter 4 on
- "PGL PHILOSOPHY" before integrating PGL into your application.
-
-
- Supported Compilers
-
- As of the writing of this manual, the following is a list of compilers
- and their versions which PGL is known to be compatible with. These are:
-
- C Microsoft C 5.x, 6.x
- Quick C 1.x, 2.x
- Turbo C 1.x, 2.0
- Turbo C++ 1.0
- Borland C++ 2.0
- WATCOM C 7.0, 8.x
-
- PASCAL Turbo Pascal 4.x, 5.x, 6.x
-
- BASIC Microsoft Basic PDS 6.x, 7.x
- Quick Basic 4.x
-
- FORTRAN Lahey Fortran F77L 3.x, 4.x, 5.x
- Microsoft Fortran 3.x, 4.x, 5.x
-
- CLIPPER Clipper '87, 5.x
-
- ASSEMBLY Microsoft Assembler 4.x, 5.x, 6.x
- Turbo Assembler 1.0, 2.x
-
- The PGL linkable libraries, for the most part, simply write binary
- graphics codes to a drawing file. As such, we expect PGL to be
- compatible with any compiler that can use Microsoft format object modules
- and uses either the C, Fortran, Basic, or Pascal calling convention. The
- compilers listed above are simply the ones we have tested thus far. Refer
- to the READ.ME file for an up-to-date listing.
-
-
- Function Naming Convention
-
- All PGL functions are prefaced with the letters pg, short for printer
- graphics. This is a standard practice among developers of third party
- libraries in order to avoid possible conflicts with function names. We
- have made a conscious effort to provide function names which are somewhat
- self-descriptive and have adhered, for the most part, to utilizing names
- similar to those found in other graphics libraries in order to minimize
- confusion and get you up and programming as quickly as possible.
-
- The function names are identical for all languages except Clipper. It
- was necessary to abbreviate Clipper function names due to the limitation
- imposed by Clipper of allowing no more than 10 characters for variable
- and function names.
-
-
- Strings
-
- For the Microsoft Fortran interface, strings are required to be passed in
- a C compatible format (i.e. they must be NULL terminated). This is
- accomplished by appending a C or a NULL character at the end of all
- strings just after the closing single quote mark. Note that this format
- is only used by Microsoft Fortran.
-
- EXAMPLE: CALL pgDrawText( 'String'C )
-
- For the Lahey Fortran interface, strings are not required to be NULL
- terminated. This may cause problems if you try to justify text but pass
- a string containing trailing blank characters. The ToolKit performs a
- backwards search for the first non-blank or NULL character. Text
- justification is then based on the length of the remaining string. If
- you intend your strings to have trailing blanks, you should NULL
- terminate the string with CHAR(0).
-
- EXAMPLE: CALL pgDrawText( 'String '//CHAR(0) )
-
- This string format is supported by both Lahey and Microsoft Fortran.
-
-
- Error Handling
-
- The majority of PGL functions do not return an error code. This is due
- to the fact that these functions, for the most part, simply write binary
- graphics codes to a file. When errors do occur, they are most likely
- related to an I/O problem. PGL does, however, set an internal error flag.
- You may use the pgGetStatus function to return the current error status
- as an aid in debugging. You should call the pgGetStatus function from
- time to time just to be sure no disk I/O errors have occurred. If
- pgGetStatus returns a non-zero value, all PGL knows is that a disk I/O
- error (such as "disk full") occurred. Each time pgGetStatus is called,
- the internal error flag is reset to 0.
-
-
- Integrating the PGL Library
-
- When dealing with a new graphics library, it is often helpful to know how
- to properly initialize and end a graphics session. The following code
- stubs should help the experienced graphics programmer quickly get started
- integrating PGL.
-
-
- C #include "c:\pgl\c\pgl.h"
- int ierr;
-
- pgInitDrw( "test.plt", 2000, 2000, &ierr );
- ...
- Your graphics commands for page 1
- ...
- pgNewPage();
- ...
- Your graphics commands for page 2
- ...
- pgEndDrw();
-
- FORTRAN include 'c:\pgl\for\pgl.for'
- integer*2 ierr
- call pgInitDrw( 'test.plt'//char(0), 2000, 2000, ierr )
- ...
- Your graphics commands for page 1
- ...
- call pgNewPage
- ...
- Your graphics commands for page 2
- ...
- call pgEndDrw
-
- PASCAL uses PGL
- var
- ierr : integer;
- pgInitDrw( 'test.plt', 2000, 2000, ierr );
- ...
- Your graphics commands for page 1
- ...
- pgNewPage;
- ...
- Your graphics commands for page 2
- ...
- pgEndDrw;
-
- BASIC '$INCLUDE: 'C:\PGL\BAS\PGL.BAS'
- call pgInitDrw( "test.plt", 2000, 2000, ierr% )
- ...
- Your graphics commands for page 1
- ...
- call pgNewPage
- ...
- Your graphics commands for page 2
- ...
- call pgEndDrw
-
-
- CLIPPER SET PROCEDURE TO PGL
- DO PGLINIT
- PUBLIC ierr
- pgINIT( "test.plt", 2000, 2000, @ierr )
- ...
- Your graphics commands for page 1
- ...
- pgNEWPG()
- ...
- Your graphics commands for page 2
- ...
- pgEND()
-
-
- The pgInitDrw command initializes all internal PGL drawing parameters to
- their default values and allows you to specify the file name for storing
- drawing commands and the virtual drawing resolution you wish to work with.
- Then simply call those functions necessary to create your drawing. When
- your drawing is complete, call pgNewPage to force a page eject, then
- continue drawing to the next page. The pgEndDrw function is called to
- close the drawing file opened by pgInitDrw. You may then exit your
- application or call pgInitDrw again to initialize another drawing file
- and continue. The pgEndDrw function automatically calls pgNewPage,
- therefore you do not need to explicitly call pgNewPage for a single page
- of printout or for your last page of printout. Doing so will simply
- cause an extra blank page to be printed.
-
-
- Include Files and Libraries
-
- C Language
-
- C programmers should use the PGL_CL.LIB library and the PGL.H
- include file. This library is memory model independent and may be
- used with either SMALL, MEDIUM, or LARGE memory model programs. All
- functions in the C library are called as FAR functions and all data
- pointers and addresses are passed as FAR pointers and addresses.
- This library utilizes the Microsoft Large Memory Model for data and
- code. If you are using a C compiler not specifically listed as
- being supported by PGL, you must be sure that the ds register
- contains the segment address of the default data segment (DGROUP)
- before calling a PGL function. The PGL_CL.LIB library may be used
- with Microsoft C, Quick C, WATCOM C, Turbo C/C++, and Borland C++.
-
-
- Fortran Language
-
- Lahey Fortran 3.x, 4.x, and 5.x programmers should use the PGL_LF.LIB
- library and the PGL.FOR include file. Microsoft Fortran 3.x, 4.x,
- and 5.x programmers should use the PGL_MF.LIB library and the PGL.FOR
- include file. The Microsoft Fortran library must be used with LARGE
- memory model programs. Strings should be NULL terminated by
- appending a CHAR(0) at the end of the string or by using the
- Microsoft C string notation, i.e.
-
- MYSTRING = 'ABCDEFGH'//CHAR(0) ! Standard Fortran
- MYSTRING = 'ABCDEFGH'C ! Microsoft Fortran
-
-
- Pascal Language
-
- Turbo Pascal 6.0 programmers should use the PGL.TPU unit. This unit
- was compiled with Turbo Pascal 6.0. If you use another version of
- Turbo Pascal, you must recompile the file PGL.PAS with the PGL_TP.OBJ
- and PGLIO.OBJ files to create a new PGL.TPU unit for your version of
- Turbo Pascal.
-
-
- Basic Language
-
- Quick Basic 4.x and Basic 6.0 programmers should use the PGL_QB.LIB
- library and the PGL.BAS include file. Basic 7.x programmers should
- use the PGL_B7.LIB library and the PGL.BAS include file.
-
-
- Clipper Language
-
- Clipper '87 programmers should use the PGL_CL87.LIB library and the
- PGL.PRG include file. Clipper 5.x programmers should use the
- PGL_CL5 library and the PGL.PRG include file. Clipper functions
- which return data via PROCEDURE CALLS should pass arguments by
- reference as shown in the function description. The Clipper
- procedure prototypes indicate this by using the symbol <ref> prior
- to the argument, e.g.
-
- PROCEDURE pgGVIEWP( <ref>x0, <ref>y0, <ref>x1, <ref>y1 )
-
- Sample Call: PUBLIC x0, y0, x1, y1
- pgGVIEWP( @x0, @y0, @x1, @y1 )
-
-
- Assembly Language
-
- Assembly language programmers should use the PGL_CL.LIB library.
- All functions are FAR functions and use the C calling conventions.
- Addresses and pointers are FAR addresses and pointers. The caller
- pops all arguments pushed on the stack prior to each call. The
- memory model is setup like the Microsoft Large Memory Model. The
- ds register must point to the default data segment (DGROUP). The
- functions freely modify the ax, bx, cx, dx, and es registers. The
- functions preserve the bp, sp, si, di, and ds registers and return
- 16 bit integers in the ax register.
-
-
- Compiling and Linking
-
- The ToolKit requires no special handling to build applications. In C,
- FORTRAN, and BASIC, you must use an include statement to incorporate the
- ToolKit constant definitions and prototypes into your program. The
- include statement tells your compiler how each function works and the
- value of any ToolKit manifest constants. If you use Turbo Pascal, you
- must be sure to use the 'Uses PGL' command. If you program in Clipper,
- you must include the following two commands at the top of your source
- file:
-
- SET PROCEDURE TO PGL
- DO PGLINIT
-
- To link with the ToolKit, you must include the appropriate library name
- in the library section of your link command. The ToolKit provides
- libraries in standard Microsoft format.
-
-
- Quick Libraries
-
- If you program in Quick Basic and want a Quick library, you must build it
- yourself. You should refer to your documentation on building Quick
- libraries. Listed below are example commands required to build Quick
- libraries for the various versions of Quick Basic:
-
- Quick Basic 4.0
-
- LINK PGL_QB.LIB, PGL_QB /Q,,BQLB40;
-
- Quick Basic 4.5
-
- LINK PGL_QB.LIB, PGL_QB /Q,,BQLB45;
-
- QBX
-
- LINK PGL_B7.LIB, PGL_B7 /Q,,QBXQLB;
-
- When using the Quick Basic environment, you must still use the BASIC
- PGL.BAS include file and load the Quick library when you start Quick
- Basic as follows:
-
- QB FILLPAT /LPGL_QB.QLB ; Quick Basic 4.x
- QB FILLPAT /LPGL_B7.QLB ; Quick Basic 7.x
-
-
- Example Programs
-
- The ToolKit includes several example programs that demonstrate the proper
- usage of the basic functions. A set of examples is provided for each
- language. Assembly language programmers should refer to the C language
- examples. Also included are the corresponding drawing files generated
- by each example program. You may print these drawing files with the GPU,
- GPMENU, and PGL2PS printing utility programs.
-
-
- No Royalties
-
- As spelled out in the License Agreement, there are no royalties associated
- with the PGL ToolKit. You may distribute the printing utility programs,
- device drivers, and font files royalty free with any executable program
- you create. You may not distribute any of the libraries under any
- circumstance.
-
-
- ********************************
- ** Chapter 4: PGL PHILOSOPHY **
- ********************************
-
-
- This chapter deals with the design philosophy of the PGL ToolKit. The
- capabilities and limitations of the ToolKit are briefly outlined. The
- purpose of this chapter is to provide a general outline of how PGL
- operates, therefore, the issues discussed here are presented in broad
- terms. Each topic is presented in more detail in the next chapter and
- in the individual function descriptions.
-
-
- Design Philosophy
-
- In developing the ToolKit, our goal was to provide a set of libraries
- which meet the following criteria:
-
- * Support multiple languages so as to allow you to select and work
- with the one most suited to your application.
-
- * Operate independently of other libraries so that PGL may be used
- stand-alone or in conjunction with any third party screen graphics
- library.
-
- * Provide a printing environment with a high level of versatility to
- allow you full control of the printing process.
-
- * Provide the capability to print bitmapped images generated by other
- third party graphics libraries.
-
- * Provide a set of graphics functions rivaling those of most popular
- screen graphics libraries.
-
- * Be able to print interactively from within your application and save
- the graphics in an industry standard 'MetaFile' style drawing file
- and print them from outside your application.
-
- * Give you a user friendly printing environment by providing a menu
- driven printing utility program.
-
- * Provide fast high resolution graphics output on a wide variety of
- popular printers.
-
- * Support most popular printer devices.
-
- We believe we have met the above design criteria with the PGL ToolKit.
- We realize, however, that we could not have possibly anticipated every
- feature you would like to have at your disposal. We welcome any
- suggestions you can give us as to how we may evolve the ToolKit further.
-
-
- Capabilities
-
- The ToolKit provides 80+ functions which allow you to move the cursor,
- set a virtual drawing resolution, draw lines, draw filled figures (e.g.
- rectangles, ellipses, pie slices, polygons, etc.), set and clear
- viewports, set clipping regions, and a number of graphics text functions
- for rendering any of seven fully scalable font sets. The majority of
- these are, by today's standard, considered to be common features in most
- graphics libraries.
-
- Most screen graphics libraries provide you with a command to initialize
- the graphics and automatically detect the highest video mode to work with.
- Where printer graphics are concerned, often times you may not be
- connected to a printer or you may not know what printers will be available
- to your end users. PGL is designed to allow your application to run
- whether or not you are connected to a printer device. You may specify
- any virtual drawing resolution up to 32767x32767 convenient for your
- application. The virtual drawing resolution is nothing more than an
- imaginary set of horizontal and vertical pixels. When you print, PGL
- handles the transformation from your virtual resolution to the printer's
- resolution taking into account the page margins, page size, and page
- orientation (landscape or portrait).
-
- Since PGL maps your virtual drawing resolution to the actual printable
- region, this allows you to develop general applications without regard to
- how drawing files will be printed, thereby, providing you with device
- independence. As an example, suppose you were to define a virtual
- resolution and draw a rectangle framing the upper-left quadrant of this
- region. You may print the drawing using various combinations of output
- device, page margins, size, layout, and printer resolution mode. The
- resulting outputs will show rectangles of different sizes, but the
- rectangle will always exactly frame the upper-left quadrant of the
- printable region. The drawback to providing you with device independence
- is that aspect ratios are not maintained as this example clearly shows.
- Refer to the chapter on "PROGRAMMING WITH PGL" for a detailed discussion
- on the subject of maintaining aspect ratios.
-
- Often times, you may prefer to work with the exact drawing resolution you
- will be printing at. If you know exactly how you will print (i.e. page
- margins, orientation, size, resolution, etc.) and you know which output
- device you will use, then you may load the information for that device
- with the appropriate print parameters and use the Device Information
- functions to return the exact pixel height and width of the drawing
- region, then simply initialize PGL with those values.
-
- PGL offers you the option of opening a new file for storing graphics
- commands or opening an existing drawing file for appending new graphics
- commands to. There are certain limitations when working with existing
- drawing files (see discussion below).
-
- Some screen graphics packages, such as the Genus GX and MetaWINDOW
- graphics libraries, allow you to create off-screen bitmap images of any
- virtual size. If you are using such a package, you may wish to print
- the bitmap directly, thereby, using one graphics engine to create images
- for both the screen and printer. You may also print screen images using
- the ToolKit. You should refer to the chapter on "WORKING WITH BITMAPS"
- for a detailed discussion on how to do this.
-
-
- Limitations
-
- Printer graphics are inherently different from screen graphics. As such,
- there are certain limitations which you should be aware of. Specifically,
- there are three limitations discussed here, all of which are related to
- the fact that when PGL functions are called, we simply write the
- corresponding graphics codes to a file -- we are not generating the bitmap
- off-screen at this time. PGL creates drawing files which are similar to
- industry standard MetaFiles.
-
- First of all, unlike screen graphics, when PGL functions are called, the
- bitmap image is not immediately created, but rather, the corresponding
- graphics codes are written to the drawing file specified in your call to
- pgInitDrw or pgOpenDrw. The bitmap images of your drawings are only
- created when you print the drawing file. This is not so much a
- limitation as it is a consideration when you design your application.
- Once PGL functions are called, the corresponding drawings will be created
- when you print the file. Therefore, if your application is such that you
- prompt the user as to whether or not hardcopies are desired, you must
- incorporate the appropriate logic in your program to determine when PGL
- functions are to be called and when drawing files should be printed.
-
- Secondly, since PGL does not generate the bitmap off-screen as functions
- are called, it is impossible to perform floodfill operations. For the
- same reason, information about specific pixels are not available,
- therefore, there is no function to return the value of a pixel.
-
- The third limitation is that no functions are provided to get and set the
- background color. If you desire a background color other than the color
- of the paper (usually white), you may do so by using a rectangular fill
- operation.
-
- PGL offers you the option of opening new drawing files with the pgInitDrw
- command or existing drawing files with the pgOpenDrw command. If you
- open an existing drawing file, all function calls for the current session
- are appended to the end of the file. When working with existing drawing
- files, you will need to know the virtual resolution associated with the
- file when it was originally created. You may use pgGetMaxX and pgGetMaxY
- to return the maximum addressable horizontal and vertical pixel,
- respectively. All new drawings you generate must be based on this
- virtual resolution. Also when working with existing drawing files, the
- graphics state at the end of the previous session is no longer valid.
- We leave it up to you to set the desired graphics state for the current
- session (i.e., drawing color, fill style, line style, viewport, clipping
- region, etc.).
-
-
- **************************************
- ** Chapter 5: PROGRAMMING WITH PGL **
- **************************************
-
-
- Supported Compilers
-
- As of the writing of this manual, the following is a list of compilers
- and their versions which PGL is known to be compatible with. These are:
-
- C Microsoft C 5.x, 6.x
- Quick C 1.x, 2.x
- Turbo C 1.x, 2.0
- Turbo C++ 1.0
- Borland C++ 2.0
- WATCOM C 7.0, 8.x
-
- PASCAL Turbo Pascal 4.x, 5.x, 6.x
-
- BASIC Microsoft Basic PDS 6.x, 7.x
- Quick Basic 4.x
-
- FORTRAN Lahey Fortran F77L 3.x, 4.x, 5.x
- Microsoft Fortran 3.x, 4.x, 5.x
-
- CLIPPER Clipper '87, 5.x
-
- ASSEMBLY Microsoft Assembler 4.x, 5.x, 6.x
- Turbo Assembler 1.0, 2.x
-
- The PGL linkable libraries, for the most part, simply write binary
- graphics codes to a drawing file. As such, we expect PGL to be
- compatible with any compiler that can use Microsoft format object modules
- and uses either the C, Fortran, Basic, or Pascal calling convention.
- The compilers listed above are simply the ones we have tested thus far.
- Refer to the READ.ME file for an up-to-date listing.
-
- Function Naming Convention
-
- All PGL functions are prefaced with the letters pg, short for printer
- graphics. This is a standard practice among developers of third party
- libraries in order to avoid possible conflicts with function names. We
- have made a conscious effort to provide function names which are
- somewhat self-descriptive and have adhered, for the most part, to
- utilizing names similar to those found in other graphics libraries in
- order to minimize confusion and get you up and programming as quickly as
- possible.
-
- The function names are identical for all languages except Clipper. It
- was necessary to abbreviate Clipper function names due to the limitation
- imposed by Clipper of allowing no more than 10 characters for variable
- and function names.
-
-
- Coordinate System
-
- The PGL coordinate system is like that of most other graphics libraries.
- The logical origin (0,0) is located at the upper-left hand corner of the
- page with X coordinates increasing horizontally from left to right and Y
- coordinates increasing vertically from top to bottom. X coordinates are
- always in the horizontal direction and Y coordinates are always in the
- vertical direction regardless of whether you are printing in the
- landscape or portrait mode.
-
- Individual pixels are addressed beginning with 0. For example, if you
- specify a virtual resolution of 2000x3000, X pixels range from 0-1999 and
- Y pixels range from 0-2999.
-
- There are two types of coordinate systems provided by the ToolKit. These
- are the absolute virtual and viewport systems. The absolute virtual
- coordinate system is defined by calling pgInitDrw and passing it as
- arguments the maximum number of horizontal and vertical addressable pixels
- up to 32767x32767. This is a fictitious resolution, hence, the term
- virtual coordinates. The logical origin (0,0) is located at the upper-
- left hand corner of the page regardless of whether the page orientation
- is portrait or landscape. All subsequent graphics coordinates are
- specified relative to this point until you define a viewport.
-
- The second type of coordinate system is the viewport system. You may use
- the pgSetViewPort command to define a rectangular region on the page for
- displaying graphics. This region is generally smaller than that defined
- by the absolute virtual coordinate system. Once defined, the logical
- origin becomes the upper-left hand corner of the viewport. All
- subsequent graphics coordinates are specified relative to this point
- until the viewport is changed by another call to pgSetViewPort.
-
-
- Virtual Drawing Resolution
-
- When dealing with screen graphics libraries, you are limited to working
- with a fixed set of resolutions supported by the library and your graphics
- system. This is not the case when working with printer graphics. Each
- printer obviously has a maximum resolution which you may work with,
- however, you may change the resolution of the printable region simply by
- changing the page margins. In other words, if you specify a larger
- margin, then the number of pixels you may draw to is smaller. There are
- thousands of combinations of margins that may be set, far too many to
- include in the ToolKit and we did not wish to limit you to printing with
- a fixed number of preset margins.
-
- The ToolKit allows you to define a virtual drawing resolution to work
- with. Virtual drawing resolutions are nothing more than an imaginary set
- of (x,y) pixels. When printing, we simply perform a linear transformation
- from your virtual drawing resolution to the resolution of the printable
- region on the page. Virtual drawing resolutions are set with the
- pgInitDrw function.
-
- You should always work with a relatively large virtual drawing resolution
- (on the order of 2000x2000 or greater). The reason for this is that
- printer resolutions are much higher than screen resolutions. For example,
- laserjets provide 300 dots per inch in the high resolution mode. Printing
- in landscape mode and allowing for one inch borders on all sides gives
- you a drawing region of 9" by 6.5". This translates to a drawing
- resolution of 2700 by 1950 pixels at 300 dots per inch. If you work with
- a virtual drawing resolution much smaller than the resolution at which
- you will be printing, then you are not taking full advantage of the high
- resolution capability of your printer.
-
-
- Aspect Ratio
-
- An inherent problem in working with virtual drawing resolutions is that
- aspect ratios are not maintained. You may correct for the aspect ratio,
- but, there are two factors which you must take into consideration. First,
- suppose you were to specify a virtual drawing resolution of 2000x2000
- pixels and outline the region using line draws. Since the specified
- resolution is square, you might expect the printout to also be a square.
- This is not the case. Consider what happens if you were to print the
- drawing with the settings mentioned in the previous section giving you a
- printer resolution of 2700x1950 pixels. At print time, PGL will map the
- 2000x2000 virtual drawing resolution pixels to the 2700x1950 printer
- resolution pixels. This means that your 2000x2000 virtual square will
- actually print as a 2700x1950 rectangle. One solution is to adjust the
- page margins such that the printer resolution matches the virtual drawing
- resolution. If you want your printouts to be a certain size, you could,
- alternatively, specify a virtual drawing resolution which matches the
- printer resolution (see discussion below). Matching the virtual drawing
- resolution with the printer resolution (or vice versa) may not be
- sufficient to maintain aspect ratios as will be explained below.
-
- The second factor you must consider is the aspect ratio of the printer or
- output device. Printers simply address a series of horizontal and
- vertical pixels which can be "lit" to create your drawing. The physical
- spacing between horizontal pixels compared with that of vertical pixels
- for a particular resolution mode determines the printer's aspect ratio.
- For example, most laserjet printers provide 300 by 300 dots per inch in
- the high resolution mode, or simply, just 300 dpi (specifications which
- list a single dpi measure usually apply to both directions). This
- translates to 300:300 or a 1:1 aspect ratio (i.e., 300 consecutive pixels
- horizontally measures exactly 1" as does 300 consecutive vertical pixels).
- Not all printers have 1:1 aspect ratios as is the case with many dot
- matrix printers. As an example, Epson LQ printers have a dpi
- specification of 360 by 180 in the high resolution mode which translates
- to an aspect ratio of 2:1. This means that a 1" horizontal line
- consists of 360 pixels, whereas, a 1" vertical line consists of only 180
- pixels. You should be aware that printer aspect ratios may vary for
- different resolution modes. In low resolution mode, the Epson LQ has a
- dpi specification of 180 by 180 or a 1:1 aspect ratio.
-
- On the surface, the chore of maintaining aspect ratios may seem burdensome
- if not confusing, but it's really not as complicated as it appears. The
- following discussion outlines a general procedure for maintaining aspect
- ratios. First, you must predetermine which printer or output device you
- will output to, then call pgLoadDevInfo to load the information for that
- device. You must also decide beforehand how you will print the drawing
- file with regard to page margins, page layout, page size, and resolution
- mode. The pgSetPageMargins, pgSetPageForm, and pgSetPageSize functions
- will allow you to set the three page parameters. You should then call
- pgGetDevMaxX and pgGetDevMaxY with the appropriate resolution mode to
- return the actual resolution of the printable region for this device and
- set of print parameters. Then, simply define the virtual drawing
- resolution to match using the pgInitDrw command. Performing this
- sequence of function calls simply insures that you will be drawing to a
- virtual resolution that is an exact match of the physical resolution
- which you will be printing at.
-
- You will also need to determine the width:height pixel aspect ratio of
- the output device for a specific resolution mode. This information is
- returned by the pgGetDevResX and pgGetDevResY functions as the number of
- dots per inch horizontally and vertically, respectively. You may then
- use this information to correct for the aspect ratio. For example, if
- the width:height aspect ratio is 240:72, then simply multiply all your
- y-coordinates by 72/240 or all x-coordinates by 240/72, but not both.
- You may create a simple function to perform this conversion. That's all
- there is to it!
-
- EXAMPLE: Set the appropriate virtual drawing resolution and draw a
- square assuming printing will be on an Epson FX printer (or
- compatible) at resolution mode setting 2. Page parameters
- will be one inch margins on all sides, landscape format,
- and full page. Assume PGL was installed in the C:\PGL
- directory.
-
- C int resx, resy, aspx, aspy, ierr;
- ierr = pgLoadDevInfo( "C:\\PGL\\EPFX" );
- pgSetPageMargins( 100, 100, 100, 100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- resx = pgGetDevMaxX( 2 );
- resy = pgGetDevMaxY( 2 );
- pgInitDrw( "TEST.PLT", resx, resy, &ierr );
- aspx = pgGetDevResX( 2 );
- aspy = pgGetDevResY( 2 );
- pgMoveTo( 0, 0 );
- pgLineRel( 0, 100*aspy/aspx );
- pgLineRel( 100, 0 );
- pgLineRel( 0, -100*aspy/aspx );
- pgLineRel( -100, 0 );
-
- Pascal resx, resy, aspx, aspy, ierr : integer;
- ierr = pgLoadDevInfo( 'C:\PGL\EPFX' );
- pgSetPageMargins( 100, 100, 100, 100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- resx = pgGetDevMaxX( 2 );
- resy = pgGetDevMaxY( 2 );
- pgInitDrw( 'TEST.PLT', resx, resy, ierr );
- aspx = pgGetDevResX( 2 );
- aspy = pgGetDevResY( 2 );
- pgMoveTo( 0, 0 );
- pgLineRel( 0, 100*aspy DIV aspx );
- pgLineRel( 100, 0 );
- pgLineRel( 0, -100*aspy DIV aspx );
- pgLineRel( -100, 0 );
-
- Basic call pgSetPageMargins( 100, 100, 100, 100 )
- ierr% = pgLoadDevInfo( "C:\PGL\EPFX" )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- resx% = pgGetDevMaxX%( 2 )
- resy% = pgGetDevMaxY%( 2 )
- call pgInitDrw( "TEST.PLT", resx%, resy%, ierr% )
- aspx% = pgGetDevResX%( 2 )
- aspy% = pgGetDevResY%( 2 )
- call pgMoveTo( 0, 0 )
- call pgLineRel( 0, 100*aspy%/aspx% )
- call pgLineRel( 100, 0 )
- call pgLineRel( 0, -100*aspy%/aspx% )
- call pgLineRel( -100, 0 )
-
- Fortran integer*2 resx, resy, aspx, aspy, ierr
- ierr = pgLoadDevInfo( 'C:\PGL\EPFX' )
- call pgSetPageMargins( 100, 100, 100, 100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- resx = pgGetDevMaxX( 2 )
- resy = pgGetDevMaxY( 2 )
- call pgInitDrw( 'TEST.PLT', resx, resy, ierr )
- aspx = pgGetDevResX( 2 )
- aspy = pgGetDevResY( 2 )
- call pgMoveTo( 0, 0 )
- call pgLineRel( 0, 100*aspy/aspx )
- call pgLineRel( 100, 0 )
- call pgLineRel( 0, -100*aspy/aspx )
- call pgLineRel( -100, 0 )
-
- Clipper public resx, resy, aspx, aspy, ierr
- ierr = pgLDINFO( "C:\PGL\EPFX" )
- pgSPMARGIN( 100, 100, 100, 100 )
- pgSPFORM( pgLANDSCAPE )
- pgSPSIZE( pgFULLPAGE )
- resx = pgGDMAXX( 2 )
- resy = pgGDMAXY( 2 )
- pgINIT( "TEST.PLT", resx, resy, @ierr )
- aspx = pgGDRESX( 2 )
- aspy = pgGDRESY( 2 )
- pgMOVTO( 0, 0 )
- pgLINREL( 0, 100*aspy/aspx )
- pgLINREL( 100, 0 )
- pgLINREL( 0, -100*aspy/aspx )
- pgLINREL( -100, 0 )
-
-
- The pgArc, pgCircle, and pgPie functions will always produce true circles
- and circular arcs, however, they may not print as you would expect since
- they are defined with only one radius which PGL applies in the horizontal
- direction. You can maintain better control if you adjust for the aspect
- ratio and use the complimentary pgEllArc, pgEllipse, and pgSector
- functions. These functions generate figures which are basically elliptic
- in nature, therefore, two radii are supplied.
-
-
- Color
-
- Color printers are becoming increasingly popular since they give your
- printouts an added dimension, however, when working with color, you must
- bear in mind that most printers handle color differently. There is no
- standard color palette as with screen graphics systems nor do they
- provide you with a standard number of colors. For this reason, we do
- not provide you with a list of manifest constants such as BLACK, BLUE,
- GREEN, etc., since these color indices are of little value for color
- printers.
-
-
- Color Palettes
-
- When using the ToolKit, colors are defined by specifying a color
- index in the range 0 to 255. It is up to you to know which colors
- are associated with these indices for your particular printer.
- Typically, however, on color printers, color index 0 is always
- associated with being BLACK and the highest color index supported
- by the printer is always associated with being WHITE (e.g., if your
- printer supports 8 colors, 0=BLACK and 7=WHITE). If you specify a
- color index outside the range of valid colors for a particular
- printer, the ToolKit forces the color to BLACK. This allows you to
- design graphics for a color printer and still obtain suitable
- printout on a black and white printer.
-
- The ToolKit allows you to create drawing files using color values in
- the range 0 to 255. At print time, any colors which are out of range
- will be set to BLACK or to whatever color is defined by palette entry
- zero. The color defined by palette entry zero may be altered by
- using pgSetPalette to remap a different hardware color to entry 0
- or by using pgSetRgbPalette to specify a new set of RGB color
- values for palette entry zero.
-
- You can improve the color output for your printed drawings by
- specifically programming your applications to handle the different
- color capabilities of each color printer you support. The ToolKit
- supports the HP PaintJet, HP PaintJet/XL, and color PostScript
- printers. Each of these color printers has different color
- capabilities, therefore, the ToolKit provides the functions
- pgSetPalette and pgSetRgbPalette to simplify programming for these
- printers. Additionally, you can use pgLoadDevInfo and pgGetDevColors
- to determine the number of colors supported by a particular printer.
-
- The pgSetRgbPalette function sets the amount of Red, Green, and Blue
- (RGB) color to associate with a specific color index. This function
- is supported on the HP PaintJet, HP PaintJet/XL, and color PostScript
- printers.
-
-
- HP PaintJet
-
- The HP PaintJet supports a limited RGB capability. You can set the
- PaintJet to use any of 330 colors. The PaintJet User's Guide defines
- the 330 sets of RGB values that it can print. This reference guide
- is well worth obtaining if you will be programming extensively for
- the PaintJet. If you specify a set of RGB values on the PaintJet
- not found in it's list of printable colors, it will attempt to
- select the closest matching color. The PaintJet accepts values in
- the range 4 to 90 for it's Red, Green, and Blue color values. You
- can specify RGB values outside of this range, but you may not like
- the results. Although the PaintJet supports up to 330 colors, you
- can only work with 8 at a time (index values 0-7) at 180 dots per
- inch or 16 at a time (index values 0-15) at 90 dots per inch.
-
- If you do not specifically set the PaintJet's RGB palette, it will
- use a default palette to produce 16 colors at 90 dots per inch and
- 8 colors at 180 dots per inch. This color palette may be enough for
- most basic graphs and charts. You can use the pgSetPalette function
- to rearrange the PaintJet color indices to more closely match
- screen color indices.
-
- PaintJet Colors - 8 colors @180 dpi
-
- Index Color Index Color
-
- 0 BLACK 4 BLUE
- 1 RED 5 MAGENTA
- 2 GREEN 6 CYAN
- 3 YELLOW 7 WHITE
-
-
- PaintJet Colors - 16 colors @90 dpi
-
- Index Color Index Color
-
- 0 BLACK 8 PURPLE
- 1 RED 9 BROWN
- 2 GREEN 10 DARKGRAY
- 3 YELLOW 11 LIGHTGRAY
- 4 BLUE 12 PINK
- 5 MAGENTA 13 LIGHTBLUE
- 6 CYAN 14 LIGHTYELLOW
- 7 ORANGE 15 WHITE
-
-
- HP PaintJet/XL
-
- The HP PaintJet/XL supports a more sophisticated RGB capability
- allowing you to print using any of thousands of colors. The
- PaintJet/XL provides hardware color dithering support allowing it to
- produce a large number of colors. The ToolKit supports the
- PaintJet/XL in a 180 dots per inch PaintJet compatible mode providing
- 8 colors. The ToolKit also supports the PaintJet/XL in a 180 dots
- per inch mode providing 256 colors. The 256 color palette supported
- by this mode may be set using pgSetRgbPalette. By default, only the
- first 8 colors are predefined for this color mode. You must
- specifically set the RGB values for indices in the range 8 to 255.
- The 8 default colors correspond to the PaintJet 8 color palette at
- 180 dots per inch. The PaintJet/XL RGB values for the 256 color
- palette may be in the range 0 to 255. When using the 256 color
- mode, the ToolKit uses color index 7 (white by default) to fill the
- page with white. If you use pgSetRgbPalette to modify color index 7,
- the entire printed page will be filled with this color.
-
-
- Color PostScript Printers
-
- Color PostScript printers support the RGB color imaging model and
- can produce very high quality color graphics output. There are large
- differences in the quality of color output produced by various color
- PostScript printers. The least expensive of these printers are
- based on "thermal wax" technology. They can produce 16 million
- colors, but use a dithering matrix of 6x6 pixels. The dithering
- matrix has the effect of reducing resolution on a typical 300 dots
- per inch printer to 50 dots per inch. These devices produce very
- nice pictures of complex graphics such as faces and trees, however,
- drawings that contain angled straight lines may show significant
- jagged edge effects. "Subliminal dye" PostScript printers can truly
- produce 16 million colors at 150 to 300 dots per inch. These
- printers are capable of producing some amazing graphics output, but
- are more expensive than "thermal wax" printers.
-
- When printing on color PostScript printers, you should first use the
- PGL2PS utility to generate a PostScript Page Description file. The
- PostScript file may then be copied to the printer with the standard
- DOS COPY command or it may be printed with the DOS PRINT command.
- Even black and white PostScript printers can process color PostScript
- files, but you won't get color printouts. Instead, colors will
- show up as shades of gray on the printout. You can also take these
- files to your local graphics art shop and they can produce 1200-2400
- dots per inch publication quality artwork. Many high end desktop
- publishing packages are capable of processing PostScript files.
-
- The pgLoadDevInfo, pgGetDevColors, pgSetPalette, and pgSetRgbPalette
- functions are supported by the ToolKit on PostScript printers.
- Valid RGB values range from 0 to 255. The ToolKit predefines the
- first 16 RGB color values to correspond with the standard VGA screen.
- Color palette entries 16 through 255 must be specifically defined
- using the pgSetRgbPalette function. The PGL2PS utility allows you
- to specify B&W, gray scale, or color PostScript output. This
- allows you to create drawing files for color PostScript printers,
- but change the color model with PGL2PS if you desire.
-
-
- Background Colors
-
- An inherent difference between screen and printer graphics is that,
- by default, the background color for screen graphics is black while
- that for printer graphics is the color of the paper you are printing
- on (usually white). You should keep this in mind when making your
- color selections. You may, of course, set an artificial background
- color by using a rectangular fill operation, however, this tends to
- use an extensive amount of toner or ink which your end users may not
- appreciate.
-
- Saving Your Graphics
-
- The ToolKit is designed to store your graphics commands in a drawing file
- which may be subsequently printed utilizing the GPMENU, GPU, or PGL2PS
- printing utilities. Only the graphics commands are stored, not the
- corresponding bitmap. You may store graphics to a new file or append
- them to an existing file. PGL drawing files are similar to Windows
- Metafiles and the Computer Graphics Standard Metafiles, but are optimized
- to allow for faster printing.
-
- If you wish to store graphics to a new file, use the pgInitDrw function
- and pass as arguments the desired file name and virtual drawing
- resolution. As functions are called, the corresponding graphics codes
- are written to this file. Be warned that this function assumes the file
- to be new. If the specified file already exists, its contents will be
- overwritten.
-
- If you wish to open an existing file for appending new graphics to, use
- the pgOpenDrw function. You should then call pgGetMaxX and pgGetMaxY to
- return the virtual drawing resolution used to originally create the file.
- All new graphics must be generated at the same resolution and will be
- appended to the end of the drawing file.
-
- To reduce the amount of disk I/O activity, commands are stored in a 512
- byte buffer. When the buffer is filled, it is automatically flushed and
- the contents of the buffer are written to the drawing file.
-
-
- Strings
-
- For the Microsoft Fortran interface, strings are required to be passed in
- a C compatible format (i.e. they must be NULL terminated). This is
- accomplished by appending a C or a NULL character at the end of all
- strings just after the closing single quote mark. Note that this format
- is only used by Microsoft Fortran.
-
- EXAMPLE: CALL pgDrawText( 'String'C )
-
- For the Lahey Fortran interface, strings are not required to be NULL
- terminated. This may cause problems if you try to justify text but pass
- a string containing trailing blank characters. The ToolKit performs a
- backwards search for the first non-blank or NULL character. Text
- justification is then based on the length of the remaining string. If
- you intend your strings to have trailing blanks, you should NULL
- terminate the string with CHAR(0).
-
- EXAMPLE: CALL pgDrawText( 'String '//CHAR(0) )
-
- This string format is supported by both Lahey and Microsoft Fortran.
-
-
- Error Handling
-
- The majority of PGL functions do not return an error code. This is due
- to the fact that these functions, for the most part, simply write out
- graphics codes to a file. When errors do occur, they are most likely
- related to an I/O problem. PGL does, however, set internal error flags.
- You may use the pgGetStatus function to return the current error status
- as an aid in debugging. We suggest you call the pgGetStatus function at
- the end of each drawing page just to be sure no disk I/O errors have
- occurred. If pgGetStatus returns a non-zero value, all PGL knows is that
- a disk I/O error (such as "disk full") occurred. Each time pgGetStatus
- is called, the internal error flag is reset to 0.
-
-
- Step-By-Step Example
-
- This section provides you with a step-by-step example for each supported
- language. We will take you through creating a simple program, compiling,
- linking, and running the program to create a drawing file, then printing
- the drawing file.
-
- For the purposes of this example, we assume that the PGL ToolKit has been
- installed in the following directories:
-
- PGL System Files C:\PGL
- C Files C:\PGL\C
- PASCAL Files C:\PGL\TP
- BASIC Files C:\PGL\BAS
- FORTRAN Files C:\PGL\FOR
- CLIPPER Files C:\PGL\CLIP
-
- We shall also assume that the location of the PGL ToolKit system files,
- where the printing utility programs reside, has been included in your
- PATH.
-
- Example Program
-
- The following example programs create a new drawing file named
- "EXAMPLE.PGL" with a virtual drawing resolution of 2000x2000. Draw
- a filled ellipse centered on the page using the pgFCLOSEDOT fill
- pattern, print the text string "ELLIPSE" centered in the ellipse,
- then exit the program. Prior to exiting the program, call the
- pgGetStatus function to check if an I/O error occurred during
- program execution.
-
- C #include <stdio.h>
- #include <stdlib.h>
- #include "c:\pgl\c\pgl.h"
-
- main()
- {
- int ierr;
- pgInitDrw( "EXAMPLE.PGL", 2000, 2000, &ierr );
- if( ierr != 0 )
- {
- printf( "ERROR initializing PGL - Aborting" );
- exit(1);
- }
- pgSetFillStyle( pgFCLOSEDOT, 1 );
- pgEllipse( 1000, 1000, 700, 500, pgOFILL );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextJustify( pgCENTER, pgCENTER );
- pgDrawTextXY( 1000, 1000, "ELLIPSE" );
- if( pgGetStatus() != 0 )
- {
- printf( "PGL I/O error occurred" );
- }
- pgEndDrw();
- }
-
- Pascal program example;
- {$R-,S-}
-
- uses Crt,PGL;
- label ExitPgm;
- var ierr : integer;
-
- begin
- pgInitDrw( 'EXAMPLE.PGL', 2000, 2000, ierr );
- if ierr <> 0 then
- begin
- writeln( 'ERROR initializing PGL - Aborting' );
- goto ExitPgm;
- end;
- pgSetFillStyle( pgFCLOSEDOT, 1 );
- pgEllipse( 1000, 1000, 700, 500, pgOFILL );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextJustify( pgCENTER, pgCENTER );
- pgDrawTextXY( 1000, 1000, 'ELLIPSE' );
- if pgGetStatus <> 0 then
- begin
- writeln( 'PGL I/O error occurred' );
- end;
- pgEndDrw;
- ExitPgm:
- end.
-
- Basic '$INCLUDE: 'c:\pgl\bas\pgl.bas'
-
- call pgInitDrw( "EXAMPLE.PGL", 2000, 2000, ierr% )
- if ierr% <> 0 then
- print "ERROR initializing PGL - Aborting"
- goto exitpgm
- end if
- call pgSetFillStyle( pgFCLOSEDOT, 1 )
- call pgEllipse( 1000, 1000, 700, 500, pgOFILL )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextJustify( pgCENTER, pgCENTER )
- call pgDrawTextXY( 1000, 1000, "ELLIPSE" )
- if pgGetStatus <> 0 then
- print "PGL I/O error occurred"
- end if
- call pgEndDrw
- exitpgm:
- end
-
- Fortran include 'c:\pgl\for\pgl.for'
- integer*2 ierr
-
- call pgInitDrw( 'EXAMPLE.PGL'//char(0), 2000, 2000, ierr )
- if( ierr .ne. 0 ) then
- print *, ' ERROR initializing PGL - Aborting'
- stop
- end if
- call pgSetFillStyle( pgFCLOSEDOT, 1 )
- call pgEllipse( 1000, 1000, 700, 500, pgOFILL )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextJustify( pgCENTER, pgCENTER )
- call pgDrawTextXY( 1000, 1000, 'ELLIPSE'//char(0) )
- if( pgGetStatus .ne. 0 ) then
- print *, ' PGL I/O error occurred'
- end if
- call pgEndDrw
- end
-
- Clipper SET PROCEDURE TO PGL
- DO PGLINIT
-
- PUBLIC ierr
-
- pgINIT( "EXAMPLE.PGL", 2000, 2000, @ierr );
- if ierr <> 0
- ? "ERROR initializing PGL - Aborting"
- return
- end if
- pgSFSTYLE( pgFCLOSEDOT, 1 );
- pgELL( 1000, 1000, 700, 500, pgOFILL );
- pgSTSTYLE( pgTRIPLEX );
- pgSTJUST( pgCENTER, pgCENTER );
- pgDTXY( 1000, 1000, 'ELLIPSE' );
- if pgSTATUS() <> 0
- ? "PGL I/O error occurred"
- end if
- pgEND()
-
-
- Compiling, Linking, and Executing
-
- Assume the example program is named EXAMPLE.ft where ft is the
- appropriate file extension type for your programming language. The
- above example assumes that the PGL ToolKit is used stand-alone. You
- may, of course, integrate PGL with any third party graphics library
- if you also want screen graphics. Simply include any other libraries
- you need when linking the program. We have included an example
- compile and link for each supported compiler.
-
- C For Turbo C, use the PGL_CL.LIB library and assuming the
- Turbo C directory is in the PATH, compile and link as
- follows:
-
- tcc -ml -I\tc\include example.c c:\pgl\c\pgl_cl.lib
- example
-
- For Borland C++, use the PGL_CL.LIB library and
- assuming the Borland C++ directory is in the PATH,
- compile and link as follows:
-
- bcc -ml example.c c:\pgl\c\pgl_cl.lib
- example
-
- For Microsoft C, use the PGL_CL.LIB library and assuming
- the LIB environment variable is correctly set, compile and
- link as follows:
-
- cl /AL example.c c:\pgl\c\pgl_cl.lib
- example
-
- For Quick C, use the PGL_CL.LIB library and assuming the
- LIB environment variable is correctly set, compile and
- link as follows:
-
- qcl /AL example.c c:\pgl\c\pgl_cl.lib
- example
-
- For WATCOM C, use the PGL_CL.LIB library and assuming
- the LIB environment variable is correctly set, compile and
- link as follows:
-
- wcl /ml example.c c:\pgl\c\pgl_cl.lib
- example
-
- Pascal For Turbo Pascal 6.0, use the PGL.TPU unit, specifying the
- directory for the PGL.TPU unit with /Uxxx, compile and
- link as follows:
-
- tpc /Uc:\pgl\pas example
- example
-
- Basic For MS Quick Basic 4.x, use the PGL_QB library, use the /O
- command flag to force the compiler to build a stand-alone
- EXE, and assuming the LIB environment variable specifies
- the PATH to the Quick Basic libraries, compile and link as
- follows:
-
- bc /O example
- link example,,,c:\pgl\bas\pgl_qb;
- example
-
- For MS Basic PDS 7.x, use the PGL_B7 library, use the /O
- command flag to force the compiler to build a standalone
- EXE, and assuming the LIB environment variable specifies
- the PATH to the Quick Basic libraries, compile and link as
- follows:
-
- bc /O example
- link example,,,c:\pgl\bas\pgl_b7;
- example
-
- Fortran For Lahey Fortran 4.x and 5.x, use the PGL_LF.LIB library
- and assuming F77L is in the PATH, compile and link as
- follows:
-
- f77l example
- optlink example,,,c:\pgl\for\pgl_lf;
- example
-
- For Microsoft Fortran 4.x and 5.x, use the PGL_LF.LIB
- library and assuming the LIB environment variable is set
- to the FORTRAN library directory, compile and link as
- follows:
-
- FL /c example.for
- link example,,,c:\pgl\for\pgl_mf;
- example
-
- Clipper For Clipper '87, use the PGL_CL87.LIB library and assuming
- the LIB environment variable has the PATH to the CLIPPER
- '87 libraries, compile and link as follows:
-
- clipper example
- link /SE:512 /ST:8000 example,,,c:\pgl\clip\pgl_cl87;
- example
-
- For Clipper 5.x, use the PGL_CL5.LIB library and assuming
- the LIB environment variable has the PATH to the CLIPPER
- 5.x libraries, compile and link as follows:
-
- clipper example
- link /SE:512 /ST:8000 example,,,c:\pgl\clip\pgl_cl5;
- example
-
-
- Printing EXAMPLE.PGL Using GPU
-
- Each of the example programs above will generate a drawing file
- named EXAMPLE.PGL. Listed below are several ways of printing this
- file using the GPU command line printing utility. Except for the
- name of the drawing file, all other printing parameters such as page
- margins, size, resolution, etc., have predefined default values
- (see GPU Command Summary in Chapter 7). If a print parameter is not
- specifically specified on the command line, its default value will
- be used. For the purpose of this example, we assumed above that the
- PGL system files are located in C:\PGL. Before printing with the
- following examples, you should make sure you have placed the
- following GPU environment variable in your AUTOEXEC.BAT file:
-
- SET GPU=/P:C:\PGL
-
- You may alternatively copy the appropriate device driver files
- (.DRV) and font files (.FNT) to the local area you are working in.
- The printing utility will, by default, search the local working
- directory for these files.
-
- A third alternative is to specify the location of the device driver
- and font files by including the parameter /P=C:\PGL in each of the
- command lines below.
-
- 1) Print to an HP LaserJet II using full page landscape
- orientation at resolution setting 2.
-
- GPU EXAMPLE.PGL /D=HPLJET /R=2 /Z=F /O=L
-
- 2) Print as above but send the output to a file named EX.BIN.
- You may print EX.BIN using the DOS COPY command. You must
- include the /b flag to indicate that EX.BIN is a binary file.
-
- GPU EXAMPLE.PGL /U=EX.BIN /D=HPLJET /R=2 /Z=F /O=L
- COPY /b EX.BIN PRN
-
- 3) Print as in (1) above but send the output through the COM1
- serial communication port.
-
- GPU EXAMPLE.PGL /D=HPLJET /R=2 /Z=F /O=L
- /U=COM1:19200,N,8,1,1,1
-
- 4) Print as in (2) above but send the output through the COM1
- serial communication port using the SCPY utility program
- included with PGL (refer to Chapter 7 for details on using
- the SCPY utility).
-
- GPU EXAMPLE.PGL /U=EX.BIN /D=HPLJET /R=2 /Z=F /O=L
- SCPY -COM1:19200,N,8,1,1,1 EX.BIN
-
- 5) Use the PGL2PS utility to convert EXAMPLE.PGL to a PostScript
- output file called EXAMPLE.PS, then print the file. Notice
- that you may not specify an environment variable for PGL2PS,
- therefore, the device drivers and font files must either be
- located in your local working directory or you must specify
- the path as in the example below.
-
- PGL2PS EXAMPLE.PGL EXAMPLE.PS /Z=F /O=L /P=C:\PGL
- PRINT EXAMPLE.PS
-
- 6) Preview the drawing file by playing it back to the screen
- prior to printing it. The following command assumes playback
- is to a VGA screen.
-
- GPU EXAMPLE.PGL /D=VGA
-
- These are just some examples of how you may print the EXAMPLE.PGL
- drawing file. You should refer to the section on GPU Command
- Summary in Chapter 7 to reference all valid printing parameters.
- You should refer to the chapter on "SUPPORTED OUTPUT DEVICES" for a
- list of available device drivers.
-
-
- Printing EXAMPLE.PGL Using GPMENU
-
- The EXAMPLE.PGL drawing file may also be printed using the GPMENU
- print utility program. If you wish to use this program, you must be
- sure to set the PGL environment variable in your AUTOEXEC.BAT file.
- The environment variable lets the GPMENU program know where to find
- the PGL system files. For our example above, we assumed you
- installed the system files on C:\PGL. The environment variable
- would then be as follows:
-
- SET PGL=C:\PGL
-
- If you have also included C:\PGL in your PATH, then simply type
- GPMENU at the DOS prompt to execute the program. A system of menus
- is provided to allow you to select and set the printing parameters.
- As with the GPU printing utility, all parameters have default values
- with the exception of the file you wish to print.
-
- The GPMENU program is designed to provide you with a user friendly
- environment to facilitate printing. The program provides
- descriptions of the various printing parameters and their possible
- values, therefore, you may find it more convenient to print with
- this utility if your user's guide is not available or until you
- become familiar with the various parameters.
-
-
- **************************************
- ** Chapter 6: WORKING WITH BITMAPS **
- **************************************
-
-
- The ToolKit is based on a scalable vector architecture, however, it may
- also be used to print bitmapped images such as fonts, icons, or a
- graphics mode video screen bitmap (including off-screen bitmaps).
- Bitmaps are saved in a drawing file along with any other drawing
- information generated by your program. You may mix bitmap output and PGL
- drawing functions in the same drawing file.
-
- The ToolKit supports bitmaps with 1, 2, 4, or 8 bits per pixel. This
- translates into a 2, 4, 16, or 256 color bitmap capability. Bitmaps are
- positioned on the drawing page in terms of the virtual drawing coordinates
- defined by pgInitDrw. The ToolKit prints bitmap images in physical
- printer hardware coordinates, therefore, printing the same bitmap (drawing
- file) at different printer resolutions will cause different sized images
- to be printed (i.e., images will appear twice as large if you print at
- 150 dpi verses 300 dpi resolution). The bitmap will be clipped at the
- boundaries of the defined page margins if it is too large or if it is
- placed such that it extends beyond the margins.
-
-
- Saving Bitmap Images
-
- The ToolKit saves bitmap information in a packed pixel format and
- optionally compresses the image data to reduce the size of drawing files.
- Three simple general purpose interface functions are provided for saving
- bitmapped images. These are the pgBMInit, pgBMData, and pgBMEnd commands.
-
- To save a bitmap image, you must first call pgBMInit and provide the
- following parameters:
-
- x,y The location of the upper-left hand corner of the
- bitmap on the printed page.
- width The width of the bitmap in pixels.
- height The height of the bitmap in pixels.
- bpp The number of bits per pixel.
- compflag Flag indicating whether or not to compress the bitmap
- information.
-
- Next, use pgBMData to pass pixel data for each row of the bitmap and
- provide the following information:
-
- row The row number of the bitmap corresponding to the
- data being passed (0 to height-1).
- data Vector where each element of the vector represents
- the color value of the corresponding pixel in the row.
-
- When all rows of the bitmap have been processed, call pgBMEnd to signal
- the end of the current bitmap sequence.
-
- While saving a bitmap to a drawing file, you must not call any other
- ToolKit function between the pgBMInit and pgBMEnd commands other than
- pgBMData. The pgBMEnd function ends the bitmap definition and must be
- called before calling any other ToolKit functions. Failure to call
- pgBMEnd will produce unpredictable results and may cause your computer to
- lock up!
-
-
- Building the Data Vector
-
- When saving bitmaps to a drawing file, most of your programming effort
- will be devoted to building the data vector of pixel colors for each row
- of the bitmap. This is quite simple as will be demonstrated in the code
- samples below. Each element of the data vector must be loaded with the
- color of the corresponding pixel for that row of the bitmap, usually
- starting with the left edge. The easiest way to load the data vector is
- to use the 'getpixel' function from your screen graphics library to
- return individual pixel colors and place them in the data vector. Valid
- color values range from 0 to 255.
-
- EXAMPLE: Save a 16 color VGA size bitmap using compression. Assume
- a getpixel function is available which returns the pixel
- color.
-
- C int data[640], row, col, ierr;
- pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for( row=0; row<480; row++ )
- {
- for( col=0; col<640; col++ )
- data[col] = getpixel( col, row );
- pgBMData( row, data );
- }
- pgBMEnd();
- pgEndDrw();
-
- Pascal var
- ierr, row, col : integer;
- data : array [0..639] of integer;
- begin
- pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for row := 0 to 479
- begin
- for col :=0 to 639
- begin
- data[col] := getpixel( col, row );
- end;
- pgBMData( row, data );
- end;
- pgBMEnd;
- pgEndDrw;
- end.
-
-
- Basic DIM data%(639)
- call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- for row% = 0 to 479
- for col% = 0 to 639
- data%(col) = getpixel%( col%, row% )
- next
- call pgBMData( row%, data%(0) )
- next
- call pgBMEnd
- call pgEndDrw
- end
-
-
- Fortran integer*2 ierr, row, col, data(640)
- call pgInitDrw( "BITMAP.PGL"//CHAR(0), 640, 480, ierr )
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- do row = 1, 480
- do col = 1, 640
- data(col) = getpixel( col-1, row-1 )
- end do
- call pgBMData( row-1, data )
- end do
- call pgBMEnd
- call pgEndDrw
- end
-
- Clipper PUBLIC data[640]
- pgINIT( "BITMAP.PGL", 640, 480, @ierr )
- pgBMI( 0, 0, 640, 480, 4, 1 )
- for row = 1 to 480
- for col = 1 to 640
- data[col] = getpixel( col-1, row-1 )
- next
- pgBMD( row-1, data )
- next
- pgBME()
- pgEND()
-
-
- Color Conversions and Dithering
-
- The simplicity of the bitmap printing interface provides a great deal of
- flexibility. If you save an 8 bit per pixel (256 color) bitmap and print
- on a black and white printer, the ToolKit will convert colors to black
- and white. You can use pgSetPalette and pgSetRgbPalette to define custom
- colors beyond those predefined by the ToolKit. If you know you will be
- printing on a black and white printer, you can reduce the size of your
- drawing files by specifying a 1 bit per pixel (2 color) bitmap in the
- call to pgBMInit. Then, convert each pixel color to either black or
- white before you load the data vector. You could apply a color dithering
- technique to the bitmap image prior to loading pixel color values into
- the data vector.
-
-
- Bitmap Scaling
-
- The ToolKit does not scale bitmaps, but you can easily accomplish this.
- To scale a bitmap in the X coordinate (horizontally) to be twice as wide
- as the original, you must specify a bitmap width of twice the original
- bitmap in pgBMInit. When you load the data vector, you should load each
- pixel twice. The resulting bitmap will then appear twice as wide as the
- original. The same technique may be used to scale the height of the
- bitmap as well. You should be aware that scaling bitmaps may cause
- images contained within them to appear jagged. This is a common problem
- when scaling bitmaps. You could also apply an image smoothing technique
- on the bitmap image data prior to loading the data vector and reduce the
- jagged effect caused by scaling.
-
-
- Bitmap Fill Direction
-
- Normally, when loading the data vector, you would start with the first
- row of the bitmap and start at the left edge. You could, optionally,
- load pixel values starting at the right edge which effectively creates a
- mirrored image of your bitmap. Similarly, you could start with the
- bottom row of the bitmap and end with the top row, thereby, inverting
- your image.
-
-
- Bitmap Fill Mode
-
- As mentioned above, you may mix bitmap output and PGL functions. That is
- to say, you could output a bitmap, then call PGL functions which could
- draw over the bitmap or vice versa. The overlaying of images may be done
- in one of two modes, either transparently or opaquely. You may set the
- desired fill mode by an appropriate call to the pgSetFillMode function.
-
-
- Bitmap Image Processing
-
- There are a vast number of image processing techniques other than
- dithering and scaling that may be used to enhance bitmapped images. A
- discussion of these techniques may be found in any of the standard texts
- on image processing. There are also several commercial libraries
- available that perform many image processing functions. PGL does not
- provide any image processing functions, just a general purpose bitmap
- printing interface. We leave it up to you to incorporate any image
- processing software or techniques you may desire.
-
-
- Using Hardware Coordinates and Bitmaps
-
- Some screen graphics libraries such as the Genus GX and MetaWINDOW
- graphics libraries allow you to generate off-screen bitmapped images of
- any virtual size. If you are using such a package, you may wish to
- generate off-screen bitmaps which exactly matches the printed page
- resolution. The ToolKit provides several functions which will allow you
- to determine the exact number of horizontal and vertical hardware pixels
- which you may address for a particular printer and set of print
- parameters. Once you have this information, you can create a bitmapped
- image to fit those exact dimensions and output the bitmap to the drawing
- file as outlined above.
-
- As an example, suppose you want to create a bitmap which will be printed
- on an HP LaserJet printer utilizing the highest printer resolution (300
- dpi), full page landscape mode with 1" margins on all sides. The
- following code stubs demonstrate how to obtain the addressable printer
- pixels for this set of print parameters.
-
- C int xmax, ymax, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageMargins( 100, 100, 100, 100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax = pgGetDevMaxX( 3 );
- ymax = pgGetDevMaxY( 3 );
-
- Pascal var
- xmax, ymax, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageMargins( 100, 100, 100, 100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax := pgGetDevMaxX( 3 );
- ymax := pgGetDevMaxY( 3 );
-
- Basic ierr% = pgLoadDevInfo( "HPLJET" )
- call pgSetPageMargins( 100, 100, 100, 100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax% = pgGetDevMaxX%( 3 )
- ymax% = pgGetDevMaxY%( 3 )
-
- Fortran integer*2 xmax, ymax, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageMargins( 100, 100, 100, 100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax = pgGetDevMaxX( 3 )
- ymax = pgGetDevMaxY( 3 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPMARGIN( 100, 100, 100, 100 )
- pgSPFORM( pgLANDSCAPE )
- pgSPSIZE( pgFULLPAGE )
- xmax = pgGDMAXX( 3 )
- ymax = pgGDMAXY( 3 )
-
-
- In each of the example code stubs, the maximum addressable horizontal and
- vertical hardware pixels are returned in the variables xmax and ymax,
- respectively. You may then create a bitmapped image sized xmax by ymax
- pixels and output the bitmap to the drawing file as outlined.
-
-
- **************************
- ** Chapter 7: PRINTING **
- **************************
-
-
- This chapter explains how to obtain graphics printouts with the ToolKit.
- Once you have created a drawing file, you may print it on either raster
- based printers (LaserJet, InkJet, Dot Matrix printers, and the PCX file
- format are all raster/bitmap based), or on vector devices (HPGL plotters,
- PostScript Printers, the Microsoft Windows Metafile format, and the
- WordPerfect Graphics file format are all vector based). The ToolKit
- supports several raster and vector output devices and file formats. At
- the time of this printing, PostScript support is included, other vector
- formats are under development. Refer to the READ.ME file for an up-to-
- date list of vector and raster device printer support.
-
- Printing on vector devices, such as PostScript printers, requires you to
- convert the drawing file to PostScript format using the PGL2PS conversion
- utility (see PGL2PS Utility below), then copy the PostScript file to the
- printer. Other vector devices work in a similar fashion, convert the
- drawing file to vector format, then copy the vector format file to the
- printer.
-
- Printing on raster devices require you use either the GPU command line
- utility or the menu driven GPMENU printing utility. The GPU utility may
- be run from within your program allowing you to seamlessly draw and print
- graphics (assuming your programming language can run other programs).
- The GPMENU utility provides a user friendly printing facility to control
- the printing process and displays the status of each printing task as it
- progresses. With either program, you have complete control of the
- printing process and page formatting parameters.
-
-
- The Printing Process
-
- The GPU and GPMENU printing utilities read graphics commands from drawing
- files created with the ToolKit and generates an off-screen bitmap which
- is sent to the printer. The bitmap is created in portions called swaths
- (or bands). Once a swath is created, it is sent to the specified printer
- or disk file, then another swath is created and printed and so on. If
- your system has enough memory, the PGL utilities will attempt to use a
- maximum of 64K of memory to build a bitmap for the selected printer.
-
- The printing utility programs are designed to work with as little as 8K
- of memory. If your system does not have 64K of free memory for printing,
- the entire bitmap is still printed but smaller swaths of pixel rows are
- generated and sent to the output device. This can slow down the printing
- process but allows you to create and print full page megabyte bitmaps
- with very little system memory.
-
-
- Printing From Within Your Application
-
- To print from within your application, you must spawn or run either the
- GPU command line printing utility or the GPMENU printing utility. Some
- typical functions used by languages supported by PGL to run other programs
- are listed below. The spawning of programs is compiler and language
- specific, therefore, you should refer to your compiler's documentation
- for more information. Note that some of these commands will allow you to
- run GPU as a child process and will return control to your program, others
- will simply cause your current program to exit, run GPU, and return to
- DOS (these are identified with an asterisk).
-
- C SPAWNxxx, SYSTEM, *EXECxxx
-
- FORTRAN SYSTEM
-
- BASIC *RUN, *CHAIN
-
- PASCAL EXEC
-
- CLIPPER RUN
-
- You can run GPU or GPMENU from within your programs, however, GPMENU may
- require more memory than you have available. The memory requirements of
- the GPU program are more manageable. GPU requires about 60K to load
- itself into memory, from 8 to 64K for printing the bitmap, and about
- 10-15K for a font. Therefore you need a minimum of about 80K and
- optimally about 140K for faster printing. To run GPU you must build a GPU
- command string, including any flags you wish to use with GPU. The command
- string should look like what you would type at the DOS prompt to run GPU.
- Note that you can use the -q command switch to tell GPU to run quietly
- and produce no screen output messages. This prevents GPU from
- overwriting any screen information you are displaying. The -b switch may
- be used to specify the maximum amount of memory to use for the printing
- buffer. The default is 64K (-b64), the minimum allowed is 8K (-b8).
-
- If you spawn the GPU utility, you can use the /Q switch to turn off any
- messages normally printed to the screen. Any errors that occur during
- printing will be reported by a return code when GPU exits. The following
- is a list of possible GPU error return codes. The error codes with an
- asterisk next to them are common errors. The other errors are highly
- unlikely to occur, however, if they should occur, call for additional
- technical support.
-
-
- Error Code Description
-
- 01* Drawing file not found.
- 02 Could not open PRN, LPT1, LPT2, or LPT3.
- 03 I/O error -- read failure.
- 04 I/O error -- write failure.
- 05 I/O error -- file pointer error.
- 06* Corrupted or invalid drawing file -- bad code found.
- 07 Not applicable.
- 08 Not applicable.
- 09 Not applicable.
- 10* Corrupted or invalid drawing file -- bad page count.
- 11* Insufficient memory.
- 12 I/O error -- PRN write error.
- 13 Corrupted device driver.
- 14* <ESC> entered by user to abort printing.
- 15 Corrupted or invalid drawing file -- bad page form.
- 16 I/O error -- problem creating PCX output.
- 17 I/O error -- problem creating EPS output.
- 18* Insufficient memory for polygons.
- 19 Cannot initiate screen graphics mode.
- 20* Device driver not found.
- 21* Font files not found.
- 22* Printer off-line or out of paper.
- 23* Font file corrupted or invalid.
-
-
- Printing From Outside Your Application
-
- The GPMENU printing utility is a menu driven version of the GPU utility.
- It is designed to be run from the DOS prompt as a stand-alone graphics
- printing control center. GPMENU provides an interactive menu driven
- printing environment with on screen help. A default set of parameters
- will be automatically loaded from the PGCONFIG.SYS file. You should
- reset these parameters for your specific printer and desired output
- format and resave the configuration as DEFAULT. Thereafter, the new
- default configuration will be automatically loaded upon invoking GPMENU
- and all that is necessary is for you to specify the drawing file to print.
- You may, of course, predefine as many printer configurations as you wish
- and save each one.
-
- The GPMENU utility gives you control over all print options. In addition,
- features are provided allowing you to save and load any number of
- predefined printer control configurations. During the printing stage, a
- status window pops up and displays some useful information including a
- status bar which gets filled indicating percent completion.
-
- Once GPMENU is invoked, three windows will be displayed. The tall window
- at the left of your screen will display the menu options. The help
- window at the bottom of the screen displays a brief description of the
- currently highlighted menu item. The larger window at the top of the
- screen displays the current parameter settings.
-
- The best way to become familiar with the menu driven program is to simply
- use it and try different options. The on screen help window at the bottom
- of the screen explains each menu option, more detailed information on each
- topic may be found in the GPU Command Summary section. You may use any
- of the .PGL drawing files included on the distribution diskettes to
- experiment with. Except while printing, you may exit GPMENU at any time
- by entering ALT-X.
-
- The second method of printing is to use the GPU utility program. The
- intent of including this command line utility is to allow you the
- capability of printing from within your application by spawning the
- utility (see discussion in previous section) and to allow batch file
- processing of drawing files. This program prints drawing files using the
- command line or the GPU environment variable to specify printer control
- parameters. Refer to the Printer Control Parameters section for a
- complete listing and description of the control options available.
-
-
- GPU Command Summary
-
- Usage: C:\> GPU file.plt /D=HPLJET /R=3 ......
-
- Multiple files may be printed from a single command line using the '*'
- and '?' wild cards. Any options set as a command line flag supersedes
- the same options found in the environment. The acceptable flags are:
-
-
- Flag Description Default Possible Values
-
- /U=# Output PRN #= output file/device (LPT1, LPT2...)
- /O=# Orientation P #= L(andscape), P(ortrait)
- /R=# Resolution 0 #= 0, 1, 2, 3 depends on device
- /D=# Driver name HPLJET #= Output device name of file driver
- /Z=# Page size H #= H(alf), F(ull), Q(uarter)
- /I=# Invert flag OFF #= Off, On
- /E=# EMM usage ON #= Off, On
- /P=# Font path NONE #= Path to PGL fonts and driver files
- /M=# Left, Right 100,100 #= 1 inch = 100 units, Left, Right
- Top, Bottom 100,100 #= 1 inch = 100 units, Top, Bottom
- /C=# Copies 1 #= 1 to 99
- /Y=# Fill density N #= N(ormal), H(igh)
- /F=# Form feed ON #= Off, On
- /Q Quiet switch --- Suppresses screen output
- /B=# Buffer size 64 #= Maximum=64K, Minimum=8K
-
-
- Printer control flags may also be set using the DOS SET command and the
- GPU environment variable as follows:
-
- SET GPU=/O:L /R:2 /D:HPLJET
-
- Using the GPU environment variable is the preferred way to define standard
- GPU flags. The command line flags always take precedence over the
- environment flags. This makes it easy to define standard output flags
- and yet override them with other flags at any time. If you use the
- command line utility, it is recommended that you place a command in your
- AUTOEXEC.BAT file setting the GPU environment variable with flags suitable
- for your printer device.
-
- The flags shown above use the ':' character to separate the flag from the
- value. This is because the DOS SET command does not accept the '=' sign
- in an environment variable. The ToolKit allows any character to be used
- here, but at least a space character must be used. We suggest you use
- ':' for the environment variable flags and '=' for the GPU command line
- flags. Some typical examples using GPU follow with a brief description:
-
- 1) GPU demo.plt
-
- Print demo.plt using defaults or options in the GPU environment
- variable.
-
- 2) GPU demo*.plt
-
- Print all files with a file name prefaced by 'demo' and an extension
- of .plt using the default settings or any options set in the GPU
- environment variable.
-
- 3) GPU demo.plt /D=EPLQ /O=L /Z=F /E=OFF
-
- Print demo.plt using the Epson LQ driver, landscape page orientation,
- full page size, and ignore EMM if present.
-
- 4) GPU demo.plt /U=demo.bin /D=HPDJET /R=3
-
- Print demo.plt using the HP DeskJet driver, send the output to the
- file named 'demo.bin', and use printer resolution setting 3 (High).
- To print 'demo.bin', use the DOS COPY command with the binary flag
- as follows:
-
- COPY /b demo.bin PRN
-
- The PRN output destination could be LPT1, LPT2, or any valid MS-DOS
- device or file name. To copy a file to the serial port, you must
- use the SCPY program provided with the ToolKit.
-
- 5) GPU demo.plt /D=EGA /P=\pgl
-
- Output demo.plt to the screen in EGA 16 color mode, use the GPU
- environment variable flags and check the \pgl directory for font
- files and device drivers.
-
- 6) GPU demo.plt /D=PCX /R=2 /U=demo.pcx
-
- Create a monochrome .PCX file called demo.pcx from demo.plt using
- resolution 2 (150 dpi).
-
- 7) GPU demo.plt /D=HPLJET3 /Z=F /M=100,100,150,150
-
- Print demo.plt using the HP LaserJet III driver, full page size, and
- with left/right margins of 1" and top/bottom margins of 1.5".
-
- 8) GPU demo.plt /D=HPLJET3 /U=COM1:19200,N,8,1,1,1
-
- Print demo.plt using the HP LaserJet III driver and output to the
- COM1 serial communication port.
-
- 9) GPU demo.plt /B=8
-
- Print demo.plt using an 8K buffer for building the output bitmap in.
-
-
- Printer Control Parameters
-
- PGL gives you complete control over the printing process by allowing you
- to specify page size, orientation, margins, number of copies, resolution,
- etc. Except for the file name, all parameters have a default setting.
-
- The various printer control parameters are described below. The examples
- listed are for the GPU command line utility.
-
-
- File Name
-
- The name of the drawing file to plot. You may specify a single file
- to plot such as TEST.PLT or multiple files by using the '*' and '?'
- wild cards such as TEST?.PLT, T*.PLT, TEST.*, etc.
-
- EXAMPLE: GPU test?.plt
-
-
- Output Device Destination (/U)
-
- The /U flag specifies the destination of the output device or file.
- PGL uses MS-DOS file handle functions for output and is compatible
- with most networks such as NOVELL. PGL writes the graphics image
- bitmap to the specified output file or device with the specified
- printer's control codes embedded in the bitmap data and is,
- therefore, not directly viewable on screen. If output is sent to a
- file, it may subsequently be copied to any printer compatible with
- those associated with the device driver used. To copy a file to the
- printer, use:
-
- copy /b file.nam PRN
-
- Valid output devices are PRN, LPT1, LPT2, LPT3, COM1, COM2, or a
- file. PRN, LPT1, LPT2, and LPT3 are parallel port interfaces while
- COM1 and COM2 are serial port interfaces. The default output device
- is PRN.
-
- EXAMPLE: GPU file.nam /U=LPT1
-
- When using COM1 or COM2 serial ports, additional information is
- required unless the PGL default settings are satisfactory. When
- using serial ports, the /U command flag takes the form:
-
- /U=COM1:baudrate,parity,databits,stopbits,DTR/CTS,Xon/Xoff
-
- Valid options for each serial port parameter are as follows:
-
- Baud rate: 1200, 2400, 4800, 9600, 19200. The default is
- 19200.
- Parity: N(one), O(dd), or E(ven). The default is N
- Databits: Data size - 7 or 8 bits. The default is 8.
- Stopbits: 1 or 2. The default is 1.
- DTR/CTS: Hardware handshake - 0=OFF or 1=ON. The
- default is 1.
- Xon/Xoff: Flow control - 0=OFF or 1=ON. The default
-
- EXAMPLE: GPU file.nam /U=COM1:9600,N,8,1,1,1
-
-
- Device Driver (/D)
-
- The /D flag specifies the name of the device driver appropriate for
- your printer. For example, the PCXC driver is used to output in a
- PCX color file format and HPLJET3 is used to output to an HP
- LaserJet III printer. Refer to Chapter 8 for a complete list of
- available device drivers. The default device driver is HPLJET.
-
- EXAMPLE: GPU file.nam /D=HPLJET3
-
-
- Resolution (/R)
-
- Resolution is dependent on the device you are printing to and may be
- the values 0-3 with 0 being the lowest resolution and 3 the highest.
- Not all printers have 4 resolutions. If you specify a resolution
- which exceeds your printers capabilities, printing will default to
- using the highest resolution available. The default resolution is 2.
-
- Printing speed and the amount of memory required to hold the entire
- graphics image bitmap increases with output resolution. For
- debugging purposes, you may wish to print at a lower resolution.
-
- EXAMPLE: GPU file.nam /R=3
-
-
- Page Margins (/M)
-
- There are four parameters allowing you to specify the page margins
- in the order LEFT, RIGHT, TOP, and BOTTOM page margins. Margins are
- set using the scale 100=1" (e.g., 150=1.5", 200=2", etc.). The
- default margins are 1" borders all around the page. The minimum
- margins allowed are 0.5" all around.
-
- EXAMPLE: GPU file.nam /M=50,50,150,150
-
-
- Page Orientation (/O)
-
- Page orientation specifies the layout of the page as L(andscape) or
- P(ortrait). The default orientation is PORTRAIT.
-
- EXAMPLE: GPU file.nam /O=L
-
-
- Page Size (/Z)
-
- Page size specifies the portion of the page to use for printing.
- The valid options are H(alf), F(ull), and Q(uarter) page. The true
- region on the page used for printing is also a function of the page
- margins you've specified. The default page size is HALF.
-
- You should be aware that some devices, such as laserjets, have
- certain minimum memory requirements to allow high resolution graphics
- printing in full page mode.
-
- EXAMPLE: GPU file.nam /Z=H
-
-
- Invert Flag (/I)
-
- The invert flag specifies whether graphics are printed as a positive
- image (i.e., black images on white background) or as a negative
- image (i.e., white images on a black background). By default,
- graphics are printed as positive images and the invert flag is
- turned OFF.
-
- EXAMPLE: GPU file.nam /I=ON
-
-
- EMM Usage (/E)
-
- The EMM flag is used to specify whether expanded memory should be
- ignored or used if available. When turned OFF, EMM will be ignored
- and when turned ON, EMM will be used if available. By default, EMM
- is turned ON.
-
- In most cases, you will want to use EMM if you have it. However,
- using EMM may sometimes cause your computer to lock-up as might be
- the case if you are printing through a network. This is an
- unpredictable problem resulting from certain software not correctly
- negotiating the use of expanded and/or extended memory. PGL uses the
- LIM EMM 3.2 commands for manipulating EMM usage.
-
- EXAMPLE: GPU file.nam /E=OFF
-
-
- Path (/P)
-
- The path parameter specifies the directory where the PGL device
- drivers and font files reside. These files must reside in the same
- directory. There is no directory path by default, therefore, PGL
- will first search the local directory for these files. If not
- found, then PGL will search the path specified by the environment
- variable.
-
- The path parameter only applies to the command line utility. If you
- are using the GPU print utility, the drivers and font files must
- either reside in the local directory or you must set the GPU
- environment variable in your AUTOEXEC.BAT file to specify the path
- where they can be found. For example, if you installed the files
- in D:\PGL, then the following statement would be inserted into your
- AUTOEXEC.BAT file:
-
- SET GPU=/P:D:\PGL
-
- or the path may be specified on the GPU command line:
-
- EXAMPLE: GPU file.nam /P=D:\PGL
-
-
- Copies (/C)
-
- The copies parameter allows you to print up to 99 copies of each
- page of graphics in your drawing file. The default setting is for
- one copy.
-
- EXAMPLE: GPU file.nam /C=3
-
-
- Fill Density (/Y)
-
- The fill density parameter is only applicable when printing at
- resolutions higher than 180x180 dpi. The valid options are N(ormal)
- or H(igh) density fill. When set to HIGH, fill patterns will tend
- to appear as shades of gray (color) due to the higher resolution.
- The default setting is to print with normal fill.
-
- EXAMPLE: GPU file.nam /Y=H
-
-
- Form Feed (/F)
-
- The form feed parameter allows you to suppress each page from being
- ejected after printing. All plots contained in your file will be
- overlaid on top of one another. If you suppress form feeds, you
- must manually eject the page when printing is completed. The valid
- settings are OFF or ON. The default setting is to enable form feed.
- This option is only suitable for use on laserjet devices.
-
- EXAMPLE: GPU file.nam /F=ON
-
-
- Quiet Switch (/Q)
-
- When you run GPU, the control options along with your selections
- will be displayed to the screen. You may disable screen output with
- the quiet switch.
-
- EXAMPLE: GPU file.nam /Q
-
-
- Buffer Size (/B)
-
- You may specify the maximum size of the print buffer used to build
- the bitmap image sent to the printer. The maximum amount usable is
- 64K (/B=64), the minimum amount usable is 8K (/B=8). When running
- GPU from inside an application, a compiler's integrated development
- environment, or inside a text editor, you should limit the print
- buffer to 8K. By default, the program will attempt to use as much
- memory as is available up to 64K.
-
- EXAMPLE: GPU file.nam /B=8
-
-
- System Files
-
- For the purposes of this discussion, system files consist of all PGL font
- files (*.FNT), device driver files (*.DRV), PGCONFIG.SYS, and PGLDRV.LST.
- When running the GPMENU print utility program, these files are expected
- to reside either in the local directory or the directory specified by the
- PGL environment variable. When using the GPU command line utility, the
- GPU environment variable is used unless you use the /P flag to specify
- the directory path. If you installed PGL in the C:\PGL directory, then
- the following environment variables would be inserted into your
- AUTOEXEC.BAT file.
-
- SET PGL=C:\PGL
- SET GPU=/P:C:\PGL ( See GPU Command Summary )
-
-
- PGL2PS Utility
-
- The PGL2PS file conversion utility reads PGL drawing files and creates
- PostScript output files. Output from PGL2PS may be sent to a file or
- directly to a PostScript printer. PostScript output files are generic
- and are based on an early version of PostScript to provide the most
- compatibility with PostScript devices. An advantage to using this
- utility instead of the GPU or GPMENU utilities is that PGL2PS uses the
- PostScript fonts on PostScript printers, whereas, GPU and GPMENU
- PostScript outputs are generated using PGL vector fonts. Also, GPU and
- GPMENU outputs are in the form of compressed bitmap images, whereas,
- PGL2PS outputs use PostScript graphics primitives (lineto, moveto, arc,
- etc.). Therefore, output from PGL2PS may be scaled without any loss of
- image quality. PGL2PS also supports color PostScript output. This
- utility accepts command line options, but supports no environment
- variables. Valid command line options are listed below:
-
- Usage: PGL2PS in_file out_file flags
-
- Flag Description Default Possible Values
-
- /O=# Orientation P P(ortrait), L(andscape)
- /Z=# Page size H H(alf), F(ull), Q(arter)
- /I=# Invert flag OFF Off, On
- /M=# Margins 100,100,100,100 100=1:
- /C=# Copies 1 1-9
- /F=# Form feeds ON Off, On
- /R=# Color Model BW BW, GRAY, RGB
- /P=# Path none Path to the PGL.PS file
- /Q Quiet switch --- Suppresses screen output
-
- EXAMPLE: PGL2PS test.plt test.ps /Z=F
-
- The PGL2PS utility uses some of the same command line flags used by GPU
- (see GPU Command Summary for flag descriptions) with the exception of the
- /R flag. This flag is used to specify the color model used by the
- PostScript printer. The default color model is Black & White (BW), color
- zero is white and all other colors are black. The Gray color model uses
- the intensity of each of the 16 VGA screen colors to determine a shade
- of gray. Color indices between 16 and 255 are displayed as black. The
- RGB color model allows you to specify the amount of Red, Green, and Blue
- color used by each color index in the range 0-255. The default RGB color
- settings are similar to those found on a standard VGA screen using the
- VGA 256 (320x200) color mode. The ToolKit library functions
- pgSetRgbPalette, and pgSetPalette my be used to alter the default RGB
- settings.
-
-
- SCPY Utility
-
- SCPY is a utility program used for copying files to output devices
- connected to a serial port. If you use the ToolKit's printing utilities
- to output to a disk file rather than a printer, you may need this
- utility to subsequently send the file to the printer. If your printer
- is connected to a serial port, you must either use the DOS MODE command
- to configure the serial port or you can use this utility to copy the file
- to the printer. An advantage of the SCPY utility is that it can transfer
- files at baud rates up to 19200 while the DOS MODE command is limited to
- 9600. If you are currently using the DOS MODE command to configure your
- printer and serial port but use the SCPY utility for faster printing,
- you must use the DOS MODE command to reconfigure your serial port and
- printer after executing SCPY. You should copy the SCPY program to a
- directory in your PATH for convenient access. The SCPY command format is
- shown below:
-
- Usage: SCPY -device -f -q file1 file2....
-
- device: PORT:baud,parity,data,stop,dtr,xon
-
- PORT - *COM1, COM2
- baud - 1200, 2400, 4800, 9600, *19200
- parity - *N(one), O(dd), E(ven)
- data - 7(bits), *8(bits)
- stop - *1(bit), 2(bits)
- dtr - *1(On), 0(Off)
- xon - *1(On), 0(Off)
-
- f: Sends a form feed after each file.
-
- q: Quiet switch, suppresses all screen output.
-
- * Denotes default values.
-
- EXAMPLE: SCPY -com1:19200,N,8,1,1,1 file.bin
-
-
- ******************************************
- ** Chapter 8: SUPPORTED OUTPUT DEVICES **
- ******************************************
-
-
- The ToolKit supports raster (bitmap) and vector based printers and file
- formats. Dot Matrix, LaserJet, PaintJet, and DeskJet printers are raster
- devices. The PCX file format is also a raster file format. PostScript
- printers can function either as a raster device or as a vector device.
- The ToolKit supports PostScript printers as a raster device using GPU or
- GPMENU and as a vector device using PGL2PS.
-
- The ToolKit supports raster printers by creating high resolution bitmap
- images in memory using one or more bitplanes, very much like the EGA and
- VGA graphics adapters. Printing is performed by either the GPU command
- line print utility or the menu driven GPMENU print utility. Both
- utilities can create color images using up to eight bitplanes. After an
- image is created, the bitplanes are then sent to the selected output
- device.
-
- The ToolKit supports vector based printers by converting PGL drawing files
- to the desired vector format. For instance, PostScript output may be
- generated in vector format using the PGL2PS PostScript language
- conversion program included with the ToolKit. Additional vector device
- or file formats may be available. Refer to the READ.ME file for an up-
- to-date listing of current vector device support.
-
- This chapter describes the specifics of the raster based output devices
- supported by the ToolKit printing utilities GPU and GPMENU.
-
-
- Selecting A Raster Output Device
-
- The following is a list of supported output devices:
-
- Device Description
-
- EPFX EPSON FX/MX
- EPFXWC FX/MX Wide Carriage
- EPLQ LQ
- EPLQWC LQ Wide Carriage
- EPLQLO LQ Low Res
- EPLQLOWC LQ Low Res Wide Carriage
- EPS POSTSCRIPT Generic-Bitmap
- CITMSP10 CITIZEN MSP-10
- CITMSP15 MSP-15 Wide Carriage
- CITGSX140 GSX 140
- HPLJET HEWLETT-PACKARD LaserJet Plus, LaserJet II, IID
- HPLJET2P LaserJet IIP
- HPLJET3 LaserJet III, IIID
- HPLJET3P LaserJet IIIP
- HPDJET DeskJet, DeskJet Plus, DeskJet 500
- HPDJETC DeskJet 500C
- HPPJET PaintJet, PaintJet/XL
- HPPJETXL PaintJet/XL
- HPTJET ThinkJet
- PCX PCX FILE DRIVER 75, 150, 300 dpi Monochrome
- PCXEGA EGA, Monochrome
- PCXVGA VGA, Monochrome
- PCXSVGA SuperVGA, Monochrome
- PCX8514 IBM8514, Monochrome
- PCXC 75, 150, 300 dpi 16 Color
- PCXEGAC EGA, 16 Color
- PCXVGAC VGA, 16 Color
- PCXSVGAC SuperVGA, 16 Color
- PCX8514C IBM8514, 16 Color
- PCXHERC Hercules, 2 Monochrome
- EGA SCREEN DRIVER EGA 640x350 16 Color
- VGA VGA 640x480 16 Color
- EGAMONO EGA 640x350 Monochrome
- VGAMONO VGA 640x480 Monochrome
- HERC Hercules 720x348 Monochrome
-
-
- The ToolKit supports most popular Dot Matrix, LaserJet and InkJet
- printers. Additional output device support will be added based on user
- feedback and our research.
-
- If your printer is not listed above, it may be compatible with one that
- is. Most printers emulate one of the industry standard printers. Some
- printers require special dip switch settings in order to provide
- emulation while others automatically perform emulation. Refer to your
- printer documentation for specific emulation instructions.
-
-
- Printer Emulations
-
- This section lists some of the common printers known to emulate the Epson
- FX series, Epson LQ series, HP LaserJet II series, HP PaintJet, and
- PostScript printers. These printers have not all been tested with the
- ToolKit, but their manufacturers claim compatibility with either the
- Epson FX, Epson LQ, HP LaserJet II series, HP PaintJet, or PostScript
- printers. All of these printers should work with the prescribed PGL
- drivers (i.e., Epson FX - EPFX, Epson LQ - EPLQ, HP LaserJet II - HPLJET,
- PostScript - EPS, HP PaintJet - HPPJET).
-
-
- Epson FX Emulation
-
- AEG Olympia NP 80SE Fortis DM3215
- AEG Olympia NP 136SE Genicom 3840
- ALPS ASP1600 Genicom 3840E
- Brother M-1309 IBM PP Series II 2380
- Brother M-1909 IBM PP Series II 2381
- Bull Compuprint 4/22 Mannesmann Tally 130/9
- Bull Compuprint 4/23 Mannesmann Tally 131/9
- Bull Compuprint 4/40 Mannesmann Tally MT661
- Bull Compuprint 4/43 NCR 6417-0101
- Bull Compuprint 4/68 NCR 6421-0201
- Bull Compuprint 970 Olivetti DM309E
- CIE CI-250 LXP Olivetti DM600S
- CIE CI-5000 Output Duraline
- Citizen 200GX Panasonic KX-P1180
- Citizen 200GX Fifteen Panasonic KX-P1191
- Citizen MSP-10 Seikosha SP-2000
- Citizen MSP-15 Seikosha BP 5780
- C-Tech C-645 Star NX-1500
- C-Tech ProWriter C-240 Star XR-1000
- C-Tech ProWriter C-245 Star XR-1020 Multi-Font
- Dataproducts 9030 Star XR-1520 Multi-Font
- Dataproducts 9044 Tandy DMP 135
- Datasouth Performax Tandy DMP 136
- Datasouth XL-300 Tandy DMP 2130
- Facit B1200 TI 8930
-
-
- Epson LQ Emulation
-
- AEG Olympia NP 80-24E Mannesmann Tally 130/24
- ALPS Allegro 500 Mannesmann Tally 131/24
- ALPS Allegro 500XT Mannesmann Tally MT82
- Brother M-1324 NEC Pinwriter P3200
- Brother M-1924L NEC Pinwriter P3300
- Bull Compuprint 4/24 NEC Pinwriter P5200
- Bull Compuprint 4/54 NEC Pinwriter P5300
- Canon BJ-300 Bubble Jet NEC Pinwriter P6200
- Canon BJ-330 Bubble Jet NEC Pinwriter P6300
- Citizen GSX-130 NEC Pinwriter P9300
- Citizen GSX-140 Okidata Microline 380
- Citizen GSX-140 Plus Okidata Microline 390 Plus
- Citizen GSX-145 Okidata Microline 391 Plus
- Citizen PN48 Okidata Microline 393 Plus
- C-Tech C-510 Olivetti DM600S
- C-Tech C-515 Panasonic KX-P1123
- C-Tech C-610 Plus Panasonic KX-P1124
- C-Tech C-610C Plus Panasonic KX-P1124i
- Epson DFX-8000 Panasonic KX-P1624
- Epson LQ-200 Panasonic KX-P1695
- Epson LQ-850 Panasonic KX-P2624
- Epson LQ-860 Seikosha SL-90
- Epson LQ-1010 Star NX-1020 Rainbow
- Epson LQ-1050 Star NX-2410
- Epson LQ-2500 Star NX-2415
- Fujitsu DL3600 Star NX-2420 Multi-font
- Fujitsu DL4600 Star NX-2420 Rainbow
- HP Rugged Writer Star XB-2420 Multi-font
- IBM ExecJet Star XB-2425 Multi-font
- IBM PP Series II 2390 Star Starjet SJ-48
- IBM PP Series II 2391 Tandy DMP 240
-
-
- HP LaserJet Series II Emulation
-
- Apple Person LaserWriter NT NEC Silentwriter
- Acer LP76 NEC Silentwriter2 90
- Bezier BP4040 NEC Silentwriter2 290
- Brother HL-4 NEC Silentwriter2 990
- Brother HL-8 NewGen Turbo PS/360
- Brother HL-8e NewGen Turbo PS/480
- Brother HL-8V Okidata Okilaser 400
- Brother HL-4PS Okidata Okilaser 820
- C. Itoh ProWriter CI-4 Okidata Okilaser 840
- Dataproducts LZR 650 Okidata OL830
- Dataproducts LZR 960 Olivetti PG 306
- Dataproducts LZR 2450D Packard Bell BP9500
- DEClaser 1150 Panasonic KX-P4420
- Epson EPL-6000 Panasonic KX-P4450i
- Epson EPL-7000 Panasonic KX-P4455
- Epson EPL-7500 Panasonic KX-P4455 LP
- Everex Abaton Laser Script PCPI Laser Image 1030
- Everex LaserScript LX QMS PS-410
- Facit P6060 QMS PS-810 Turbo
- Fujitsu RX7100PS Plus QMS PS-815
- Fujitsu RX7100 S/2 QMS PS-815 MR
- HP LaserJet IIISi QMS PS-820 Turbo
- IBM LaserPrinter 5e QMS PS-825
- IBM LaserPrinter 6 QMS PS-2000
- IBM LaserPrinter 10 QMS PS-2210
- IBM LaserPrinter 10L Qume Crystal Print Express
- IBM LaserPrinter 4019 Qume Crystal Print Publisher II
- IBM Laser Printer E Qume Crystal Print Series II
- Kodak Ektaplus 7008 Qume Crystal Print Super Series II
- Kodak Ektaplus 7016 PS Sharp JX-9500
- Kyocera F-5000A Sharp JX-9500H
- Kyocera F Series Sharp JX-9500PS
- LaserMaster TrueTech 1200 Sharp JX-9700
- Mannesmann Tally 906PS Star LaserPrinter 8II
- Mannesmann Tally MT735 Star LaserPrinter 4
- Mannesmann Tally MT911 PS Star LaserPrinter 4 StarScript
- Microtek TrueLaser Tandy LP 950
- Mitek 130T TI MicroLaser
- NCR 6435 TI MicroLaser PS35
- NCR 6436-0301 Toshiba PageLaser 6
- NCR 6436-0501
-
-
- PostScript Emulation
-
- Apple Personal LaserWriter NT NEC Silentwriter2 290
- Bezier BP4040 NEC Silentwriter2 990
- Brother HL-4PS NewGen TurboPS/360
- CalComp ColorMaster Plus 6603PS NewGen TruboPS/480
- Dataproducts LZR 960 Oce Graphics G5241-PS
- DEClaser 1150 Okidata OkiLaser 840
- DEClaser 2150 Okidata OL830
- DEClaser 2250 Panasonic KX-P4455 Laser Partner
- EiconLaser Printware 720 IQ Professional II
- Epson EPL-7500 Printware Pro-III
- Everex Abaton LaserScript QMS ColorScript 100 Model 10p
- Everex LaserScript LX QMS PS-410
- Fujitsu RX7100 S/2 QMS PS-810 Turbo
- GCC BLP II QMS PS-815
- GCC BLP IIS QMS PS-815 MR
- General Parametrics Spectra*Star 430 QMS PS-820 Turbo
- Kodak Ektaplus 7016 PS QMS PS-825
- LaserMaster LM 1000 QMS PS-2000
- LaserMaster TrueTech 800/4 QMS PS-2210
- LaserMaster TrueTech 1000 Qume CrystalPrint Express
- LaserMaster TrueTech 1200 Qume CrystalPrint Publisher II
- Mannesmann Tally 906PS Seiko ColorPoint PSX Model 4
- Mannesmann Tally MT911 PS Seiko ColorPoint PSX Model 14
- Microtek TrueLaser Sharp JX-9500 PS
- Mitek 130T Star LaserPrinter 4 StarScript
- NCR 6436-0501 Tektronics Phaser II PXi
- NEC Colormate PS Model 40 Tektronics Phaser III Pxi
- NEC Silentwriter2 90 TI microlaser XL PS35
-
-
- HP PaintJet Emulation
-
- HP PaintJet
- HP PaintJet/XL
- Kodak Diconix Color 4
-
-
- Device Driver Descriptions
-
- EPFX - Epson FX Series
-
- Use the EPFX driver with Epson FX Series 9-pin printers and printers
- that emulate the FX.
-
- Support is provided for 60x72, 120x72, and 240x72 dpi in black and
- white.
-
- Supports paper size 8.5" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- EPFXWC - Epson FX Wide Carriage Series
-
- Use the EPFXWC driver with wide carriage Epson FX Series 9-pin
- printers and printers that emulate the FX.
-
- Support is provided for 60x72, 120x72, and 240x72 dpi in black and
- white.
-
- Supports paper size 17" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- EPLQ - Epson LQ Series
-
- Use the EPLQ driver with Epson LQ Series 24-pin printers including
- the Epson 850, 950, 1050, and 2550 and printers that emulate the
- Epson LQ Series.
-
- Support is provided for 180x180 and 360x180 dpi in black and white.
-
- Supports paper size 8.5" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- EPLQWC - Epson LQ Wide Carriage Series
-
- Use the EPLQWC driver with wide carriage Epson LQ Series 24-pin
- printers including the Epson 850, 950, 1050, and 2550 and printers
- that emulate the Epson LQ Series.
-
- Support is provided for 180x180 and 360x180 dpi in black and white.
-
- Supports paper size 17" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- EPLQLO - Epson LQ Series (Low Resolution)
-
- Use the EPLQLO driver with Epson LQ Series 24-pin printers including
- the Epson 850, 950, 1050, and 2550 and printers that emulate the
- Epson LQ Series. This driver is used for producing low resolution
- output.
-
- Support is provided for 60x60 and 120x60 dpi in black and white.
-
- Supports paper size 8.5" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- EPLQLOWC - Epson LQ Wide Carriage Series (Low Resolution)
-
- Use the EPLQWC driver with wide carriage Epson LQ Series 24-pin
- printers including the Epson 850, 950, 1050 and 2550, and printers
- that emulate the Epson LQ Series. This driver is used for producing
- low resolution output.
-
- Support is provided for 60x60 and 60x120 dpi in black and white.
-
- Supports paper size 17" by 11".
-
- Margin control may be adjusted by software but the paper must
- initially be aligned using the tractor feed adjustment controls.
-
-
- CITMSP10 - Citizen MSP-10
-
- Use the CITMSP10 driver with the Citizen MSP-10 9-pin printer. This
- printer can emulate the Epson FX. The driver sets the printer into
- Epson FX emulation mode. See the Epson FX driver description for
- further details.
-
-
- CITMSP15 - Citizen MSP-15
-
- Use the CITMSP15 with the Citizen MSP-15 9-pin printer wide carriage
- printer. This printer can emulate the Epson FX. The driver sets
- the printer into Epson FX emulation mode. See the Epson FX driver
- description for further details.
-
-
- CITGSX140 - Citizen GSX 140
-
- Use the CITGSX140 driver with the Citizen GSX 140 24-pin printer.
- The Citizen GSX 140 can emulate the Epson LQ Series printers. The
- CITGSX140 driver sets the Citizen GSX 140 into Epson LQ emulation
- mode. See the Epson LQ description for further details.
-
-
- HPLJET - HP LaserJet Series
-
- Use the HPLJET driver with the HP LaserJet Plus, LaserJet Series II,
- LaserJet IID and all LaserJet compatibles. Dual sided printing is
- not supported on the IID.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in black and white.
-
- Supports 8.5" by 11" paper.
-
-
- HPLJET2P - HP LaserJet IIP
-
- Use the HPLJET2P driver with the HP LaserJet IIP and compatibles.
- This driver supports data compression when printing and will not
- work with the LaserJet series II.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in black and white.
-
- Supports 8.5" by 11" paper.
-
-
- HPLJET3 - HP LaserJet III
-
- Use the HPLJET3 driver with the HP LaserJet III, IIID and
- compatibles. This driver supports data compression when printing
- and will not work with the LaserJet series II. Dual sided printing
- is not supported on the IIID.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in black and white.
-
- Supports 8.5" by 11" paper.
-
-
- HPLJET3P - HP LaserJet IIIP
-
- Use the HPLJET3P driver with the HP LaserJet IIIP and compatibles.
- This driver supports data compression when printing and will not
- work with the LaserJet series II.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in black and white.
-
- Supports 8.5" by 11" paper.
-
-
- HPDJET - HP DeskJet, DeskJet Plus, DeskJet 500
-
- Use the HPDJET driver with the HP DeskJet, DeskJet Plus, and DeskJet
- 500 printers and compatibles.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in black and white.
-
- Supports 8.5" by 11" paper.
-
-
- HPDJETC - HP DeskJet 500C
-
- Use the HPDJETC driver with the HP DeskJet 500C printers and
- compatibles.
-
- Support is provided for 75x75, 100x100, 150x150, and 300x300 dpi
- resolution in 8 and 16 colors.
-
- Supports 8.5" by 11" paper.
-
-
- HPPJET - HP PaintJet
-
- Use the HPPJET driver with the HP PaintJet and PaintJet XL printers
- and compatibles.
-
- Support is provided for 90x90 dpi resolution in 16 colors and
- 180x180 dpi in 8 colors.
-
- Supports 8.5" by 11" paper.
-
-
- HPPJETXL - HP PaintJet/XL
-
- Use the HPPJETXL driver with the PaintJet XL printers and
- compatibles. This driver does not work with the HP PaintJet.
-
- Support is provided for 180x180 dpi in 8 colors and 180x180 dpi in
- 256 colors.
-
- Supports 8.5" by 11" paper.
-
-
- HPTJET - HP ThinkJet
-
- Use the HPTJET driver with the HP ThinkJet printer and compatibles.
-
- Support is provided for 80x80 and 160x160 dpi resolution in black
- and white.
-
- Supports 8.5" by 11" paper.
-
-
- EPS - PostScript
-
- Use the EPS driver for printing to PostScript printers or for saving
- Encapsulated PostScript files to disk. This driver outputs
- Encapsulated PostScript files containing the bitmap image created in
- memory. The image is compressed using Run Length Encoding to reduce
- printing time. The output of this driver may be directed to disk or
- to a PostScript printer. Encapsulated PostScript files can also be
- imported into desktop publishing packages. This driver only supports
- black and white. For color PostScript output use the PGL2PS
- conversion utility.
-
- Supports 75x75, 150x150, and 300x300 dpi resolutions in black and
- white.
-
- Supports 8.5" by 11" paper.
-
-
- PCX - PCX Monochrome File Format
-
- Use the PCX driver for saving black and white images to PC Paintbrush
- compatible .PCX files. This driver can generate very large bitmap
- images. Some software products may have trouble loading a 300 dpi
- full page bitmap image. If you have a problem loading a .PCX file
- into another application try one of the PCX drivers listed below.
- PC Paintbrush IV Plus can load very large bitmaps and work with
- them. Earlier versions of PC Paintbrush are limited in the size of
- the images with which they can work.
-
- Supports 75x75, 150x150, and 300x300 dpi resolution in black and
- white.
-
-
- PCXC - PCX Color File Format
-
- Use the PCXC driver for saving 16-color images to PC Paintbrush
- compatible .PCX files. This driver can generate very large bitmap
- images. Some software products may have trouble loading a 300 dpi
- full page 16-color bitmap image. If you have a problem loading a
- .PCX file into another application, try one of the PCX drivers
- listed below. PC Paintbrush IV Plus can load very large bitmaps and
- work with them. Earlier versions of PC Paintbrush are limited in
- the size of the images with which they can work.
-
- Supports 75x75, 150x150, and 300x300 dpi resolution in 16-colors
- using multiple bitplanes.
-
-
- PCXEGA - PCX EGA Monochrome File Format
-
- Use the PCXEGA driver for saving black and white images to PC
- Paintbrush compatible .PCX files for subsequent viewing on
- monochrome EGA screens.
-
- Supports EGA size monochrome bitmaps. Resolution settings are
- ignored by this driver.
-
-
- PCXEGAC - PCX EGA Color File Format
-
- Use the PCXEGAC driver for saving 16 color images to PC Paintbrush
- compatible .PCX files for subsequent viewing on color EGA screens.
-
- Supports EGA size 16 color 4 plane bitmaps. Resolution settings are
- ignored by this driver.
-
-
- PCXVGA - PCX VGA Monochrome File Format
-
- Use the PCXVGA driver for saving black and white images to PC
- Paintbrush compatible .PCX files for subsequent viewing on
- monochrome VGA screens.
-
- Supports VGA size monochrome bitmaps. Resolution settings are
- ignored by this driver.
-
-
- PCXVGAC - PCX VGA Color File Format
-
- Use the PCXVGAC driver for saving 16 color images to PC Paintbrush
- compatible .PCX files for subsequent viewing on color VGA screens.
-
- Supports VGA size 16 color 4 plane bitmaps. Resolution settings are
- ignored by this driver.
-
-
- PCXHERC - PCX Hercules Monochrome File Format
-
- Use the PCXHERC driver for saving black and white images to PC
- Paintbrush compatible .PCX files for subsequent viewing on Hercules
- screens.
-
- Supports Hercules size (720x348) monochrome bitmaps. Resolution
- settings are ignored by this driver.
-
-
- PCXSVGA - PCX Super-VGA Monochrome File Format
-
- Use the PCXSVGA driver for saving black and white images to PC
- Paintbrush compatible .PCX files for subsequent viewing on super-VGA
- screens.
-
- Supports super-VGA size (800x600) monochrome bitmaps. Resolution
- settings are ignored by this driver.
-
-
- PCXSVGAC - PCX Super-VGA Color File Format
-
- Use the PCXSVGAC driver for saving 16 color images to PC Paintbrush
- compatible .PCX files for subsequent viewing on color super-VGA
- screens.
-
- Supports super-VGA size (800x600) 16 color 4 plane bitmaps.
- Resolution settings are ignored by this driver.
-
-
- PCX8514 - PCX 8514 Monochrome File Format
-
- Use the PCX8514 driver for saving black and white images to PC
- Paintbrush compatible .PCX files for subsequent viewing on super-VGA
- and 8514 screens.
-
- Supports IBM-8514 and super-VGA size (1024x768) monochrome bitmaps.
- Resolution settings are ignored by this driver.
-
-
- PCX8514C - PCX 8514 Color File Format
-
- Use the PCX8514C driver for saving 16 color images to PC Paintbrush
- compatible .PCX files for subsequent viewing on color super-VGA and
- 8514 screens.
-
- Supports IBM-8514 and super-VGA size (1024x768) 16 color 4 plane
- bitmaps. Resolution settings are ignored by this driver.
-
-
- EGA - EGA Monitor Driver
-
- Use the EGA driver to display drawing files on an EGA monitor in 16
- color mode. This provides a drawing preview capability. The EGA
- device driver sets the video system into graphics mode and resets it
- when done. If multiple pages are displayed, a key press will be
- expected after each displayed page before program execution will
- continue. Resolution settings are ignored by this driver.
-
-
- VGA - VGA Monitor Driver
-
- Use the VGA driver to display drawing files on a VGA monitor in 16
- color mode. This provides a drawing preview capability. The VGA
- device driver sets the video system into graphics mode and resets it
- when done. If multiple pages are displayed, a key press will be
- expected after each displayed page before program execution will
- continue. Resolution settings are ignored by this driver.
-
-
- EGAMONO - EGAMONO Monitor Driver
-
- Use the EGAMONO driver to display drawing files on a monochrome EGA
- monitor. This provides a drawing preview capability. The EGAMONO
- device driver sets the video system into graphics mode and resets it
- when done. If multiple pages are displayed, a key press will be
- expected after each displayed page before program execution will
- continue. Resolution settings are ignored by this driver.
-
-
- VGAMONO/MCGA - VGAMONO/MCGA Monitor Driver
-
- Use the VGAMONO or MCGA driver to display drawing files on a
- monochrome VGA monitor. This provides a drawing preview capability.
- The VGAMONO and MCGA device drivers switch the video system into
- graphics mode and resets it when done. If multiple pages are
- displayed, a key press will be expected after each displayed page
- before program execution will continue. Resolution settings are
- ignored by this driver.
-
-
- HERC - HERC Monitor Driver
-
- Use the HERC driver to display drawing files on a monochrome HERC
- monitor. This provides a drawing preview capability. The HERC
- device driver sets the video system into graphics mode and resets it
- when done. If multiple pages are displayed, a key press will be
- expected after each displayed page before program execution will
- continue. Resolution settings are ignored by this driver.
-
-
- ************************
- ** PGL ToolKit **
- ** Function Reference **
- ************************
-
-
- This portion of the manual contains the PGL ToolKit function reference.
- The function descriptions are listed in alphabetical order. Each routine
- may be functionally grouped into one of six categories, SYSTEM FUNCTIONS,
- DEVICE INFORMATION FUNCTIONS, BITMAP OUTPUT FUNCTIONS, DRAWING FUNCTIONS,
- GRAPHICS ATTRIBUTE FUNCTIONS, and GRAPHICS TEXT FUNCTIONS. A Quick
- Reference section listing the functions alphabetically and by category is
- included for your convenience.
-
-
- System Functions
-
- System functions are those which operate on PGL drawing files. Commands
- are provided to open new and old drawing files, clear drawing files of
- all existing graphics commands, set new page markers, and close the
- drawing file.
-
- The ToolKit, for the most part, simply writes binary graphics codes to
- the drawing file as functions are called and sets internal parameters to
- keep track of the current graphics state. The interface libraries
- perform very few calculations. As such, when an error does occur, it is
- most likely due to a disk I/O problem. When such an error occurs, an
- internal error flag is set. You may determine the error status by
- calling the pgGetStatus function.
-
-
- Device Information Functions
-
- This class of function will allow you to retrieve information about
- specific device drivers. You may load the information for a specific
- driver by calling pgLoadDevInfo. Once loaded, you may specify the page
- margins, size, and orientation with pgSetPageMargins, pgSetPageSize, and
- pgSetPageForm, respectively. The remaining functions in this category
- are then used to return information about the loaded device based on the
- current page settings.
-
- The information provided by these functions include the type of device it
- is (i.e., laserjet, dot matrix, inkjet, etc.), number of resolution modes
- and bit planes, the maximum number of colors supported by the device, the
- physical size of the paper, the horizontal and vertical pixel resolution
- of the printable region based on the current page settings, the aspect
- ratio returned as a dots per inch measure, and the imposed offset margins
- at the top and left edges of the paper.
-
- Note that specifying the page margins, size, and orientation does not
- imply that your graphics will automatically print with these settings.
- The pgSetPageMargins, pgSetPageSize, and pgSetPageForm functions merely
- specify page parameters for the purpose of correctly returning information
- about device drivers based on these settings. You must specifically set
- these parameters at print time using the GPU or GPMENU print utilities.
-
-
- Bitmap Output Functions
-
- Often times, you may wish to perform a "screen dump" or print off-screen
- bitmapped images generated by another graphics library. Once you have
- created your bitmap, these functions allow you to initialize the bitmap
- processing sequence, output a bitmapped image to the drawing file, and
- end the processing sequence.
-
-
- Drawing Functions
-
- Except for graphics text, these functions allow you to create your
- drawings. The functions in this category allow you to place the cursor
- and draw arcs, circles, pie slices, polygons, rectangles, etc. Graphics
- text functions are grouped in a separate category.
-
-
- Graphics Attribute Functions
-
- This class of function will allow you to set the various attributes to be
- used by the drawing functions. You may use these functions to set such
- attributes as line styles and thicknesses, fill patterns, fill colors,
- fill mode, viewports, drawing colors, remap color palettes, set custom
- RGB color palettes, clipping flags, and clipping regions. Functions
- are also provided to allow you to retrieve information about the current
- cursor position and the graphics state.
-
-
- Graphics Text Functions
-
- These functions allow you to position and draw graphics text. The
- pgSetTextStyle command is used to select one of seven fully scalable
- vector font styles. Other functions are provided to set independent
- horizontal and vertical scale factors, orientation of text drawing, text
- justification, character spacing within a text string, and level of
- bolding. Functions are also provided to return the length and height of
- text strings as well as the current text parameter settings.
-
-
- Description Format
-
- DESCRIPTION
-
- Description describes the purpose of the routine, default settings,
- if applicable, and any general remarks.
-
- SYNTAX
-
- Syntax shows the function prototype for each of the languages and
- the argument declarations. Note that for Clipper, <ref> indicates a
- parameter is to be passed by reference using the '@' symbol. For
- example:
-
- pgCLEAR( @ierr )
-
- Also for Clipper, all passed parameters are assumed to be numeric
- expressions. Character expressions are specifically indicated by
- <expC>.
-
- PARAMETERS
-
- Parameters describes each argument in the call to the routine.
-
- RETURN
-
- If the routine returns a value, a description is provided about the
- information returned to you. Note that not all routines return a
- value.
-
- SEE ALSO
-
- The See Also section provides a list of routines which are similar
- in nature and/or affect the functionality of the routine being
- described.
-
- EXAMPLES
-
- The Examples section provides a short code segment showing how the
- routine is used for each language.
-
-
- Quick Reference: Functional Listing
-
- System
-
- pgClearDrw Clear the drawing file.
-
- pgEndDrw Close the drawing file.
-
- pgGetStatus Get current PGL error status.
-
- pgInitDrw Open new drawing file and set virtual resolution.
-
- pgNewPage Insert a form feed.
-
- pgOpenDrw Open an existing drawing file.
-
-
- Device Information
-
- pgGetDevColors Get the maximum number of available colors.
-
- pgGetDevHeight Get the page height of the device.
-
- pgGetDevMaxX Get the maximum addressable horizontal pixels.
-
- pgGetDevMaxY Get the maximum addressable vertical pixels.
-
- pgGetDevModes Get the maximum number of resolution modes.
-
- pgGetDevOffsetX Get the imposed device offset left margin.
-
- pgGetDevOffsetY Get the imposed device offset top margin.
-
- pgGetDevPlanes Get the number of bit planes.
-
- pgGetDevResX Get the device's horizontal dot per inch measure.
-
- pgGetDevResY Get the device's vertical dot per inch measure.
-
- pgGetDevType Get the type of device.
-
- pgGetDevWidth Get the page width of the device.
-
- pgLoadDevInfo Load the information for a device.
-
- pgSetPageForm Set the page orientation.
-
- pgSetPageMargins Set the page margins.
-
- pgSetPageSize Set the page size.
-
-
- Bitmap
-
- pgBMData Output a row of bitmap pixel color information.
-
- pgBMEnd End the bitmap processing sequence.
-
- pgBMInit Initialize the bitmap processing sequence.
-
-
- Drawing
-
- pgArc Draw a circular arc segment.
-
- pgCircle Draw a full circle.
-
- pgClearViewPort Clear the viewport.
-
- pgEllArc Draw an elliptic arc segment.
-
- pgEllipse Draw a full ellipse.
-
- pgLine Draw a line between two coordinates.
-
- pgLineRel Draw a line relative to the current position.
-
- pgLineTo Draw a line from the current position.
-
- pgMoveRel Move cursor relative to the current position.
-
- pgMoveTo Move cursor to the specified coordinate.
-
- pgPie Draw a circular pie slice section.
-
- pgPolygon Draw a polygon.
-
- pgPolyLine Draw a list of line segments.
-
- pgRectangle Draw a rectangle.
-
- pgSector Draw an elliptic pie slice section.
-
- pgSetPixel Set a pixel to a color value.
-
-
- Attributes
-
- pgGetAbsX Get absolute current x-coordinate.
-
- pgGetAbsY Get absolute current y-coordinate.
-
- pgGetClipArea Get the clipping area.
-
- pgGetClipping Get the clipping status.
-
- pgGetColor Get the drawing color.
-
- pgGetFillMode Get the fill mode.
-
- pgGetFillPattern Get the fill pattern.
-
- pgGetFillStyle Get the fill style.
-
- pgGetLinePattern Get the line pattern.
-
- pgGetLineStyle Get the line style.
-
- pgGetLineWeight Get the line weighting value.
-
- pgGetMaxX Get the maximum x-coordinate.
-
- pgGetMaxY Get the maximum y-coordinate.
-
- pgGetViewPort Get the viewport coordinates.
-
- pgGetX Get the current viewport x-coordinate.
-
- pgGetY Get the current viewport y-coordinates.
-
- pgSetClipArea Set the clipping area.
-
- pgSetClipping Set the clipping status.
-
- pgSetColor Set the drawing color.
-
- pgSetDefaults Set the graphics state to default settings.
-
- pgSetFillMode Set the fill mode.
-
- pgSetFillPattern Set the fill pattern.
-
- pgSetFillStyle Set the fill style.
-
- pgSetLinePattern Set the line pattern.
-
- pgSetLineStyle Set the line style.
-
- pgSetLineWeight Set the line weighting value.
-
- pgSetPalette Redefine a single color in the palette.
-
- pgSetRgbPalette Define a color with RGB settings.
-
- pgSetViewPort Set the viewport coordinates.
-
-
- Text
-
- pgDrawText Draw text relative to current position.
-
- pgDrawTextXY Draw text relative to coordinate (x,y).
-
- pgGetCharSpacing Get text character spacing.
-
- pgGetTextBolding Get text bolding.
-
- pgGetTextHeight Get height of the current font style.
-
- pgGetTextJustify Get text horizontal/vertical justification.
-
- pgGetTextLength Get length of the specified text string.
-
- pgGetTextOrient Get text orientation.
-
- pgGetTextScaling Get text horizontal/vertical scaling.
-
- pgGetTextStyle Get text style.
-
- pgSetCharSpacing Set text character spacing.
-
- pgSetTextBolding Set text bolding.
-
- pgSetTextJustify Set text horizontal/vertical justification.
-
- pgSetTextOrient Set text orientation.
-
- pgSetTextScaling Set text horizontal/vertical scaling.
-
- pgSetTextStyle Set text style.
-
-
- Quick Reference: Alphabetical Listing
-
-
- pgArc Draw a circular arc segment.
-
- pgBMData Output a row of bitmap pixel color information.
-
- pgBMEnd End the bitmap processing sequence.
-
- pgBMInit Initialize the bitmap processing sequence.
-
- pgCircle Draw a full circle.
-
- pgClearDrw Clear the drawing file.
-
- pgClearViewPort Clear the viewport.
-
- pgDrawText Draw text relative to current position.
-
- pgDrawTextXY Draw text relative to coordinate (x,y).
-
- pgEllArc Draw an elliptic arc segment.
-
- pgEllipse Draw a full ellipse.
-
- pgEndDrw Close the drawing file.
-
- pgGetAbsX Get absolute current x-coordinate.
-
- pgGetAbsY Get absolute current y-coordinate.
-
- pgGetCharSpacing Get text character spacing.
-
- pgGetClipArea Get the clipping area.
-
- pgGetClipping Get the clipping status.
-
- pgGetColor Get the drawing color.
-
- pgGetDevColors Get the maximum number of available colors.
-
- pgGetDevHeight Get the page height of the device.
-
- pgGetDevMaxX Get the maximum addressable horizontal pixels.
-
- pgGetDevMaxY Get the maximum addressable vertical pixels.
-
- pgGetDevModes Get the maximum number of resolution modes.
-
- pgGetDevOffsetX Get the imposed device offset left margin.
-
- pgGetDevOffsetY Get the imposed device offset top margin.
-
- pgGetDevPlanes Get the number of bit planes.
-
- pgGetDevResX Get the device's horizontal dot per inch measure.
-
- pgGetDevResY Get the device's vertical dot per inch measure.
-
- pgGetDevType Get the type of device.
-
- pgGetDevWidth Get the page width of the device.
-
- pgGetFillMode Get the fill mode.
-
- pgGetFillPattern Get the fill pattern.
-
- pgGetFillStyle Get the fill style.
-
- pgGetLinePattern Get the line pattern.
-
- pgGetLineStyle Get the line style.
-
- pgGetLineWeight Get the line weighting value.
-
- pgGetMaxX Get the maximum x-coordinate.
-
- pgGetMaxY Get the maximum y-coordinate.
-
- pgGetStatus Get current PGL error status.
-
- pgGetTextBolding Get text bolding.
-
- pgGetTextHeight Get height of the current font style.
-
- pgGetTextJustify Get text horizontal/vertical justification.
-
- pgGetTextLength Get length of the specified text string.
-
- pgGetTextOrient Get text orientation.
-
- pgGetTextScaling Get text horizontal/vertical scaling.
-
- pgGetTextStyle Get text style.
-
- pgGetViewPort Get the viewport coordinates.
-
- pgGetX Get the current viewport x-coordinate.
-
- pgGetY Get the current viewport y-coordinates.
-
- pgInitDrw Open new drawing file and set virtual resolution.
-
- pgLine Draw a line between two coordinates.
-
- pgLineRel Draw a line relative to the current position.
-
- pgLineTo Draw a line from the current position.
-
- pgLoadDevInfo Load the information for a device.
-
- pgMoveRel Move cursor relative to the current position.
-
- pgMoveTo Move cursor to the specified coordinate.
-
- pgNewPage Insert a form feed.
-
- pgOpenDrw Open an existing drawing file.
-
- pgPie Draw a circular pie slice section.
-
- pgPolygon Draw a polygon.
-
- pgPolyLine Draw a list of line segments.
-
- pgRectangle Draw a rectangle.
-
- pgSector Draw an elliptic pie slice section.
-
- pgSetCharSpacing Set text character spacing.
-
- pgSetClipArea Set the clipping area.
-
- pgSetClipping Set the clipping status.
-
- pgSetColor Set the drawing color.
-
- pgSetDefaults Set the graphics state to default settings.
-
- pgSetFillMode Set the fill mode.
-
- pgSetFillPattern Set the fill pattern.
-
- pgSetFillStyle Set the fill style.
-
- pgSetLinePattern Set the line pattern.
-
- pgSetLineStyle Set the line style.
-
- pgSetLineWeight Set the line weighting value.
-
- pgSetPageForm Set the page orientation.
-
- pgSetPageMargins Set the page margins.
-
- pgSetPageSize Set the page size.
-
- pgSetPalette Redefine a single color in the palette.
-
- pgSetPixel Set a pixel to a color value.
-
- pgSetRgbPalette Define a color with RGB settings.
-
- pgSetTextBolding Set text bolding.
-
- pgSetTextJustify Set text horizontal/vertical justification.
-
- pgSetTextOrient Set text orientation.
-
- pgSetTextScaling Set text horizontal/vertical scaling.
-
- pgSetTextStyle Set text style.
-
- pgSetViewPort Set the viewport coordinates.
-
-
- ***********
- ** pgArc **
- ***********
-
-
- DESCRIPTION The pgArc function draws circular arcs of any angular extent
- using the current drawing color. The arc is centered at the
- coordinate (x,y) with a radius of rad. The start and
- termination angles of the arc are given by the parameters sa
- and ea, respectively, specified in degree measure. Zero
- degrees is taken to be the 3 o'clock position increasing
- positively in a counterclockwise direction. The arc center
- (x,y) is specified in the viewport coordinate system. The
- cursor position is not updated after drawing.
-
-
- SYNTAX C void pgArc( int x, int y, int rad, int sa, int ea );
-
- Pascal PROCEDURE pgArc( x, y, rad, sa, ea:integer );
-
- Basic SUB pgArc( x%, y%, rad%, sa%, ea% )
-
- Fortran SUBROUTINE pgArc( x, y, rad, sa, ea )
- INTEGER*2 x, y, rad, sa, ea
-
- Clipper PROCEDURE pgA( x, y, rad, sa, ea )
-
-
- PARAMETERS x,y Center point of the arc.
- rad Radius of the arc.
- sa Start angle of the arc.
- ea End angle of the arc.
-
-
- RETURN None.
-
-
- SEE ALSO pgCircle, pgEllArc, pgEllipse, pgPie, pgSector, pgSetColor
-
-
- EXAMPLES Draw an arc of radius 100 centered at (300,250) from 45 to 135
- degrees.
-
- C pgSetColor( 2 );
- pgArc( 300, 250, 100, 45, 135 );
-
- Pascal pgSetColor( 2 );
- pgArc( 300, 250, 100, 45, 135 );
-
- Basic call pgSetColor( 2 )
- call pgArc( 300, 250, 100, 45, 135 )
-
- Fortran call pgSetColor( 2 )
- call pgArc( 300, 250, 100, 45, 135 )
-
- Clipper pgSCOLOR( 2 )
- pgA( 300, 250, 100, 45, 135 )
-
-
- **************
- ** pgBMData **
- **************
-
-
- DESCRIPTION The pgBMData function is used to output the specified row of
- pixel values to the drawing file. This function must be called
- for each row of the bitmap you wish to output. You must first
- call the pgBMInit function to initialize the bitmap processing
- sequence.
-
-
- SYNTAX C void pgBMData( int row, int far *data );
-
- Pascal PROCEDURE pgBMData( row:integer; var data );
-
- Basic SUB pgBMData( row%, SEG data% )
-
- Fortran SUBROUTINE pgBMData( row, data )
- INTEGER*2 row, data(n)
-
- Clipper PROCEDURE pgBMD( row, data )
-
-
- PARAMETERS row The row of the bitmap for which data is being output.
- data Vector where each element of the vector represents
- the color value of each corresponding pixel in the
- specified row.
-
-
- RETURN None.
-
-
- SEE ALSO pgBMEnd, pgBMInit
-
-
- EXAMPLES Save a 640x480 16 color VGA size bitmap to a drawing file using
- compression. Assume the bitmap has already been created and you
- have a 'getpixel' function which returns the color value of the
- specified pixel.
-
- C short data[640], ierr, row, col;
- pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for( row=0; row<480; row++ )
- {
- for( col=0; col<640; col++ )
- data[col] = getpixel( col, row );
- pgBMData( row, data );
- }
- pgBMEnd();
- pgEndDrw();
-
- Pascal var
- ierr, row, col : integer;
- data : array[0..639] of integer;
- begin
- pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for row := 0 to 479
- begin
- for col := 0 to 639
- begin
- data[col] := getpixel( col, row );
- end;
- pgBMData( row, data );
- end;
- pgBMEnd;
- pgEndDrw;
- end.
-
- Basic DIM data%(639)
- call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- for row% = 0 to 479
- for col% = 0 to 639
- data%(col) = getpixel%( col%, row% )
- next
- call pgBMData( row%, data%(0) )
- next
- call pgBMEnd
- call pgEndDrw
- end
-
- Fortran integer*2 ierr, row, col, data(640)
- call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- do row = 1, 480
- do col = 1, 640
- data(col) = getpixel( col-1, row-1 )
- end do
- call pgBMData( row-1, data )
- end do
- call pgBMEnd
- call pgEndDrw
- end
-
- Clipper PUBLIC data[640]
- pgINIT( "BITMAP.PGL", 640, 480, @ierr )
- pgBMI( 0, 0, 640, 480, 4, 1 )
- for row = 1 to 480
- for col = 1 to 640
- data[col] = getpixel( col-1, row-1 )
- next
- pgBMD( row-1, data )
- next
- pgBME()
- pgEND()
-
-
- *************
- ** pgBMEnd **
- *************
-
-
- DESCRIPTION The pgBMEnd function is used to end the bitmap processing
- sequence. You must first call the pgBMInit function to
- initialize the bitmap processing sequence.
-
- When you have finished processing bitmap data, you must call
- pgBMEnd to end the processing sequence before calling any other
- PGL function or before initializing another bitmap sequence.
- Failure to do so may cause unpredictable results.
-
-
- SYNTAX C void pgBMEnd( void );
-
- Pascal PROCEDURE pgBMEnd;
-
- Basic SUB pgBMEnd
-
- Fortran SUBROUTINE pgBMEnd
-
- Clipper PROCEDURE pgBME()
-
-
- PARAMETERS None.
-
-
- RETURN None.
-
-
- SEE ALSO pgBMData, pgBMInit
-
-
- EXAMPLES Save a 640x480 16 color VGA size bitmap to a drawing file using
- compression. Assume the bitmap has already been created and
- you have a 'getpixel' function which returns the color value of
- the specified pixel.
-
- C short data[640], ierr, row, col;
- pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for( row=0; row<480; row++ )
- {
- for( col=0; col<640; col++ )
- data[col] = getpixel( col, row );
- pgBMData( row, data );
- }
- pgBMEnd();
- pgEndDrw();
-
- Pascal var
- ierr, row, col : integer;
- data : array[0..639] of integer;
- begin
- pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for row := 0 to 479
- begin
- for col := 0 to 639
- begin
- data[col] := getpixel( col, row );
- end;
- pgBMData( row, data );
- end;
- pgBMEnd;
- pgEndDrw;
- end.
-
- Basic DIM data%(639)
- call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- for row% = 0 to 479
- for col% = 0 to 639
- data%(col) = getpixel%( col%, row% )
- next
- call pgBMData( row%, data%(0) )
- next
- call pgBMEnd
- call pgEndDrw
- end
-
- Fortran integer*2 ierr, row, col, data(640)
- call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- do row = 1, 480
- do col = 1, 640
- data(col) = getpixel( col-1, row-1 )
- end do
- call pgBMData( row-1, data )
- end do
- call pgBMEnd
- call pgEndDrw
- end
-
- Clipper PUBLIC data[640]
- pgINIT( "BITMAP.PGL", 640, 480, @ierr )
- pgBMI( 0, 0, 640, 480, 4, 1 )
- for row = 1 to 480
- for col = 1 to 640
- data[col] = getpixel( col-1, row-1 )
- next
- pgBMD( row-1, data )
- next
- pgBME()
- pgEND()
-
-
- **************
- ** pgBMInit **
- **************
-
-
- DESCRIPTION The pgBMInit function is used to initialize the bitmap output
- processing sequence by specifying the location of the upper-
- left hand corner of the bitmap on the printed page, the pixel
- width and height of the bitmap, the number of bits per pixel,
- and a flag indicating whether the bitmap information is to be
- compressed.
-
- Once the bitmap image has been output to the drawing file, you
- must end the bitmap processing sequence with a call to pgBMEnd.
- You may only call the pgBMData function between the pgBMInit
- and pgBMEnd commands. Calling any other PGL function between
- these two commands may produce unpredictable results.
-
-
- SYNTAX C void pgBMInit( int x, int y, int width, int height,
- int bpp, int compflag );
-
- Pascal PROCEDURE pgBMInit( x, y, width, height, bpp,
- compflag:integer );
-
- Basic SUB pgBMInit( x%, y%, width%, height%, bpp%,
- compflag% )
-
- Fortran SUBROUTINE pgBMInit( x, y, width, height, bpp,
- compflag )
- INTEGER*2 x, y, width, height, bpp, compflag
-
- Clipper PROCEDURE pgBMI( x, y, width, height, bpp, compflag )
-
-
- PARAMETERS x,y The location of the upper-left hand corner of the
- bitmap on the printed page specified in terms of the
- absolute virtual coordinate system.
- width The width of the bitmap in pixels.
- height The height of the bitmap in pixels.
- bpp The number of bits per pixel (1, 2, 4, or 8).
- compflag Flag indicating whether the bitmap information is to
- be compressed. (0=OFF, 1=ON).
-
-
- RETURN None.
-
-
- SEE ALSO pgBMData, pgBMEnd
-
-
- EXAMPLES Save a 640x480 16 color VGA size bitmap to a drawing file using
- compression. Assume the bitmap has already been created and
- you have a 'getpixel' function which returns the color value of
- the specified pixel.
-
- C short data[640], ierr, row, col;
- pgInitDrw( "BITMAP.PGL", 640, 480, &ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for( row=0; row<480; row++ )
- {
- for( col=0; col<640; col++ )
- data[col] = getpixel( col, row );
- pgBMData( row, data );
- }
- pgBMEnd();
- pgEndDrw();
-
- Pascal var
- ierr, row, col : integer;
- data : array[0..639] of integer;
- begin
- pgInitDrw( 'BITMAP.PGL', 640, 480, ierr );
- pgBMInit( 0, 0, 640, 480, 4, 1 );
- for row := 0 to 479
- begin
- for col := 0 to 639
- begin
- data[col] := getpixel( col, row );
- end;
- pgBMData( row, data );
- end;
- pgBMEnd;
- pgEndDrw;
- end.
-
- Basic DIM data%(639)
- call pgInitDrw( "BITMAP.PGL", 640, 480, ierr% )
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- for row% = 0 to 479
- for col% = 0 to 639
- data%(col) = getpixel%( col%, row% )
- next
- call pgBMData( row%, data%(0) )
- next
- call pgBMEnd
- call pgEndDrw
- end
-
- Fortran integer*2 ierr, row, col, data(640)
- call pgInitDrw('BITMAP.PGL'//char(0), 640, 480, ierr)
- call pgBMInit( 0, 0, 640, 480, 4, 1 )
- do row = 1, 480
- do col = 1, 640
- data(col) = getpixel( col-1, row-1 )
- end do
- call pgBMData( row-1, data )
- end do
- call pgBMEnd
- call pgEndDrw
- end
-
- Clipper PUBLIC data[640]
- call pgINIT( "BITMAP.PGL", 640, 480, @ierr )
- call pgBMI( 0, 0, 640, 480, 4, 1 )
- for row = 1 to 480
- for col = 1 to 640
- data[col] = getpixel( col-1, row-1 )
- next
- pgBMD( row-1, data )
- next
- pgBME()
- pgEND()
-
-
- **************
- ** pgCircle **
- **************
-
-
- DESCRIPTION The pgCircle function draws a full circle centered at (x,y) and
- has a radius of rad. The circle may be outlined with a solid
- line, filled using the current fill color and pattern, or both
- outlined and filled. The circle center (x,y) is specified in
- the viewport coordinate system. The cursor position is not
- updated after drawing.
-
-
- SYNTAX C void pgCircle( int x, int y, int rad, int fill );
-
- Pascal PROCEDURE pgCircle( x, y, rad, fill:integer );
-
- Basic SUB pgCircle( x%, y%, rad%, fill% )
-
- Fortran SUBROUTINE pgCircle( x, y, rad, fill )
- INTEGER*2 x, y, rad, fill
-
- Clipper PROCEDURE pgCIR( x, y, rad, fill )
-
-
- PARAMETERS x,y Center of the circle.
- rad Radius of the circle.
- fill Fill flag.
-
- The fill flag parameter can be one of the following manifest
- constants:
-
- Constant Value Action
-
- pgOUTLINE 1 Draw the outline only using the
- current drawing color.
- pgFILL 2 Fill the circle using the current fill
- color and fill pattern. The border
- is not drawn.
- pgOFILL 3 Draw the outline and fill the
- interior.
-
-
- RETURN None.
-
-
- SEE ALSO pgEllipse, pgPie, pgSector, pgSetColor, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw the outline of a circle of radius 100 centered at
- (500,500).
-
- C pgSetColor( 2 );
- pgCircle( 500, 500, 100, pgOUTLINE );
-
- Pascal pgSetColor( 2 );
- pgCircle( 500, 500, 100, pgOUTLINE );
-
- Basic call pgSetColor( 2 )
- call pgCircle( 500, 500, 100, pgOUTLINE )
-
- Fortran call pgSetColor( 2 )
- call pgCircle( 500, 500, 100, pgOUTLINE )
-
- Clipper pgSCOLOR( 2 )
- pgCIR( 500, 500, 100, pgOUTLINE )
-
-
- ****************
- ** pgClearDrw **
- ****************
-
-
- DESCRIPTION The pgClearDrw function clears the current drawing file of all
- graphics. The drawing file remains open, therefore, you may
- continue drawing to this file.
-
-
- SYNTAX C void pgClearDrw( int far *ierr );
-
- Pascal PROCEDURE pgClearDrw( var ierr:integer );
-
- Basic SUB pgClearDrw( SEG ierr% )
-
- Fortran SUBROUTINE pgClearDrw( ierr )
- INTEGER*2 ierr
-
- Clipper PROCEDURE pgCLEAR( <ref>ierr )
-
-
- PARAMETERS ierr A non-zero value will be returned if an error
- occurred. Possible causes of error might be that
- the drawing file was not opened or a failure occurred
- in opening the file.
-
-
- RETURN None.
-
-
- SEE ALSO pgInitDrw, pgNewPage, pgOpenDrw
-
-
- EXAMPLES Clear the current drawing file and check the returned error
- flag.
-
- C int ierr;
- pgClearDrw( &ierr );
- if( ierr != 0 ) printf( "CLEARDRW ERROR" );
-
- Pascal var
- ierr : integer;
- pgClearDrw( ierr );
- if( ierr <> 0 ) writeln( 'CLEARDRW ERROR' );
-
- Basic call pgClearDrw( ierr% )
- if ierr% <> 0 print "CLEARDRW ERROR"
-
- Fortran integer*2 ierr
- call pgClearDrw( ierr )
- if( ierr .ne. 0 ) print *, 'CLEARDRW ERROR'
-
- Clipper pgCLEAR( @ierr )
- if( ierr <> 0 ) ? "CLEARDRW ERROR"
-
-
- *********************
- ** pgClearViewPort **
- *********************
-
-
- DESCRIPTION The pgClearViewPort function clears the currently established
- viewport without ejecting the page. The cursor position is
- placed at the upper-left hand corner of the viewport.
-
-
- SYNTAX C void pgClearViewPort( void );
-
- Pascal PROCEDURE pgClearViewPort;
-
- Basic SUB pgClearViewPort
-
- Fortran SUBROUTINE pgClearViewPort
-
- Clipper PROCEDURE pgCLEARVP()
-
-
- PARAMETERS None.
-
-
- RETURN None.
-
-
- SEE ALSO pgNewPage, pgSetViewPort
-
-
- EXAMPLES Fill the default viewport with the current pattern, then set a
- smaller viewport and clear it.
-
- C int ierr;
- pgInitDrw( "TEST.DAT", 2000, 2000, &ierr );
- pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
- pgSetViewPort( 500, 500, 1500, 1500 );
- pgClearViewPort();
-
- Pascal var
- ierr : integer;
- pgInitDrw( 'TEST.DAT', 2000, 2000, ierr );
- pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
- pgSetViewPort( 500, 500, 1500, 1500 );
- pgClearViewPort;
-
- Basic call pgInitDrw( "TEST.DAT", 2000, 2000, ierr% )
- call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
- call pgSetViewPort( 500, 500, 1500, 1500 )
- call pgClearViewPort
-
- Fortran integer*2 ierr
- call pgInitDrw('TEST.DAT'//char(0), 2000, 2000, ierr)
- call pgRectangle(0, 0, pgGetMaxX, pgGetMaxY, pgFILL)
- call pgSetViewPort( 500, 500, 1500, 1500 )
- call pgClearViewPort
-
- Clipper pgINIT( "TEST.DAT", 2000, 2000, @ierr )
- pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
- pgSVIEWP( 500, 500 1500, 1500 )
- pgCLEARVP()
-
-
- ****************
- ** pgDrawText **
- ****************
-
-
- DESCRIPTION The pgDrawText function is used to display text strings using
- one of seven PGL font sets. Text is displayed using the
- current text color and attributes.
-
- Text is displayed at the current cursor position. The cursor
- position may be specified with the pgMoveTo family of
- functions. The cursor's x-coordinate is updated if text is
- displayed with left justification. The cursor's y-coordinate
- is not updated.
-
-
- SYNTAX C void pgDrawText( char far *str );
-
- Pascal PROCEDURE pgDrawText( str:string );
-
- Basic SUB pgDrawText( SEG str$ )
-
- Fortran SUBROUTINE pgDrawText( str )
- CHARACTER*(*) str
-
- Clipper PROCEDURE pgDT( <expC>str )
-
-
- PARAMETERS str Text string to be displayed.
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawTextXY, pgGetTextHeight, pgGetTextLength, pgMoveTo,
- pgMoveRel, pgSetTextBold, pgSetTextJustify, pgSetTextOrient,
- pgSetTextScaling, pgSetCharSpacing, pgSetTextStyle
-
-
- EXAMPLES Move the cursor to (100,100) and display "Hello World" using
- the pgDrawText function. Then use the pgDrawTextXY function to
- display "Hello World" at (100,300).
-
- C pgSetTextStyle( pgTRIPLEX );
- pgMoveTo( 100, 100 );
- pgDrawText( "Hello World" );
- pgDrawTextXY( 100, 300, "Hello World" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgMoveTo( 100, 100 );
- pgDrawText( 'Hello World' );
- pgDrawTextXY( 100, 300, 'Hello World' );
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgMoveTo( 100, 100 )
- call pgDrawText( "Hello World" )
- call pgDrawTextXY( 100, 300, "Hello World" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgMoveTo( 100, 100 )
- call pgDrawText( 'Hello World'//char(0) )
- call pgDrawTextXY( 100, 300, 'Hello World'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgMOVTO( 100, 100 )
- pgDT( "Hello World" )
- pgDTXY( 100, 300, "Hello World" )
-
-
- ******************
- ** pgDrawTextXY **
- ******************
-
-
- DESCRIPTION The pgDrawTextXY function is used to display text strings using
- one of seven PGL font sets. Text is displayed using the current
- text color and attributes.
-
- The pgDrawTextXY function is similar to the pgDrawText function
- except that the text position is passed in the function call as
- (x,y) specified in the viewport coordinate system. The cursor
- position is not updated.
-
-
- SYNTAX C void pgDrawTextXY( int x, int y, char far *str );
-
- Pascal PROCEDURE pgDrawTextXY( x, y:integer; str:string );
-
- Basic SUB pgDrawTextXY( x%, y%, SEG str$ )
-
- Fortran SUBROUTINE pgDrawTextXY( x, y, str )
- CHARACTER*(*) str
- INTEGER*2 x, y
-
- Clipper PROCEDURE pgDTXY( x, y, <expC>str )
-
-
- PARAMETERS x,y Text positioning coordinate specified in the viewport
- coordinate system.
- str Text string to be displayed.
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgGetTextHeight, pgGetTextLength, pgMoveTo,
- pgMoveRel, pgSetTextBold, pgSetTextJustify, pgSetTextOrient,
- pgSetTextScaling, pgSetCharSpacing, pgSetTextStyle
-
-
- EXAMPLES Move the cursor to (100,100) and display "Hello World" using
- the pgDrawText function. Then use the pgDrawTextXY function to
- display "Hello World" at (100,300).
-
- C pgSetTextStyle( pgTRIPLEX );
- pgMoveTo( 100, 100 );
- pgDrawText( "Hello World" );
- pgDrawTextXY( 100, 300, "Hello World" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgMoveTo( 100, 100 );
- pgDrawText( 'Hello World' );
- pgDrawTextXY( 100, 300, 'Hello World' );
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgMoveTo( 100, 100 )
- call pgDrawText( "Hello World" )
- call pgDrawTextXY( 100, 300, "Hello World" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgMoveTo( 100, 100 )
- call pgDrawText( 'Hello World'//char(0) )
- call pgDrawTextXY( 100, 300, 'Hello World'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgMOVTO( 100, 100 )
- pgDT( "Hello World" )
- pgDTXY( 100, 300, "Hello World" )
-
-
- **************
- ** pgEllArc **
- **************
-
-
- DESCRIPTION The pgEllArc function draws elliptical arcs of any angular
- extent using the current drawing color. The arc is centered at
- the coordinate (x,y) with radii xrad and yrad. The start and
- termination angles of the arc are given by the parameters sa
- and ea, respectively, specified in degree measure. Zero
- degrees is taken to be the 3 o'clock position increasing
- positively in a counterclockwise direction. The arc center
- (x,y) is specified in the viewport coordinate system. The
- cursor position is not updated after drawing.
-
-
- SYNTAX C void pgEllArc( int x, int y, int xrad, int yrad,
- int sa, int ea );
-
- Pascal PROCEDURE pgEllArc( x, y, xrad, yrad,
- sa, ea:integer );
-
- Basic SUB pgEllArc( x%, y%, xrad%, yrad%, sa%, ea% )
-
- Fortran SUBROUTINE pgEllArc( x, y, xrad, yrad, sa, ea )
- INTEGER*2 x, y, xrad, yrad, sa, ea
-
- Clipper PROCEDURE pgELLA( x, y, xrad, yrad, sa, ea )
-
-
- PARAMETERS x,y Center point of the arc.
- xrad Horizontal radius of the arc.
- yrad Vertical radius of the arc.
- sa Start angle of the arc.
- ea End angle of the arc ( > sa ).
-
-
- RETURN None.
-
-
- SEE ALSO pgArc, pgCircle, pgEllipse, pgPie, pgSector, pgSetColor
-
-
- EXAMPLES Draw an elliptic arc of radius 200 by 100 centered at (500,500)
- from 0 to 90 degrees.
-
- C pgSetColor( 2 );
- pgEllArc( 500, 500, 200, 100, 0, 90 );
-
- Pascal pgSetColor( 2 );
- pgEllArc( 500, 500, 200, 100, 0, 90 );
-
- Basic call pgSetColor( 2 )
- call pgEllArc( 500, 500, 200, 100, 0, 90 )
-
- Fortran call pgSetColor( 2 )
- call pgEllArc( 500, 500, 200, 100, 0, 90 )
-
- Clipper pgSCOLOR( 2 )
- pgELLA( 500, 500, 200, 100, 0, 90 )
-
-
- ***************
- ** pgEllipse **
- ***************
-
-
- DESCRIPTION The pgEllipse function draws a full ellipse centered at (x,y)
- and having radii xrad and yrad. The ellipse may be outlined
- with a solid line, filled using the current fill color and
- pattern, or both outlined and filled. The ellipse center (x,y)
- is specified in the viewport coordinate system. The cursor
- position is not updated after drawing.
-
-
- SYNTAX C void pgEllipse( int x, int y, int xrad, int yrad,
- int fill );
-
- Pascal PROCEDURE pgEllipse( x, y, xrad, yrad, fill:integer );
-
- Basic SUB pgEllipse( x%, y%, xrad%, yrad%, fill% )
-
- Fortran SUBROUTINE pgEllipse( x, y, xrad, yrad, fill )
- INTEGER*2 x, y, xrad, yrad, fill
-
- Clipper PROCEDURE pgELL( x, y, xrad, yrad, fill )
-
-
- PARAMETERS x,y Center of the ellipse.
- xrad Horizontal radius of the ellipse.
- yrad Vertical radius of the ellipse.
- fill Fill flag.
-
- The fill flag parameter may be one of the following manifest
- constants:
-
- Constant Value Action
-
- pgOUTLINE 1 Draw the outline only using the
- current drawing color.
- pgFILL 2 Fill using the current fill color and
- fill pattern. The border is not
- drawn.
- pgOFILL 3 Draw the outline and fill the
- interior.
-
- RETURN None.
-
-
- SEE ALSO pgCircle, pgPie, pgSector, pgSetColor, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw a filled ellipse of radius 200 by 100 centered at
- (500,500).
-
- C pgSetColor( 2 );
- pgEllipse( 500, 500, 200, 100, pgFILL );
-
- Pascal pgSetColor( 2 );
- pgEllipse( 500, 500, 200, 100, pgFILL );
-
- Basic call pgSetColor( 2 )
- call pgEllipse( 500, 500, 200, 100, pgFILL )
-
- Fortran call pgSetColor( 2 )
- call pgEllipse( 500, 500, 200, 100, pgFILL )
-
- Clipper pgSCOLOR( 2 )
- pgELL( 500, 500, 200, 100, pgFILL )
-
-
- **************
- ** pgEndDrw **
- **************
-
-
- DESCRIPTION The pgEndDrw function ends the drawing session and closes the
- drawing file. Only one drawing file may be open at a time.
- You must issue a pgEndDrw command before recalling pgInitDrw or
- pgOpenDrw. Failure to do so may cause unpredictable results.
-
-
- SYNTAX C void pgEndDrw( void );
-
- Pascal PROCEDURE pgEndDrw;
-
- Basic SUB pgEndDrw
-
- Fortran SUBROUTINE pgEndDrw
-
- Clipper PROCEDURE pgEND()
-
-
- PARAMETERS None.
-
-
- RETURN None.
-
-
- SEE ALSO pgInitDrw, pgOpenDrw
-
-
- EXAMPLES Close the current drawing file and open a new drawing file
- named TEST.PLT with a virtual resolution of 2000 x 2000.
-
- C int ierr;
- pgEndDrw();
- pgInitDrw( "TEST.PLT", 2000, 2000, &ierr );
-
- Pascal var
- ierr : integer;
- pgEndDrw;
- pgInitDrw( 'TEST.PLT', 2000, 2000, ierr );
-
- Basic call pgEndDrw
- call pgInitDrw( "TEST.PLT", 2000, 2000, ierr% )
-
- Fortran integer*2 ierr
- call pgEndDrw
- call pgInitDrw('TEST.PLT'//char(0), 2000, 2000, ierr)
-
- Clipper pgEND()
- pgINIT( "TEST.PLT", 2000, 2000, @ierr )
-
-
- ***************
- ** pgGetAbsX **
- ***************
-
-
- DESCRIPTION The pgGetAbsX function returns the current x-cursor position
- in terms of the absolute virtual coordinate system.
-
-
- SYNTAX C int pgGetAbsX( void );
-
- Pascal FUNCTION pgGetAbsX : integer;
-
- Basic FUNCTION pgGetAbsX%
-
- Fortran INTEGER*2 FUNCTION pgGetAbsX
-
- Clipper FUNCTION pgGABSX()
-
-
- PARAMETERS None.
-
-
- RETURN The x-cursor position in terms of the absolute virtual
- coordinate system.
-
-
- SEE ALSO pgDrawText, pgGetAbsY, pgGetX, pgGetY, pgMoveRel,
- pgMoveTo, pgLineRel, pgLineTo
-
-
- EXAMPLES Set a viewport, then move the cursor to an arbitrary location.
- Use the pgGetX and pgGetAbsX functions to return the location
- of the cursor relative to the viewport and relative to the
- absolute coordinates, respectively.
-
- C pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- printf( "Viewport X coordinate = %d\n", pgGetX() );
- printf( "Absolute X coordinate = %d\n", pgGetAbsX() );
-
- Pascal pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- writeln( 'Viewport X coordinate = ', pgGetX );
- writeln( 'Absolute X coordinate = ', pgGetAbsX );
-
- Basic call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print "Viewport X coordinate = ", pgGetX%
- print "Absolute X coordinate = ", pgGetAbsX%
-
- Fortran call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print *, 'Viewport X coordinate = ', pgGetX
- print *, 'Absolute X coordinate = ', pgGetAbsX
-
- Clipper pgSetViewPort( 300, 300, 900, 900 )
- pgMoveTo( 100, 100 )
- ? "Viewport X coordinate = ", pgGX()
- ? "Absolute X coordinate = ", pgGABSX()
-
-
- ***************
- ** pgGetAbsY **
- ***************
-
-
- DESCRIPTION The pgGetAbsY function returns the current y-cursor position in
- terms of the absolute virtual coordinate system.
-
-
- SYNTAX C int pgGetAbsY( void );
-
- Pascal FUNCTION pgGetAbsY : integer;
-
- Basic FUNCTION pgGetAbsY%
-
- Fortran INTEGER*2 FUNCTION pgGetAbsY
-
- Clipper FUNCTION pgGABSY()
-
-
- PARAMETERS None.
-
-
- RETURN The y-cursor position in terms of the absolute virtual
- coordinate system.
-
-
- SEE ALSO pgDrawText, pgGetAbsX, pgGetX, pgGetY, pgMoveRel,
- pgMoveTo, pgLineRel, pgLineTo
-
-
- EXAMPLES Set a viewport, then move the cursor to an arbitrary location.
- Use the pgGetY and pgGetAbsY functions to return the location
- of the cursor relative to the viewport and relative to the
- absolute coordinates, respectively.
-
- C pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- printf( "Viewport Y coordinate = %d\n", pgGetY() );
- printf( "Absolute Y coordinate = %d\n", pgGetAbsY() );
-
- Pascal pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- writeln( 'Viewport Y coordinate = ', pgGetY );
- writeln( 'Absolute Y coordinate = ', pgGetAbsY );
-
- Basic call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print "Viewport Y coordinate = ", pgGetY%
- print "Absolute Y coordinate = ", pgGetAbsY%
-
- Fortran call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print *, 'Viewport Y coordinate = ', pgGetY
- print *, 'Absolute Y coordinate = ', pgGetAbsY
-
- Clipper pgSetViewPort( 300, 300, 900, 900 )
- pgMoveTo( 100, 100 )
- ? "Viewport Y coordinate = ", pgGY()
- ? "Absolute Y coordinate = ", pgGABSY()
-
-
- **********************
- ** pgGetCharSpacing **
- **********************
-
-
- DESCRIPTION The pgGetCharSpacing function returns the current level of
- additional character spacing set by the pgSetCharSpacing
- function. The default setting is 0.
-
-
- SYNTAX C int pgGetCharSpacing( void );
-
- Pascal FUNCTION pgGetCharSpacing : integer;
-
- Basic FUNCTION pgGetCharSpacing%
-
- Fortran INTEGER*2 FUNCTION pgGetCharSpacing
-
- Clipper FUNCTION pgGCHARSP()
-
-
- PARAMETERS None.
-
-
- RETURN Character spacing in pixel units.
-
-
- SEE ALSO pgGetTextLength, pgSetCharSpacing
-
-
- EXAMPLES Set the character spacing to twice the current value, then
- display the text "Hello World".
-
- C pgSetTextStyle( pgTRIPLEX );
- pgSetCharSpacing( 2 * pgGetCharSpacing() );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgSetCharSpacing( 2 * pgGetCharSpacing );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgSetCharSpacing( 2 * pgGetCharSpacing% )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgSetCharSpacing( 2 * pgGetCharSpacing )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgSCHARSP( 2 * pgGCHARSP() )
- pgDTXY( 100, 100, "Hello World" )
-
-
- *******************
- ** pgGetClipArea **
- *******************
-
-
- DESCRIPTION The pgGetClipArea function returns the clipping region set with
- the pgSetClipArea function. The clipping region coordinates
- are returned in terms of the absolute virtual coordinate system.
-
-
- SYNTAX C void pgGetClipArea( int far *x1, int far *y1,
- int far *x2, int far *y2 );
-
- Pascal PROCEDURE pgGetClipArea( var x1, y1,
- x2, y2:integer );
-
- Basic SUB pgGetClipArea( SEG x1%, SEG y1%,
- SEG x2%, SEG y2% )
-
- Fortran SUBROUTINE pgGetClipArea( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
-
- Clipper PROCEDURE pgGCLIPA( <ref>x1, <ref>y1,
- <ref>x2, <ref>y2 )
-
-
- PARAMETERS x1,y1 Upper-left corner of clipping region.
- x2,y2 Lower-right corner of clipping region.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetClipping, pgGetViewPort, pgSetClipArea, pgSetClipping,
- pgSetViewPort
-
-
- EXAMPLES Get the current clipping region. Set the clipping area to the
- full printable region and fill that region, then restore the
- clipping region.
-
- C int left, top, right, bottom;
- pgGetClipArea( &left, &top, &right, &bottom );
- pgSetClipArea( 0, 0, pgGetMaxX(), pgGetMaxY() );
- pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
- pgSetClipArea( left, top, right, bottom );
-
- Pascal var
- left, top, right, bottom : integer;
- pgGetClipArea( left, top, right, bottom );
- pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY );
- pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
- pgSetClipArea( left, top, right, bottom );
-
- Basic call pgGetClipArea( left%, top%, right%, bottom% )
- call pgSetClipArea( 0, 0, pgGetMaxX%, pgGetMaxY% )
- call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
- call pgSetClipArea( left%, top%, right%, bottom% )
-
- Fortran integer*2 left, top, right, bottom
- call pgGetClipArea( left, top, right, bottom )
- call pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY )
- call pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL )
- call pgSetClipArea( left, top, right, bottom )
-
- Clipper pgGCLIPA( @left, @top, @right, @bottom )
- pgSCLIPA( 0, 0, pgGMAXX(), pgGMAXY() )
- pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
- pgSCLIPA( left, top, right, bottom )
-
-
- *******************
- ** pgGetClipping **
- *******************
-
-
- DESCRIPTION The pgGetClipping function returns the current clipping switch
- status.
-
- The clipping switch is used to enable or disable clipping. If
- enabled, all subsequent graphics, including text, will be
- clipped at the boundaries set by the pgSetClipArea function.
- If disabled, clipping will be performed at the boundaries of
- the page.
-
-
- SYNTAX C int pgGetClipping( void );
-
- Pascal FUNCTION pgGetClipping : integer;
-
- Basic FUNCTION pgGetClipping%
-
- Fortran INTEGER*2 FUNCTION pgGetClipping
-
- Clipper FUNCTION pgGCLIP()
-
-
- PARAMETERS None.
-
-
- RETURN The clipping switch status is returned as one of the following:
-
- Constant Value
-
- pgON 1
- pgOFF 0
-
-
- SEE ALSO pgGetClipArea, pgGetViewPort, pgSetClipArea, pgSetClipping,
- pgSetViewPort
-
-
- EXAMPLES Get the current clipping flag. Disable clipping and fill a
- rectangular region, then restore the clipping parameter.
-
- C int clipflag;
- clipflag = pgGetClipping();
- pgSetClipping( pgOFF );
- pgRectangle( 0, 0, 500, 200, pgFILL );
- pgSetClipping( clipflag );
-
- Pascal var
- clipflag : integer;
- clipflag := pgGetClipping;
- pgSetClipping( pgOFF );
- pgRectangle( 0, 0, 500, 200, pgFILL );
- pgSetClipping( clipflag );
-
- Basic clipflag% = pgGetClipping%
- call pgSetClipping( pgOFF )
- call pgRectangle( 0, 0, 500, 200, pgFILL )
- call pgSetClipping( clipflag% )
-
- Fortran integer*2 clipflag
- clipflag = pgGetClipping
- call pgSetClipping( pgOFF )
- call pgRectangle( 0, 0, 500, 200, pgFILL )
- call pgSetClipping( clipflag )
-
- Clipper clipflag = pgGCLIP()
- pgSCLIP( pgOFF )
- pgRECT( 0, 0, 500, 200, pgFILL )
- pgSCLIP( clipflag )
-
-
- ****************
- ** pgGetColor **
- ****************
-
-
- DESCRIPTION The pgGetColor function returns the current color index. The
- default color index is 1.
-
- The following functions use the current color: pgArc, pgCircle,
- pgDrawText, pgDrawTextXY, pgEllArc, pgEllipse, pgLine,
- pgLineRel, pgLineTo, pgPie, pgPolygon, pgPolyLine, pgRectangle,
- and pgSector.
-
-
- SYNTAX C int pgGetColor( void );
-
- Pascal FUNCTION pgGetColor : integer;
-
- Basic FUNCTION pgGetColor%
-
- Fortran INTEGER*2 FUNCTION pgGetColor
-
- Clipper FUNCTION pgGCOLOR()
-
-
- PARAMETERS None.
-
-
- RETURN The current color index.
-
-
- SEE ALSO pgSetColor
-
-
- EXAMPLES Get the current drawing color and use it as the fill color.
-
- C int color;
- color = pgGetColor();
- pgSetFillStyle( pgFSOLID, color );
- pgRectangle( 200, 200, 500, 500, pgFILL );
- Pascal var
- color : integer;
- color := pgGetColor;
- pgSetFillStyle( pgFSOLID, color );
- pgRectangle( 200, 200, 500, 500, pgFILL );
-
- Basic color% = pgGetColor%
- call pgSetFillStyle( pgFSOLID, color% )
- call pgRectangle( 200, 200, 500, 500, pgFILL )
-
- Fortran integer*2 color
- color = pgGetColor
- call pgSetFillStyle( pgFSOLID, color )
- call pgRectangle( 200, 200, 500, 500, pgFILL )
-
- Clipper color = pgGCOLOR()
- pgSFSTYLE( pgFSOLID, color )
- pgRECT( 200, 200, 500, 500, pgFILL )
-
-
- ********************
- ** pgGetDevColors **
- ********************
-
-
- DESCRIPTION The pgGetDevColors function returns the number of available
- colors for the currently loaded device driver at the specified
- resolution mode. For example, an HP PaintJet allows 8 drawing
- colors at the highest resolution mode, but allows 16 colors in
- low resolution mode while most laserjets and dot matrix printers
- only allow 2 colors (black and white).
-
- The device driver must first be installed by calling
- pgLoadDevInfo. The maximum number of resolution modes may be
- obtained by calling the pgGetDevModes function.
-
-
- SYNTAX C int pgGetDevColors( int res );
-
- Pascal FUNCTION pgGetDevColors( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevColors%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevColors( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDCOLORS( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The number of available colors for printing.
-
-
- SEE ALSO pgGetDevModes, pgLoadDevInfo
-
-
- EXAMPLES Load the HP PaintJet device driver and determine how many
- drawing colors are allowed at the highest resolution mode.
-
- C int ncolors, ierr;
- ierr = pgLoadDevInfo( "HPPJET" );
- ncolors = pgGetDevColors( 3 );
-
- Pascal var
- ncolors, ierr : integer;
- ierr := pgLoadDevInfo( 'HPPJET' );
- ncolors := pgGetDevColors( 3 );
-
- Basic ierr% = pgLoadDevInfo( "HPPJET" )
- ncolors% = pgGetDevColors%( 3 )
-
- Fortran integer*2 ncolors, ierr
- ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
- ncolors = pgGetDevColors( 3 )
-
- Clipper ierr = pgLDINFO( "HPPJET" )
- ncolors = pgGDCOLORS( 3 )
-
-
- ********************
- ** pgGetDevHeight **
- ********************
-
-
- DESCRIPTION The pgGetDevHeight function returns the paper height for the
- currently loaded device driver. You must first load a device
- driver with the pgLoadDevInfo function.
-
-
- SYNTAX C int pgGetDevHeight( void );
-
- Pascal FUNCTION pgGetDevHeight : integer;
-
- Basic FUNCTION pgGetDevHeight%
-
- Fortran INTEGER*2 FUNCTION pgGetDevHeight
-
- Clipper FUNCTION pgGDHEIGHT()
-
-
- PARAMETERS None.
-
-
- RETURN The paper height in units of 100=1"
- (e.g., 850=8.5", 1100=11.0").
-
-
- SEE ALSO pgGetDevWidth, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the width and height of
- the paper.
-
- C int width, height, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- width = pgGetDevWidth();
- height = pgGetDevHeight();
-
- Pascal var
- width, height, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- width := pgGetDevWidth;
- height := pgGetDevHeight;
-
- Basic ierr% = pgLoadDevInfo( "HPLJET" )
- width% = pgGetDevWidth%
- height% = pgGetDevHeight%
-
- Fortran integer*2 width, height, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- width = pgGetDevWidth
- height = pgGetDevHeight
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- width = pgGDWIDTH()
- height = pgGDHEIGHT()
-
-
- ******************
- ** pgGetDevMaxX **
- ******************
-
-
- DESCRIPTION The pgGetDevMaxX function returns the number of addressable
- pixels in the x-direction for the specified resolution mode of
- the current device driver. The device driver must first be
- installed by calling pgLoadDevInfo. The maximum number of
- resolution modes may be obtained by calling the pgGetDevModes
- function. This function accounts for pagesize, margins, and
- orientation. It should be called after pgSetPageMargins,
- pgSetPageForm, and pgSetPageSize.
-
-
- SYNTAX C int pgGetDevMaxX( int res );
-
- Pascal FUNCTION pgGetDevMaxX( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevMaxX%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevMaxX( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDMAXX( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The maximum number of addressable pixels in the x-direction.
-
-
- SEE ALSO pgGetDevMaxY, pgLoadDevInfo, pgSetPageForm, pgSetPageSize,
- pgSetPageMargins
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the maximum number of x
- and y addressable pixels for the highest resolution mode (3).
-
- C int xmax, ymax, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageMargins( 100,100,100,100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax = pgGetDevMaxX( 3 );
- ymax = pgGetDevMaxY( 3 );
-
- Pascal var
- xmax, ymax, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageMargins( 100,100,100,100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax := pgGetDevMaxX( 3 );
- ymax := pgGetDevMaxY( 3 );
-
- Basic ierr% = pgLoadDevInfo( "HPLJET" )
- call pgSetPageMargins( 100,100,100,100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax% = pgGetDevMaxX%( 3 )
- ymax% = pgGetDevMaxY%( 3 )
-
- Fortran integer*2 xmax, ymax, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageMargins( 100,100,100,100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax = pgGetDevMaxX( 3 )
- ymax = pgGetDevMaxY( 3 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPMARGIN( 100,100,100,100 )
- pgSPFORM( pgLANDSCAPE )
- pgSPSIZE( pgFULLPAGE )
- xmax = pgGDMAXX( 3 )
- ymax = pgGDMAXY( 3 )
-
-
- ******************
- ** pgGetDevMaxY **
- ******************
-
-
- DESCRIPTION The pgGetDevMaxY function returns the number of addressable
- pixels in the y-direction for the specified resolution mode of
- the current device driver. The device driver must first be
- installed by calling pgLoadDevInfo. The maximum number of
- resolution modes may be obtained by calling the pgGetDevModes
- function. This function accounts for pagesize, margins, and
- orientation. It should be called after pgSetPageMargins,
- pgSetPageForm, and pgSetPageSize.
-
-
- SYNTAX C int pgGetDevMaxY( int res );
-
- Pascal FUNCTION pgGetDevMaxY( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevMaxY%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevMaxY( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDMAXY( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The maximum number of addressable pixels in the y-direction.
-
-
- SEE ALSO pgGetDevMaxX, pgLoadDevInfo, pgSetPageForm, pgSetPageSize,
- pgSetPageMargins
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the maximum number of x
- and y addressable pixels for the highest resolution mode (3).
-
- C int xmax, ymax, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageMargins( 100,100,100,100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax = pgGetDevMaxX( 3 );
- ymax = pgGetDevMaxY( 3 );
-
- Pascal var
- xmax, ymax, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageMargins( 100,100,100,100 );
- pgSetPageForm( pgLANDSCAPE );
- pgSetPageSize( pgFULLPAGE );
- xmax := pgGetDevMaxX( 3 );
- ymax := pgGetDevMaxY( 3 );
-
- Basic ierr% = pgLoadDevInfo( "HPLJET" )
- call pgSetPageMargins( 100,100,100,100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax% = pgGetDevMaxX%( 3 )
- ymax% = pgGetDevMaxY%( 3 )
-
- Fortran integer*2 xmax, ymax, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageMargins( 100,100,100,100 )
- call pgSetPageForm( pgLANDSCAPE )
- call pgSetPageSize( pgFULLPAGE )
- xmax = pgGetDevMaxX( 3 )
- ymax = pgGetDevMaxY( 3 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPMARGIN( 100,100,100,100 )
- pgSPFORM( pgLANDSCAPE )
- pgSPSIZE( pgFULLPAGE )
- xmax = pgGDMAXX( 3 )
- ymax = pgGDMAXY( 3 )
-
-
- *******************
- ** pgGetDevModes **
- *******************
-
-
- DESCRIPTION The pgGetDevModes function returns the number of available
- resolution modes for the currently loaded device driver. The
- device driver must first be installed by calling pgLoadDevInfo.
-
-
- SYNTAX C int pgGetDevModes( void );
-
- Pascal FUNCTION pgGetDevModes : integer;
-
- Basic FUNCTION pgGetDevModes%
-
- Fortran INTEGER*2 FUNCTION pgGetDevModes
-
- Clipper FUNCTION pgGDMODES()
-
-
- PARAMETERS None.
-
-
- RETURN The number of resolution modes for the currently loaded device
- driver.
-
-
- SEE ALSO pgGetDevMaxX, pgGetDevMaxY, pgGetDevResX, pgGetDevResY,
- pgGetDevColors, pgGetDevPlanes, pgLoadDevInfo
-
-
- EXAMPLES Load the HP PaintJet device driver and determine how many
- resolution modes are available.
-
- C int nmodes, ierr;
- ierr = pgLoadDevInfo( "HPPJET" );
- nmodes = pgGetDevModes();
-
- Pascal var
- nmodes, ierr : integer;
- ierr := pgLoadDevInfo( 'HPPJET' );
- nmodes := pgGetDevModes;
-
- Basic ierr% = pgLoadDevInfo( "HPPJET" )
- nmodes% = pgGetDevModes%
-
- Fortran integer*2 nmodes, ierr
- ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
- nmodes = pgGetDevModes
-
- Clipper ierr = pgLDINFO( "HPPJET" )
- nmodes = pgGDMODES()
-
-
- *********************
- ** pgGetDevOffsetX **
- *********************
-
-
- DESCRIPTION Most printers enforce a slight left and top margin to prevent
- you from writing at the very edge of the paper. The
- pgGetDevOffsetX function returns the left margin offset for the
- current device driver. You must first install the device driver
- of interest with the pgLoadDevInfo function.
-
-
- SYNTAX C int pgGetDevOffsetX( void );
-
- Pascal FUNCTION pgGetDevOffsetX : integer;
-
- Basic FUNCTION pgGetDevOffsetX%
-
- Fortran INTEGER*2 FUNCTION pgGetDevOffsetX
-
- Clipper FUNCTION pgGDOFFX()
-
-
- PARAMETERS None.
-
-
- RETURN The left margin offset based on the scale of 100=1" (i.e.,
- 25=0.25", 59=0.59", etc.).
-
-
- SEE ALSO pgGetDevOffsetY, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the x and y offsets.
-
- C int offx, offy, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- offx = pgGetDevOffsetX();
- offy = pgGetDevOffsetY();
-
- Pascal var
- offx, offy, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- offx := pgGetDevOffsetX;
- offy := pgGetDevOffsetY;
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- offx% = pgGetDevOffsetX%
- offy% = pgGetDevOffsetY%
-
- Fortran integer*2 offx, offy, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- offx = pgGetDevOffsetX
- offy = pgGetDevOffsetY
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- offx = pgGDOFFX()
- offy = pgGDOFFY()
-
-
- *********************
- ** pgGetDevOffsetY **
- *********************
-
-
- DESCRIPTION Most printers enforce a slight left and top margin to prevent
- you from writing at the very edge of the paper. The
- pgGetDevOffsetY function returns the top margin offset for the
- current device driver. You must first install the device driver
- of interest with the pgLoadDevInfo function.
-
-
- SYNTAX C int pgGetDevOffsetY( void );
-
- Pascal FUNCTION pgGetDevOffsetY : integer;
-
- Basic FUNCTION pgGetDevOffsetY%
-
- Fortran INTEGER*2 FUNCTION pgGetDevOffsetY
-
- Clipper FUNCTION pgGDOFFY()
-
-
- PARAMETERS None.
-
-
- RETURN The top margin offset based on the scale of 100=1" (i.e.,
- 25=0.25", 59=0.59", etc.).
-
-
- SEE ALSO pgGetDevOffsetX, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the x and y offsets.
-
- C int offx, offy, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- offx = pgGetDevOffsetX();
- offy = pgGetDevOffsetY();
-
- Pascal var
- offx, offy, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- offx := pgGetDevOffsetX;
- offy := pgGetDevOffsetY;
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- offx% = pgGetDevOffsetX%
- offy% = pgGetDevOffsetY%
-
- Fortran integer*2 offx, offy, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- offx = pgGetDevOffsetX
- offy = pgGetDevOffsetY
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- offx = pgGDOFFX()
- offy = pgGDOFFY()
-
-
- ********************
- ** pgGetDevPlanes **
- ********************
-
-
- DESCRIPTION The pgGetDevPlanes function returns the number of bitplanes
- created by the driver when printing to the currently installed
- printer at the specified resolution. The device driver must
- first be installed by calling pgLoadDevInfo. The maximum
- number of resolution modes may be obtained by calling the
- pgGetDevModes function.
-
-
- SYNTAX C int pgGetDevPlanes( int res );
-
- Pascal FUNCTION pgGetDevPlanes( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevPlanes%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevPlanes( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDPLANES( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The number of bitplanes.
-
-
- SEE ALSO pgGetDevModes, pgLoadDevInfo
-
-
- EXAMPLES Load the HP PaintJet device driver and determine how many
- bitplanes are available at resolution mode 2.
-
- C int nplanes, ierr;
- ierr = pgLoadDevInfo( "HPPJET" );
- nplanes = pgGetDevPlanes( 2 );
-
- Pascal var
- nplanes, ierr : integer;
- ierr := pgLoadDevInfo( 'HPPJET' );
- nplanes := pgGetDevPlanes( 2 );
-
- Basic ierr% = pgLoadDevInfo%( "HPPJET" )
- nplanes% = pgGetDevPlanes%( 2 )
-
- Fortran integer*2 nplanes, ierr
- ierr = pgLoadDevInfo( 'HPPJET'//char(0) )
- nplanes = pgGetDevPlanes( 2 )
-
- Clipper ierr = pgLDINFO( "HPPJET" )
- nplanes = pgGDPLANES( 2 )
-
-
- ******************
- ** pgGetDevResX **
- ******************
-
-
- DESCRIPTION The pgGetDevResX function returns the device resolution as the
- number of dpi (dots per inch) in the x-direction for the
- specified resolution mode of the current device driver. The
- device driver must first be installed by calling pgLoadDevInfo.
- The maximum number of resolution modes may be obtained by
- calling the pgGetDevModes function.
-
- The dpi resolution is only a function of the resolution mode
- and is not affected by the page margins, size, and layout.
-
- The dpi resolution is a measure of the number of pixel dots
- there are in an inch. Therefore, this information is used to
- determine the aspect ratio of the output device. For example,
- if the width:height dpi resolution is 240:72, this means that a
- rectangle 240 pixels wide by 72 pixels high will print as a
- square 1" by 1".
-
-
- SYNTAX C int pgGetDevResX( int res );
-
- Pascal FUNCTION pgGetDevResX( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevResX%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevResX( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDRESX( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The dpi (dots per inch) resolution in the x-direction.
-
-
- SEE ALSO pgGetDevModes, pgGetDevResY, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the x and y dpi
- resolution for resolution mode 2.
-
- C int resx, resy, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- resx = pgGetDevResX( 2 );
- resy = pgGetDevResY( 2 );
-
- Pascal var
- resx, resy, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- resx := pgGetDevResX( 2 );
- resy := pgGetDevResY( 2 );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- resx% = pgGetDevResX%( 2 )
- resy% = pgGetDevResY%( 2 )
-
- Fortran integer*2 resx, resy, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- resx = pgGetDevResX( 2 )
- resy = pgGetDevResY( 2 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- resx = pgGDRESX( 2 )
- resy = pgGDRESY( 2 )
-
-
- ******************
- ** pgGetDevResY **
- ******************
-
-
- DESCRIPTION The pgGetDevResY function returns the device resolution as the
- number of dpi (dots per inch) in the y-direction for the
- specified resolution mode of the current device driver. The
- device driver must first be installed by calling pgLoadDevInfo.
- The maximum number of resolution modes may be obtained by
- calling the pgGetDevModes function.
-
- The dpi resolution is only a function of the resolution mode and
- is not affected by the page margins, size, and layout.
-
- The dpi resolution is a measure of the number of pixel dots
- there are in an inch. Therefore, this information is used to
- determine the aspect ratio of the output device. For example,
- if the width:height dpi resolution is 240:72, this means that a
- rectangle 240 pixels wide by 72 pixels high will print as a
- square 1" by 1".
-
-
- SYNTAX C int pgGetDevResY( int res );
-
- Pascal FUNCTION pgGetDevResY( res:integer ) : integer;
-
- Basic FUNCTION pgGetDevResY%( res% )
-
- Fortran INTEGER*2 FUNCTION pgGetDevResY( res )
- INTEGER*2 res
-
- Clipper FUNCTION pgGDRESY( res )
-
-
- PARAMETERS res Printer resolution mode (0, 1, 2, or 3).
-
-
- RETURN The dpi (dots per inch) resolution in the y-direction.
-
-
- SEE ALSO pgGetDevModes, pgGetDevResX, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the x and y dpi
- resolution for resolution mode 2.
-
- C int resx, resy, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- resx = pgGetDevResX( 2 );
- resy = pgGetDevResY( 2 );
-
- Pascal var
- resx, resy, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- resx := pgGetDevResX( 2 );
- resy := pgGetDevResY( 2 );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- resx% = pgGetDevResX%( 2 )
- resy% = pgGetDevResY%( 2 )
-
- Fortran integer*2 resx, resy, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- resx = pgGetDevResX( 2 )
- resy = pgGetDevResY( 2 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- resx = pgGDRESX( 2 )
- resy = pgGDRESY( 2 )
-
-
- ******************
- ** pgGetDevType **
- ******************
-
-
- DESCRIPTION The pgGetDevType function returns the type of printer device
- for the currently loaded device driver. A device driver must
- first be installed by calling pgLoadDevInfo.
-
-
- SYNTAX C int pgGetDevType( void );
-
- Pascal FUNCTION pgGetDevType : integer;
-
- Basic FUNCTION pgGetDevType%
-
- Fortran INTEGER*2 FUNCTION pgGetDevType
-
- Clipper FUNCTION pgGDTYPE()
-
-
- PARAMETERS None.
-
-
- RETURN Returns a value from 0-3 indicating the type of device.
-
- Value Device Type
-
- 0 Dot matrix printer device.
- 1 LaserJet, DeskJet, PaintJet printer device.
- 2 PCX file format device driver.
- 3 Encapsulated PostScript file format device driver.
-
-
- SEE ALSO pgLoadDevInfo
-
-
- EXAMPLES Load the Epson FX device driver and determine the type of
- printer it is.
-
- C int ptype, ierr;
- ierr = pgLoadDevInfo( "EPFX" );
- ptype = pgGetDevType();
-
- Pascal var
- ptype, ierr : integer;
- ierr := pgLoadDevInfo%( 'EPFX' );
- ptype := pgGetDevType;
-
- Basic ierr% = pgLoadDevInfo( "EPFX" )
- ptype% = pgGetDevType%
-
- Fortran integer*2 ptype, ierr
- ierr = pgLoadDevInfo( 'EPFX'//char(0) )
- ptype = pgGetDevType
-
- Clipper ierr = pgLDINFO( "EPFX" )
- ptype = pgGDTYPE()
-
-
- *******************
- ** pgGetDevWidth **
- *******************
-
-
- DESCRIPTION The pgGetDevWidth function returns the paper width for the
- currently loaded device driver. You must first load a device
- driver with the pgLoadDevInfo function.
-
-
- SYNTAX C int pgGetDevWidth( void );
-
- Pascal FUNCTION pgGetDevWidth : integer;
-
- Basic FUNCTION pgGetDevWidth%
-
- Fortran INTEGER*2 FUNCTION pgGetDevWidth
-
- Clipper FUNCTION pgGDWIDTH()
-
-
- PARAMETERS None.
-
-
- RETURN The paper width in units of 100=1"
- (e.g., 850=8.5", 1100=11.0" ).
-
-
- SEE ALSO pgGetDevHeight, pgLoadDevInfo
-
-
- EXAMPLES Load the 'HPLJET' device driver and get the width and height of
- the paper.
-
- C int width, height, ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- width = pgGetDevWidth();
- height = pgGetDevHeight();
-
- Pascal var
- width, height, ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- width := pgGetDevWidth;
- height := pgGetDevHeight;
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- width% = pgGetDevWidth%
- height% = pgGetDevHeight%
-
- Fortran integer*2 width, height, ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- width = pgGetDevWidth
- height = pgGetDevHeight
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- width = pgGDWIDTH()
- height = pgGDHEIGHT()
-
-
- *******************
- ** pgGetFillMode **
- *******************
-
-
- DESCRIPTION The pgGetFillMode function returns the current fill mode as
- either 0 (transparent) or 1 (opaque).
-
-
- SYNTAX C int pgGetFillMode( void );
-
- Pascal FUNCTION pgGetFillMode : integer;
-
- Basic FUNCTION pgGetFillMode%
-
- Fortran INTEGER*2 FUNCTION pgGetFillMode
-
- Clipper FUNCTION pgGFMODE()
-
-
- PARAMETERS None.
-
-
- RETURN The current fill mode flag
-
- Predefined fill mode flags may be specified using one of the
- following manifest constants:
-
- Constant Value Description
-
- pgTRANS 0 Transparent fill (does not
- clear the fill region before
- filling).
- pgOPAQ 1 Opaque fill (clears the fill
- region before filling).
-
-
- SEE ALSO pgGetFillPattern, pgGetFillStyle, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Get the current fill mode, set the fill mode to be transparent
- and draw two overlapping circles using different fill patterns,
- then restore the fill mode.
-
- C int mode;
- mode = pgGetFillMode();
- pgSetFillMode( pgTRANS );
- pgSetFillStyle( pgFLTSLASH, 2 );
- pgCircle( 400, 400, 300, pgOFILL );
- pgSetFillStyle( pgFLTBKSLASH, 2 );
- pgCircle( 600, 400, 300, pgOFILL );
- pgSetFillMode( mode );
-
- Pascal var
- mode : integer;
- mode := pgGetFillMode;
- pgSetFillMode( pgTRANS );
- pgSetFillStyle( pgFLTSLASH, 2 );
- pgCircle( 400, 400, 300, pgOFILL );
- pgSetFillStyle( pgFLTBKSLASH, 2 );
- pgCircle( 600, 400, 300, pgOFILL );
- pgSetFillMode( mode );
-
- Basic mode% = pgGetFillMode%
- call pgSetFillMode( pgTRANS )
- call pgSetFillStyle( pgFLTSLASH, 2 )
- call pgCircle( 400, 400, 300, pgOFILL )
- call pgSetFillStyle( pgFLTBKSLASH, 2 )
- call pgCircle( 600, 400, 300, pgOFILL )
- call pgSetFillMode( mode% )
-
- Fortran integer*2 mode
- mode = pgGetFillMode
- call pgSetFillMode( pgTRANS )
- call pgSetFillStyle( pgFLTSLASH, 2 )
- call pgCircle( 400, 400, 300, pgOFILL )
- call pgSetFillStyle( pgFLTBKSLASH, 2 )
- call pgCircle( 600, 400, 300, pgOFILL )
- call pgSetFillMode( mode )
-
- Clipper mode = pgGFMODE()
- pgSFMODE( pgTRANS )
- pgSFSTYLE( pgFLTSLASH, 2 )
- pgCIR( 400, 400, 300, pgOFILL )
- pgSFSTYLE( pgFLTBKSLASH, 2 )
- pgCIR( 600, 400, 300, pgOFILL )
- pgSFMODE( mode )
-
-
- **********************
- ** pgGetFillPattern **
- **********************
-
-
- DESCRIPTION The pgGetFillPattern function returns the current fill color
- and the 8x8 array of bits that define the current fill pattern
- set with the pgSetFillPattern function.
-
- The fill pattern is an 8x8 array of bits. Each bit represents
- a pixel. A 1 bit sets the corresponding pixel to the current
- fill color. In pgTRANS mode a 0 bit leaves the pixel unchanged
- while in pgOPAQ mode, a 0 bit sets the pixel to the color of
- the paper.
-
- The pgGetFillPattern function always returns the current fill
- pattern regardless of whether pgSetFillStyle or pgSetFillPattern
- was called last.
-
-
- SYNTAX C void pgGetFillPattern( char far *fpat,
- int far *color );
-
- Pascal PROCEDURE pgGetFillPattern( var fpat;
- var color:integer );
-
- Basic SUB pgGetFillPattern( SEG fpat%, SEG color% )
-
- Fortran SUBROUTINE pgGetFillPattern( fpat, color )
- CHARACTER*1 fpat(8)
- INTEGER*2 color
-
- Clipper PROCEDURE pgGFPAT( <ref>fpat, <ref>color )
-
-
- PARAMETERS fpat Current fill pattern array.
- color Current fill color.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetFillMode, pgGetFillStyle, pgSetFillMode, pgSetFillPattern,
- pgSetFillStyle
-
-
- EXAMPLES Get the current fill pattern.
-
- C char pat[8];
- int color;
- pgGetFillPattern( &pat, &color );
-
- Pascal var
- pat : array [0..7] of byte;
- color : integer;
- pgGetFillPattern( pat, color );
-
- Basic DIM pat%(3), color%
- call pgGetFillPattern( pat%(0), color% )
-
- Fortran character*1 pat(8)
- integer*2 color
- call pgGetFillPattern( pat, color )
-
- Clipper public pat, color
- pat = space(8)
- pgGFPAT( @pat, @color )
-
-
- ********************
- ** pgGetFillStyle **
- ********************
-
-
- DESCRIPTION The pgGetFillStyle function returns the current fill style
- number and fill color set with the pgSetFillStyle function.
- The default fill style is pgFSOLID. The default fill color is
- color index 1.
-
- The returned color will always be the current fill color,
- however, you should be aware that the returned style may not
- agree with the current fill pattern. This will occur if you
- called pgSetFillPattern after calling pgSetFillStyle. You
- should use the pgGetFillPattern to return the current fill
- pattern.
-
-
- SYNTAX C void pgGetFillStyle( int far *style, int far *color );
-
- Pascal PROCEDURE pgGetFillStyle( var style, color:integer );
-
- Basic SUB pgGetFillStyle( SEG style%, SEG color% )
-
- Fortran SUBROUTINE pgGetFillStyle( style, color )
- INTEGER*2 style, color
-
- Clipper PROCEDURE pgGFSTYLE( <ref>style, <ref>color )
-
-
- PARAMETERS style Current fill style number.
- color Current fill color.
-
- Predefined fill patterns are one of the following values:
-
- Constant ValueDescription
-
- pgFEMPTY 0 Fill with background color
- pgFSOLID 1 Solid fill with current fill color
- pgFLINE 2 Fill with line (---)
- pgFLTSLASH 3 Fill with /// normal width lines
- pgFSLASH 4 Fill with /// thick lines
- pgFBKSLASH 5 Fill with \\\ thick lines
- pgFLTBKSLASH 6 Fill with \\\ normal width lines
- pgFHATCH 7 Light hatch fill
- pgFXHATCH 8 Heavy cross hatch fill
- pgFINTERLEAVE 9 Interleaving line fill
- pgFWIDEDOT 10 Fill with widely spaced dots
- pgFCLOSEDOT 11 Fill with closely spaced dots
-
-
- RETURN None.
-
-
- SEE ALSO pgGetFillMode, pgGetFillPattern, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Get the current fill style and color, set a different fill
- style and color and draw a circle, then restore the original
- fill style and color.
-
- C int fstyle, fcolor;
- pgGetFillStyle( &fstyle, &fcolor );
- pgSetFillStyle( pgFINTERLEAVE, 1 );
- pgCircle( 500, 500, 200, pgFILL );
- pgSetFillStyle( fstyle, fcolor );
-
- Pascal var
- fstyle, fcolor : integer;
- pgGetFillStyle( fstyle, fcolor );
- pgSetFillStyle( pgFINTERLEAVE, 1 );
- pgCircle( 500, 500, 200, pgFILL );
- pgSetFillStyle( fstyle, fcolor );
-
- Basic call pgGetFillStyle( fstyle%, fcolor% )
- call pgSetFillStyle( pgFINTERLEAVE, 1 )
- call pgCircle( 500, 500, 200, pgFILL )
- call pgSetFillStyle( fstyle%, fcolor% )
-
- Fortran integer*2 fstyle, fcolor
- call pgGetFillStyle( fstyle, fcolor )
- call pgSetFillStyle( pgFINTERLEAVE, 1 )
- call pgCircle( 500, 500, 200, pgFILL )
- call pgSetFillStyle( fstyle, fcolor )
-
- Clipper pgGFSTYLE( @fstyle, @fcolor )
- pgSFSTYLE( pgFINTERLEAVE, 1 )
- pgCIR( 500, 500, 200, pgFILL )
- pgSFSTYLE( fstyle, fcolor )
-
-
- **********************
- ** pgGetLinePattern **
- **********************
-
-
- DESCRIPTION The pgGetLinePattern function returns the current mask and
- thickness used for line drawing. The mask argument is a 16-bit
- array, where each bit represents a pixel in the line being
- drawn. If a bit is 1, the corresponding pixel is set to the
- color of the line (the current color). If a bit is 0, the
- corresponding pixel is left unchanged. The template is repeated
- for the entire length of the line. The default mask is hex
- FFFF.
-
-
- SYNTAX C void pgGetLinePattern( int far *mask,
- int far *thickness );
-
- Pascal PROCEDURE pgGetLinePattern( var mask,
- thickness:integer );
-
- Basic SUB pgGetLinePattern( SEG mask%, SEG thickness% )
-
- Fortran SUBROUTINE pgGetLinePattern( mask, thickness )
- INTEGER*2 mask, thickness
-
- Clipper PROCEDURE pgGLPAT( <ref>mask, <ref>thickness )
-
-
- PARAMETERS mask Line style mask.
- thickness Pixel width for line thickness.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetLineWeight, pgSetLinePattern, pgSetLineWeight
-
-
- EXAMPLES Get the current line pattern and thickness.
-
- C int lpat, thickness;
- pgGetLinePattern( &lpat, &thickness );
-
- Pascal var
- lpat, thickness: integer;
- pgGetLinePattern( lpat, thickness );
-
- Basic call pgGetLinePattern( lpat%, thickness% )
-
- Fortran integer*2 lpat, thickness
- call pgGetLinePattern( lpat, thickness )
-
- Clipper public lpat, thickness
- pgGLPAT( @lpat, @thickness )
-
-
- ********************
- ** pgGetLineStyle **
- ********************
-
-
- DESCRIPTION The pgGetLineStyle function returns the current line style
- number and line thickness value previously set with the
- pgSetLineStyle function. The default line style is pgLSOLID.
- The default line thickness is 1.
-
- The returned thickness will always be the current line
- thickness, however, you should be aware that the returned style
- may not agree with the current line pattern. This will occur
- if you called pgSetLinePattern after calling pgSetLineStyle.
- You should use the pgGetLinePattern to return the current line
- pattern.
-
-
- SYNTAX C void pgGetLineStyle( int far *lstyle,
- int far *thickness );
-
- Pascal PROCEDURE pgGetLineStyle( var lstyle,
- thickness:integer );
-
- Basic SUB pgGetLineStyle( SEG lstyle%, SEG thickness% )
-
- Fortran SUBROUTINE pgGetLineStyle( lstyle, thickness )
- INTEGER*2 lstyle, thickness
-
- Clipper PROCEDURE pgGLSTYLE( <ref>lstyle, <ref>thickness )
-
-
- PARAMETERS lstyle Code specifying a predefined line style.
- thickness Thickness of lines in pixels.
-
-
- Predefined line styles may be specified using one of the
- following manifest constants:
-
- Constant ValueDescription
-
- pgLSOLID 0 Solid line.
- pgLHUGEDASH 1 Huge dash line.
- pgLBIGDASH 2 Big dash line.
- pgLMEDDASH 3 Medium dash line.
- pgLSMALLDASH 4 Small dash line.
- pgLWIDEDOT 5 Wide dot line.
- pgLCLOSEDOT 6 Close dot line.
- pgLDASHDOT 7 Dash dot line.
- pgLCENTER 8 Center line.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetLinePattern, pgGetLineWeight, pgSetLinePattern,
- pgSetLineStyle, pgSetLineWeight
-
-
- EXAMPLES Get the current line style and thickness.
-
- C int lstyle, lthickness;
- pgGetLineStyle( &lstyle, <hickness );
-
- Pascal var
- lstyle, lthickness : integer;
- pgGetLineStyle( lstyle, lthickness );
-
- Basic call pgGetLineStyle( lstyle%, lthickness% )
-
- Fortran integer*2 lstyle, lthickness
- call pgGetLineStyle( lstyle, lthickness )
-
- Clipper pgGLSTYLE( @lstyle, @lthickness )
-
-
- *********************
- ** pgGetLineWeight **
- *********************
-
-
- DESCRIPTION The pgGetLineWeight function returns the current weighting
- factor for line drawing. The weighting factor represents the
- number of thousandsths of an inch for the line width. For
- example, 1=0.001", 6=0.006", etc. The actual line width is
- rounded off somewhat due to your printer's resolution.
-
-
- SYNTAX C int pgGetLineWeight( void );
-
- Pascal FUNCTION pgGetLineWeight : integer;
-
- Basic FUNCTION pgGetLineWeight%
-
- Fortran INTEGER*2 FUNCTION pgGetLineWeight
-
- Clipper FUNCTION pgGLWGT()
-
-
- PARAMETERS None.
-
-
- RETURN The current line weight.
-
-
- SEE ALSO pgGetLineStyle, pgGetLinePattern, pgSetLinePattern,
- pgSetLineStyle, pgSetLineWeight
-
-
- EXAMPLES Get the current line weight.
-
- C printf( "LineWeight = %d", pgGetLineWeight() );
-
- Pascal WriteLn( 'LineWeight = ', pgGetLineWeight );
-
- Basic print "LineWeight = ", pgGetLineWeight%
-
- Fortran print *, 'LineWeight = ', pgGetLineWeight
-
- Clipper ? "LineWeight = ", pgGLWGT()
-
-
- ***************
- ** pgGetMaxX **
- ***************
-
-
- DESCRIPTION The pgGetMaxX function returns the maximum x-coordinate of the
- virtual resolution.
-
-
- SYNTAX C int pgGetMaxX( void );
-
- Pascal FUNCTION pgGetMaxX : integer;
-
- Basic FUNCTION pgGetMaxX%
-
- Fortran INTEGER*2 FUNCTION pgGetMaxX
-
- Clipper FUNCTION pgGMAXX()
-
-
- PARAMETERS None.
-
-
- RETURN The maximum x-coordinate of the virtual resolution.
-
-
- SEE ALSO pgGetMaxY, pgInitDrw
-
-
- EXAMPLES Get the maximum x coordinate.
-
- C printf( " max X = %d", pgGetMaxX() );
-
- Pascal Writeln( ' max X = ', pgGetMaxX );
-
- Basic print " max X = ", pgGetMaxX%
-
- Fortran print *, ' max X = ', pgGetMaxX
-
- Clipper ? " max X = ", pgGMAXX()
-
-
- ***************
- ** pgGetMaxY **
- ***************
-
-
- DESCRIPTION The pgGetMaxY function returns the maximum y-coordinate of the
- virtual resolution.
-
-
- SYNTAX C int pgGetMaxY( void );
-
- Pascal FUNCTION pgGetMaxY : integer;
-
- Basic FUNCTION pgGetMaxY%
-
- Fortran INTEGER*2 FUNCTION pgGetMaxY
-
- Clipper FUNCTION pgGMAXY()
-
-
- PARAMETERS None.
-
-
- RETURN The maximum y-coordinate of the virtual resolution.
-
-
- SEE ALSO pgGetMaxX, pgInitDrw
-
-
- EXAMPLES Get the maximum y coordinate.
-
- C printf( " max Y = %d",pgGetMaxY() );
-
- Pascal Writeln( ' max Y = ', pgGetMaxY );
-
- Basic print " max Y = ", pgGetMaxY%
-
- Fortran print *, ' max Y = ', pgGetMaxY
-
- Clipper ? " max Y = ", pgGetMaxY()
-
-
- *****************
- ** pgGetStatus **
- *****************
-
-
- DESCRIPTION The pgGetStatus function returns a non-zero value if a disk or
- file I/O error occurred while writing graphics commands to the
- drawing file. After the function is called, the internal error
- flag is automatically cleared. This command flushes the
- internal PGL output buffer.
-
-
- SYNTAX C int pgGetStatus( void );
-
- Pascal FUNCTION pgGetStatus : integer;
-
- Basic FUNCTION pgGetStatus%
-
- Fortran INTEGER*2 FUNCTION pgGetStatus
-
- Clipper FUNCTION pgSTATUS()
-
-
- PARAMETERS None.
-
-
- RETURN A return value of zero indicates there were no I/O error. A
- non-zero value indicates a file I/O error while writing the PGL
- buffer to disk.
-
-
- SEE ALSO None.
-
-
- EXAMPLES Check the PGL error status.
-
- C int ierr;
- pgSetColor(2);
- ierr = pgGetStatus();
- if( ierr ) printf( "I/O ERROR" );
-
- Pascal var
- ierr : integer;
- pgSetColor(2);
- ierr := pgGetStatus;
- if( ierr <> 0 ) writeln( 'I/O ERROR' );
-
- Basic call pgSetColor(2)
- ierr% = pgGetStatus%
- if ierr% <> 0 print "I/O ERROR"
-
- Fortran integer*2 ierr
- call pgSetColor(2)
- ierr = pgGetStatus
- if( ierr .ne. 0 ) print *, 'I/O ERROR'
-
- Clipper pgSCOLOR(2)
- ierr = pgSTATUS()
- if( ierr <> 0 ) ? "I/O ERROR"
-
-
- **********************
- ** pgGetTextBolding **
- **********************
-
-
- DESCRIPTION The pgGetTextBolding function returns the current text bolding
- parameter. The default level of bolding is 1.
-
-
- SYNTAX C int pgGetTextBolding( void );
-
- Pascal FUNCTION pgGetTextBolding : integer;
-
- Basic FUNCTION pgGetTextBolding%
-
- Fortran INTEGER*2 FUNCTION pgGetTextBolding
-
- Clipper FUNCTION pgGTBOLD()
-
-
- PARAMETERS None.
-
-
- RETURN The current text bolding parameter.
-
-
- SEE ALSO pgSetTextBolding
-
-
- EXAMPLES Set text bolding to five times the current value, then display
- the text "Bold Text".
-
- C pgSetTextStyle( pgTRIPLEX );
- pgSetTextBolding( 5 * pgGetTextBolding() );
- pgDrawTextXY( 100, 100, "Bold Text" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgSetTextBolding( 5 * pgGetTextBolding );
- pgDrawTextXY( 100, 100, 'Bold Text' );
-
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextBolding( 5 * pgGetTextBolding% )
- call pgDrawTextXY( 100, 100, "Bold Text" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextBolding( 5 * pgGetTextBolding )
- call pgDrawTextXY( 100, 100, 'Bold Text'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgSTBOLD( 5 * pgGTBOLD() )
- pgDTXY( 100, 100, "Bold Text" )
-
-
- *********************
- ** pgGetTextHeight **
- *********************
-
-
- DESCRIPTION The pgGetTextHeight function returns the maximum height of the
- current font style based on the current text size scale factors.
- The height is returned in pixel units. When printing on
- PostScript printers using PGL2PS, this function can only return
- an approximate length. You may need to adjust your text
- positioning to account for this.
-
-
- SYNTAX C int pgGetTextHeight( void );
-
- Pascal FUNCTION pgGetTextHeight : integer;
-
- Basic FUNCTION pgGetTextHeight%
-
- Fortran INTEGER*2 FUNCTION pgGetTextHeight
-
- Clipper FUNCTION pgGTHGT()
-
-
- PARAMETERS None.
-
-
- RETURN The maximum height of the current font style.
-
-
- SEE ALSO pgGetTextLength, pgSetTextScaling
-
-
- EXAMPLES Draw a rectangle 500 pixels wide by 200 pixels high, then use
- the pgGetTextHeight and pgGetTextLength functions to determine
- the proper scale factors to fit the text string "Hello World"
- inside the rectangle.
-
- C int height, length;
- pgRectangle( 100, 100, 600, 300, pgOUTLINE );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextScaling( 1, 1, 1, 1 );
- length = pgGetTextLength( "Hello World" );
- height = pgGetTextHeight();
- pgSetTextScaling( 500, length, 200, height );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal var
- height, length : integer;
- pgRectangle( 100, 100, 600, 300, pgOUTLINE );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextScaling( 1, 1, 1, 1 );
- length := pgGetTextLength( 'Hello World' );
- height := pgGetTextHeight;
- pgSetTextScaling( 500, length, 200, height );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextScaling( 1, 1, 1, 1 )
- length% = pgGetTextLength%( "Hello World" )
- height% = pgGetTextHeight%
- call pgSetTextScaling( 500, length%, 200, height% )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran integer*2 height, length
- call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextScaling( 1, 1, 1, 1 )
- length = pgGetTextLength( 'Hello World'//char(0) )
- height = pgGetTextHeight
- call pgSetTextScaling( 500, length, 200, height )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgRECT( 100, 100, 600, 300, pgOUTLINE )
- pgSTSTYLE( pgTRIPLEX )
- pgSTSCALE( 1, 1, 1, 1 )
- length = pgGTLEN( "Hello World" )
- height = pgGTHGT()
- pgSTSCALE( 500, length, 200, height )
- pgDTXY( 100, 100, "Hello World" )
-
-
- **********************
- ** pgGetTextJustify **
- **********************
-
-
- DESCRIPTION The pgGetTextJustify function returns the current horizontal
- and vertical justification parameters for displaying text
- strings. Text justification is relative to the current cursor
- position when using pgDrawText and relative to the specified
- text position passed to the pgDrawTextXY function.
-
- The default justification is (pgLEFT, pgBOTTOM).
-
-
- SYNTAX C void pgGetTextJustify( int far *hor, int far *vert );
-
- Pascal PROCEDURE pgGetTextJustify( var hor, vert:integer );
-
- Basic SUB pgGetTextJustify( SEG hor%, SEG vert% )
-
- Fortran SUBROUTINE pgGetTextJustify( hor, vert )
- INTEGER*2 hor, vert
-
- Clipper PROCEDURE pgGTJUST( <ref>hor, <ref>vert )
-
-
- PARAMETERS hor Specifies horizontal justification of text.
- vert Specifies vertical justification of text.
-
-
- Valid text justification manifest constants are as follows:
-
- Constant Value Description
-
- pgLEFT 0 Left justified
- pgRIGHT 2 Right justified
- pgCENTER 1 Center justified
- pgTOP 2 Top justified
- pgBOTTOM 0 Bottom justified
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgSetTextJustify
-
-
- EXAMPLES Determine the current text justification. If horizontal
- justification is not currently set to be center justified, then
- make it so.
-
- C int horiz, vert;
- pgGetTextJustify( &horiz, &vert );
- if( horiz != 1) pgSetTextJustify( pgCENTER, vert );
-
- Pascal var
- horiz, vert : integer;
- pgGetTextJustify( horiz, vert );
- if( horiz <> 1 ) pgSetTextJustify( pgCENTER, vert );
-
- Basic call pgGetTextJustify( horiz%, vert% )
- if horiz% <> 1 pgSetTextJustify( pgCENTER, vert% )
-
- Fortran integer*2 horiz, vert
- call pgGetTextJustify( horiz, vert )
- if( horiz.ne.1 ) call pgSetTextJustify(pgCENTER,vert)
-
- Clipper pgGTJUST( @horiz, @vert )
- if horiz <> 1 pgSTJUST( pgCENTER, vert )
-
-
- *********************
- ** pgGetTextLength **
- *********************
-
-
- DESCRIPTION The pgGetTextLength function returns the length of the specified
- text string in pixel units based on the current font style,
- current text size scale factors, and character spacing. When
- printing on PostScript printers using PGL2PS, this function can
- only return an approximate length. You may need to adjust your
- text positioning to account for this.
-
-
- SYNTAX C int pgGetTextLength( char far *str );
-
- Pascal FUNCTION pgGetTextLength( str:string ) : integer;
-
- Basic FUNCTION pgGetTextLength%( SEG str$ )
-
- Fortran INTEGER*2 FUNCTION pgGetTextLength( str )
- CHARACTER*(*) str
-
- Clipper FUNCTION pgGTLEN( <expC>str )
-
-
- PARAMETERS str Text string whose length is desired.
-
-
- RETURN The length of the specified text string.
-
-
- SEE ALSO pgGetTextHeight, pgSetCharSpacing, pgSetTextScaling
-
-
- EXAMPLES Draw a rectangle 500 pixels wide by 200 pixels high, then use
- the pgGetTextHeight and pgGetTextLength functions to determine
- the proper scale factors to fit the text string "Hello World"
- inside the rectangle.
-
- C int height, length;
- pgRectangle( 100, 100, 600, 300, pgOUTLINE );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextScaling( 1, 1, 1, 1 );
- length = pgGetTextLength( "Hello World" );
- height = pgGetTextHeight();
- pgSetTextScaling( 500, length, 200, height );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal var
- height, length : integer;
- pgRectangle( 100, 100, 600, 300, pgOUTLINE );
- pgSetTextStyle( pgTRIPLEX );
- pgSetTextScaling( 1, 1, 1, 1 );
- length := pgGetTextLength( 'Hello World' );
- height := pgGetTextHeight;
- pgSetTextScaling( 500, length, 200, height );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextScaling( 1, 1, 1, 1 )
- length% = pgGetTextLength%( "Hello World" )
- height% = pgGetTextHeight%
- call pgSetTextScaling( 500, length%, 200, height% )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran integer*2 height, length
- call pgRectangle( 100, 100, 600, 300, pgOUTLINE )
- call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextScaling( 1, 1, 1, 1 )
- length = pgGetTextLength( 'Hello World'//char(0) )
- height = pgGetTextHeight
- call pgSetTextScaling( 500, length, 200, height )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgRECT( 100, 100, 600, 300, pgOUTLINE )
- pgSTSTYLE( pgTRIPLEX )
- pgSTSCALE( 1, 1, 1, 1 )
- length = pgGTLEN( "Hello World" )
- height = pgGTHGT()
- pgSTSCALE( 500, length, 200, height )
- pgDTXY( 100, 100, "Hello World" )
-
-
- *********************
- ** pgGetTextOrient **
- *********************
-
-
- DESCRIPTION The pgGetTextOrient function returns the current orientation
- vector indicating the direction of text display. The default
- orientation is (1,0).
-
-
- SYNTAX C void pgGetTextOrient( int far *x, int far *y );
-
- Pascal PROCEDURE pgGetTextOrient( var x, y:integer );
-
- Basic SUB pgGetTextOrient( SEG x%, SEG y% )
-
- Fortran SUBROUTINE pgGetTextOrient( x, y )
- INTEGER*2 x, y
-
- Clipper PROCEDURE pgGTORIEN( <ref>x, <ref>y )
-
-
- PARAMETERS x,y Vector specifying the text orientation.
-
-
- Currently, only four text orientations are allowed. These are
- summarized as follows:
-
- (x, y) Description
-
- ( 1, 0) Text displayed horizontally from left to right
- ( 0, 1) Text displayed vertically from bottom to top
- (-1, 0) Text displayed horizontally from right to left
- (inverted)
- ( 0,-1) Text displayed vertically from top to bottom
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgSetTextOrient
-
-
- EXAMPLES Get the current text orientation and print it to the screen.
-
- C int xdir, ydir;
- pgGetTextOrient( &xdir, &ydir );
- printf( "x orientation = %d\n", xdir );
- printf( "y orientation = %d\n", ydir );
-
- Pascal var
- xdir, ydir : integer;
- pgGetTextOrient( xdir, ydir );
- writeln( 'x orientation = ', xdir );
- writeln( 'y orientation = ', ydir );
-
- Basic call pgGetTextOrient( xdir%, ydir% );
- print "x orientation = ", xdir%
- print "y orientation = ", ydir%
-
- Fortran integer*2 xdir, ydir
- call pgGetTextOrient( xdir, ydir )
- print *, 'x orientation = ', xdir
- print *, 'y orientation = ', ydir
-
- Clipper pgGTORIEN( @xdir, @ydir )
- ? "x orientation = ", xdir
- ? "y orientation = ", ydir
-
-
- **********************
- ** pgGetTextScaling **
- **********************
-
-
- DESCRIPTION The pgGetTextScaling function returns the current horizontal
- and vertical scale factors used for displaying text strings.
-
- The horizontal scale factor is computed as (mx/dx) and is always
- applied to the direction in which text is drawn, regardless of
- whether it is displayed horizontally or vertically. The
- vertical scale factor is computed as (my/dy) and is always
- applied to the direction perpendicular to the direction in
- which the text is drawn.
-
- The default scale factors are 1:1 for both directions.
-
-
- SYNTAX C void pgGetTextScaling( int far *mx, int far *dx,
- int far *my, int far *dy );
-
- Pascal PROCEDURE pgGetTextScaling( var mx, dx,
- my, dy:integer );
-
- Basic SUB pgGetTextScaling( SEG mx%, SEG dx%,
- SEG my%, SEG dy% )
-
- Fortran SUBROUTINE pgGetTextScaling( mx, dx, my, dy )
- INTEGER*2 mx, dx, my, dy
-
- Clipper PROCEDURE pgGTSCALE( <ref>mx, <ref>dx,
- <ref>my, <ref>dy )
-
-
- PARAMETERS mx,dx Horizontal scale factor.
- my,dy Vertical scale factor.
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
- pgSetTextScaling
-
-
- EXAMPLES Set the vertical text scale factor to be twice the current
- horizontal scale factor, then display the text string "Hello
- World".
-
- C int mx, dx, my, dy;
- pgGetTextScaling( &mx, &dx, &my, &dy );
- pgSetTextScaling( mx, dx, 2*my, dy );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal var
- mx, dx, my, dy : integer;
- pgGetTextScaling( mx, dx, my, dy );
- pgSetTextScaling( mx, dx, 2*my, dy );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgGetTextScaling( mx%, dx%, my%, dy% )
- call pgSetTextScaling( mx%, dx%, 2*my%, dy% )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran integer*2 mx, dx, my, dy
- call pgGetTextScaling( mx, dx, my, dy )
- call pgSetTextScaling( mx, dx, 2*my, dy )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgGTSCALE( @mx, @dx, @my, @dy )
- pgSTSCALE( mx, dx, 2*my, dy )
- pgDTXY( 100, 100, "Hello World" )
-
-
- ********************
- ** pgGetTextStyle **
- ********************
-
-
- DESCRIPTION The pgGetTextStyle function returns the current font set being
- used for displaying text.
-
-
- SYNTAX C int pgGetTextStyle( void );
-
- Pascal FUNCTION pgGetTextStyle : integer;
-
- Basic FUNCTION pgGetTextStyle%
-
- Fortran INTEGER*2 FUNCTION pgGetTextStyle
-
- Clipper FUNCTION pgGTSTYLE()
-
-
- PARAMETERS None.
-
-
- RETURN Current font style.
-
- There are currently seven font sets which may be selected. The
- font is selected by specifying one of the manifest constants
- (or its value) listed below:
-
- Constant Value Description File Name
-
- pgSMALL 0 Small SMALL.FNT
- pgSIMPLEX 1 Simplex SIMPLEX.FNT
- pgDUPLEX 2 Duplex DUPLEX.FNT
- pgTRIPLEX 3 Triplex TRIPLEX.FNT
- pgGOTHIC 4 Gothic GOTHIC.FNT
- pgSCRIPT 5 Script SCRIPT.FNT
- pgSDUPLEX 6 Script Duplex SDUP.FNT
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
- pgSetTextStyle
-
-
- EXAMPLES Determine the current text style. If it is not style 3, then
- set it to TRIPLEX font.
-
- C int tstyle;
- tstyle = pgGetTextStyle();
- if( tstyle != pgTRIPLEX ) pgSetTextStyle( pgTRIPLEX );
-
- Pascal var
- tstyle : integer;
- tstyle := pgGetTextStyle;
- if( tstyle <> pgTRIPLEX ) pgSetTextStyle( pgTRIPLEX );
-
- Basic tstyle% = pgGetTextStyle%
- if tstyle% <> pgTRIPLEX call pgSetTextStyle(pgTRIPLEX)
-
- Fortran integer*2 tstyle
- tstyle = pgGetTextStyle
- if( tstyle .ne. pgTRIPLEX ) pgSetTextStyle(pgTRIPLEX)
-
- Clipper tstyle = pgGTSTYLE()
- if tstyle <> pgTRIPLEX pgSTSTYLE( pgTRIPLEX )
-
-
- *******************
- ** pgGetViewPort **
- *******************
-
-
- DESCRIPTION The pgGetViewPort function returns the rectangular region on
- the page specified for displaying graphics by a previous call
- to pgSetViewPort. The viewport coordinate origin is defined to
- be the upper-left hand corner of the viewport. The coordinates
- are returned in terms of absolute virtual coordinates.
-
-
- SYNTAX C void pgGetViewPort( int far *x1, int far *y1,
- int far *x2, int far *y2 );
-
- Pascal PROCEDURE pgGetViewPort( var x1, y1,
- x2, y2:integer );
-
- Basic SUB pgGetViewPort( SEG x1%, SEG y1%,
- SEG x2%, SEG y2% )
-
- Fortran SUBROUTINE pgGetViewPort( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
-
- Clipper PROCEDURE pgGVIEWP( <ref>x1, <ref>y1,
- <ref>x2, <ref>y2 )
-
-
- PARAMETERS x1,y1 Upper-left corner of viewport.
- x2,y2 Lower-right corner of viewport.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetClipArea, pgSetClipArea, pgSetClipping, pgSetViewPort
-
-
- EXAMPLES Use the pgGetViewPort and pgSetViewPort functions to fill the
- current viewport with a pattern, erase a rectangular portion of
- the fill region leaving a border 20 pixels wide by setting a
- new viewport and clearing it with the pgClearViewPort function,
- then restore the viewport to the original size.
-
- C int x1, y1, x2, y2;
- pgGetViewPort( &x1, &y1, &x2, &y2 );
- pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
- pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
- pgClearViewPort();
- pgSetViewPort( x1, y1, x2, y2 );
-
- Pascal var
- x1, y1, x2, y2 : integer;
- pgGetViewPort( x1, y1, x2, y2 );
- pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
- pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
- pgClearViewPort;
- pgSetViewPort( x1, y1, x2, y2 );
-
- Basic call pgGetViewPort( x1%, y1%, x2%, y2% )
- call pgRectangle( 0, 0, x2%-x1%, y2%-y1%, pgOFILL )
- call pgSetViewPort( x1%+20, y1%+20, x2%-20, y2%-20 )
- call pgClearViewPort
- call pgSetViewPort( x1%, y1%, x2%, y2% )
-
- Fortran integer*2 x1, y1, x2, y2
- call pgGetViewPort( x1, y1, x2, y2 )
- call pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL )
- call pgSetViewPort( x1+20, y1+20, x2-20, y2-20 )
- call pgClearViewPort
- call pgSetViewPort( x1, y1, x2, y2 )
-
- Clipper pgGVIEWP( @x1, @y1, @x2, @y2 )
- pgRECT( 0, 0, x2-x1, y2-y1, pgOFILL )
- pgSVIEWP( x1+20, y1+20, x2-20, y2-20 )
- pgCVIEWP()
- pgSVIEWP( left, top, right, bottom )
-
-
- ************
- ** pgGetX **
- ************
-
-
- DESCRIPTION The pgGetX function returns the current x-cursor position in
- the viewport coordinate system.
-
-
- SYNTAX C int pgGetX( void );
-
- Pascal FUNCTION pgGetX : integer;
-
- Basic FUNCTION pgGetX%
-
- Fortran INTEGER*2 FUNCTION pgGetX
-
- Clipper FUNCTION pgGX()
-
-
- PARAMETERS None.
-
-
- RETURN The x-cursor position in terms of the currently defined
- viewport.
-
-
- SEE ALSO pgGetAbsX, pgGetAbsY, pgGetY, pgSetViewPort
-
-
- EXAMPLES Set a viewport, then move the cursor to an arbitrary location.
- Use the pgGetX and pgGetAbsX functions to return the location
- of the cursor relative to the viewport and relative to the
- absolute coordinates, respectively.
-
- C pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- printf( "Viewport X coordinate = %d\n", pgGetX() );
- printf( "Absolute X coordinate = %d\n", pgGetAbsX() );
-
- Pascal pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- writeln( 'Viewport X coordinate = ', pgGetX );
- writeln( 'Absolute X coordinate = ', pgGetAbsX );
-
- Basic call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print "Viewport X coordinate = ", pgGetX%
- print "Absolute X coordinate = ", pgGetAbsX%
-
- Fortran call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print *, 'Viewport X coordinate = ', pgGetX
- print *, 'Absolute X coordinate = ', pgGetAbsX
-
- Clipper pgSetViewPort( 300, 300, 900, 900 )
- pgMoveTo( 100, 100 )
- ? "Viewport X coordinate = ", pgGX()
- ? "Absolute X coordinate = ", pgGABSX()
-
-
- ************
- ** pgGetY **
- ************
-
-
- DESCRIPTION The pgGetY function returns the current y-cursor position in
- the viewport coordinate system.
-
-
- SYNTAX C int pgGetY( void );
-
- Pascal FUNCTION pgGetY : integer;
-
- Basic FUNCTION pgGetY%
-
- Fortran INTEGER*2 FUNCTION pgGetY
-
- Clipper FUNCTION pgGY()
-
-
- PARAMETERS None.
-
-
- RETURN The y-cursor position in terms of the currently defined
- viewport.
-
-
- SEE ALSO pgGetAbsX, pgGetAbsY, pgGetX, pgSetViewPort
-
-
- EXAMPLES Set a viewport, then move the cursor to an arbitrary location.
- Use the pgGetY and pgGetAbsY functions to return the location
- of the cursor relative to the viewport and relative to the
- absolute coordinates, respectively.
-
- C pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- printf( "Viewport Y coordinate = %d\n", pgGetY() );
- printf( "Absolute Y coordinate = %d\n", pgGetAbsY() );
- Pascal pgSetViewPort( 300, 300, 900, 900 );
- pgMoveTo( 100, 100 );
- writeln( 'Viewport Y coordinate = ', pgGetY );
- writeln( 'Absolute Y coordinate = ', pgGetAbsY );
-
- Basic call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print "Viewport Y coordinate = ", pgGetY%
- print "Absolute Y coordinate = ", pgGetAbsY%
-
- Fortran call pgSetViewPort( 300, 300, 900, 900 )
- call pgMoveTo( 100, 100 )
- print *, 'Viewport Y coordinate = ', pgGetY
- print *, 'Absolute Y coordinate = ', pgGetAbsY
-
- Clipper pgSetViewPort( 300, 300, 900, 900 )
- pgMoveTo( 100, 100 )
- ? "Viewport Y coordinate = ", pgGY()
- ? "Absolute Y coordinate = ", pgGABSY()
-
-
- ***************
- ** pgInitDrw **
- ***************
-
-
- DESCRIPTION The pgInitDrw function opens a new drawing file named fname for
- storing graphics commands and sets the virtual drawing
- resolution to width by height pixels. All PGL drawing
- parameters are initialized to their default values.
-
- If the drawing file was successfully opened, the ierr parameter
- will return a value of zero, otherwise, a failure occurred.
- Possible causes of error might be too many files already opened
- or the file was specified with an invalid path.
-
- PGL does not check if the specified file is an existing file.
- If you use pgInitDrw to open an existing file, its contents will
- be overwritten.
-
-
- SYNTAX C void pgInitDrw( char far *fname, int width,
- int height, int far *ierr );
-
- Pascal PROCEDURE pgInitDrw( fname:string;
- width, height:integer; var ierr:integer )
-
- Basic SUB pgInitDrw(SEG fname$, width%, height%, SEG ierr%)
-
- Fortran SUBROUTINE pgInitDrw( fname, width, height, ierr )
- CHARACTER*(*) fname
- INTEGER*2 width, height, ierr
-
- Clipper PROCEDURE pgINIT( <expC>fname, width, height,
- <ref>ierr )
-
-
- PARAMETERS fname User specified name of a drawing file for storing
- graphics commands.
- width Pixel width of the virtual resolution for drawing.
- height Pixel height of the virtual resolution for drawing.
- ierr Returns a non-zero value if file fname could not be
- opened. Possible cause of error might be too many
- files already opened or an invalid path specification.
-
-
- RETURN None.
-
-
- SEE ALSO pgEndDrw, pgOpenDrw
-
-
- EXAMPLES Open a new drawing file named TEST.PLT with a virtual
- resolution of 2000 x 2000, draw a circle, then close the drawing
- file.
-
- C int ierr;
- pgInitDrw( "TEST.PLT", 2000, 2000, &ierr );
- pgCircle( 1000, 1000, 500, pgFILL );
- pgEndDrw();
-
- Pascal var
- ierr : integer;
- pgInitDrw( 'TEST.PLT', 2000, 2000, ierr );
- pgCircle( 1000, 1000, 500, pgFILL );
- pgEndDrw;
-
- Basic call pgInitDrw( "TEST.PLT", 2000, 2000, ierr% )
- call pgCircle( 1000, 1000, 500, pgFILL )
- call pgEndDrw
-
- Fortran integer*2 ierr
- call pgInitDrw('TEST.PLT'//char(0), 2000, 2000, ierr)
- call pgCircle( 1000, 1000, 500, pgFILL )
- call pgEndDrw
-
- Clipper pgINIT( "TEST.PLT", 2000, 2000, @ierr )
- pgCIR( 1000, 1000, 500, pgFILL )
- pgEND()
-
-
- ************
- ** pgLine **
- ************
-
-
- DESCRIPTION The pgLine function draws a line between two specified points
- using the current drawing color and line style. The cursor
- position is not updated after drawing.
-
-
- SYNTAX C void pgLine( int x1, int y1, int x2, int y2 );
-
- Pascal PROCEDURE pgLine( x1, y1, x2, y2:integer );
-
- Basic SUB pgLine( x1%, y1%, x2%, y2% )
-
- Fortran SUBROUTINE pgLine( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
-
- Clipper PROCEDURE pgLIN( x1, y1, x2, y2 )
-
-
- PARAMETERS x1,y1 Coordinate of point the line is drawn from.
- x2,y2 Coordinate of point the line is drawn to.
-
-
- RETURN None.
-
-
- SEE ALSO pgLineRel, pgLineTo, pgMoveRel, pgMoveTo
-
-
- EXAMPLES Draw a solid line of thickness 1 and a dashed line of thickness
- 7.
-
- C pgSetLineStyle( pgLSOLID, 1 );
- pgLine( 100, 100, 900, 100 );
- pgSetLineStyle( pgLBIGDASH, 7 );
- pgLine( 100, 200, 900, 200 );
- Pascal pgSetLineStyle( pgLSOLID, 1 );
- pgLine( 100, 100, 900, 100 );
- pgSetLineStyle( pgLBIGDASH, 7 );
- pgLine( 100, 200, 900, 200 );
-
- Basic call pgSetLineStyle( pgLSOLID, 1 )
- call pgLine( 100, 100, 900, 100 )
- call pgSetLineStyle( pgLBIGDASH, 7 )
- call pgLine( 100, 200, 900, 200 )
-
- Fortran call pgSetLineStyle( pgLSOLID, 1 )
- call pgLine( 100, 100, 900, 100 )
- call pgSetLineStyle( pgLBIGDASH, 7 )
- call pgLine( 100, 200, 900, 200 )
-
- Clipper pgSLSTYLE( pgLSOLID, 1 )
- pgLIN( 100, 100, 900, 100 )
- pgSLSTYLE( pgLBIGDASH, 7 )
- pgLIN( 100, 200, 900, 200 )
-
-
- ***************
- ** pgLineRel **
- ***************
-
-
- DESCRIPTION The pgLineRel function draws a line from the current (x,y)
- cursor position to a new position specified by an offset amount.
- The line is drawn using the current drawing color and line
- style. The cursor position is updated to (x+dx, y+dy) after
- drawing.
-
-
- SYNTAX C void pgLineRel( int dx, int dy );
-
- Pascal PROCEDURE pgLineRel( dx, dy:integer );
-
- Basic SUB pgLineRel( dx%, dy% )
-
- Fortran SUBROUTINE pgLineRel( dx, dy )
- INTEGER*2 dx, dy
-
- Clipper PROCEDURE pgLINREL( dx, dy )
-
-
- PARAMETERS dx,dy Amount of offset to add to the current position. The
- coordinate to draw to is given by (x+dx, y+dy).
-
-
- RETURN None.
-
-
- SEE ALSO pgLine, pgLineTo, pgMoveRel, pgMoveTo
-
-
- EXAMPLES Move to coordinate (500,500) and draw a rectangle using relative
- line draws.
-
- C pgMoveTo( 500, 500 );
- pgLineRel( 300, 0 );
- pgLineRel( 0, 100 );
- pgLineRel( -300, 0 );
- pgLineRel( 0, -100 );
-
- Pascal pgMoveTo( 500, 500 );
- pgLineRel( 300, 0 );
- pgLineRel( 0, 100 );
- pgLineRel( -300, 0 );
- pgLineRel( 0, -100 );
-
- Basic call pgMoveTo( 500, 500 )
- call pgLineRel( 300, 0 )
- call pgLineRel( 0, 100 )
- call pgLineRel( -300, 0 )
- call pgLineRel( 0, -100 )
-
- Fortran call pgMoveTo( 500, 500 )
- call pgLineRel( 300, 0 )
- call pgLineRel( 0, 100 )
- call pgLineRel( -300, 0 )
- call pgLineRel( 0, -100 )
-
- Clipper pgMOVTO( 500, 500 )
- pgLINREL( 300, 0 )
- pgLINREL( 0, 100 )
- pgLINREL( -300, 0 )
- pgLINREL( 0, -100 )
-
-
- **************
- ** pgLineTo **
- **************
-
-
- DESCRIPTION The pgLineTo function draws a line from the current cursor
- position to a new position specified by the coordinate (x,y).
- The line is drawn using the current drawing color and line
- style. The cursor position is updated after drawing.
-
-
- SYNTAX C void pgLineTo( int x, int y );
-
- Pascal PROCEDURE pgLineTo( x, y:integer );
-
- Basic SUB pgLineTo( x%, y% )
-
- Fortran SUBROUTINE pgLineTo( x, y )
- INTEGER*2 x, y
-
- Clipper PROCEDURE pgLINTO( x, y )
-
-
- PARAMETERS x,y Coordinate of point to draw to.
-
-
- RETURNS None.
-
-
- SEE ALSO pgLine, pgLineRel, pgMoveRel, pgMoveTo
-
-
- EXAMPLES Move to coordinate (0,0) and draw a line to the coordinate
- (400,500).
-
- C pgMoveTo( 0, 0 );
- pgLineTo( 400, 500 );
-
- Pascal pgMoveTo( 0, 0 );
- pgLineTo( 400, 500 );
-
- Basic call pgMoveTo( 0, 0 )
- call pgLineTo( 400, 500 )
-
- Fortran call pgMoveTo( 0, 0 )
- call pgLineTo( 400, 500 )
-
- Clipper pgMOVTO( 0, 0 )
- pgLINTO( 400, 500 )
-
-
- *******************
- ** pgLoadDevInfo **
- *******************
-
-
- DESCRIPTION Depending on your application, you may need to know certain
- information about the device you will be printing to. The
- pgLoadDevInfo function loads the information about the
- specified device driver pertaining to the number of colors, bit
- planes, device type, paper dimensions, number of resolutions,
- etc. The specified driver is not actually installed.
-
- Once the information about a particular device is loaded, you
- may change the page margins, size, and layout. You may use the
- various device information functions to return information
- about the device for a particular print configuration.
-
-
- SYNTAX C int pgLoadDevInfo( char far *dev );
-
- Pascal FUNCTION pgLoadDevInfo( dev:string ) : integer;
-
- Basic FUNCTION pgLoadDevInfo%( SEG dev$ )
-
- Fortran INTEGER*2 FUNCTION pgLoadDevInfo( dev )
- CHARACTER*(*) dev
-
- Clipper FUNCTION pgLDINFO( <expC>dev )
-
-
- PARAMETERS dev Name of the device driver (include path if driver is
- not located in the local directory). Refer to chapter
- 8 for a list of valid device driver names.
-
-
- RETURN A non-zero value will be returned if an error occurred in
- loading the device driver information. Possible causes of
- error might be an incorrect device driver name, incorrect path,
- or too many files already opened.
-
-
- SEE ALSO pgGetDevColors, pgGetDevHeight, pgGetDevMaxX, pgGetDevMaxY,
- pgGetDevModes, pgGetDevOffsetX, pgGetDevOffsetY, pgGetDevPlanes,
- pgGetDevResX, pgGetDevResY, pgGetDevType, pgGetDevWidth,
- pgGetDevInfo, pgSetPageForm, pgSetPageMargins, pgSetPageSize
-
-
- EXAMPLES Load the 'HPLJET' device driver.
-
- C int ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- if( ierr != 0 ) printf( "LOAD FAILURE" );
-
- Pascal var
- ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- if( ierr <> 0 ) writeln( 'LOAD ERROR' );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- if ierr% <> 0 print "LOAD ERROR"
-
- Fortran integer*2 ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- if( ierr .ne. 0 ) print *, 'LOAD ERROR'
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- if ierr <> 0 ? "LOAD ERROR"
-
-
- ***************
- ** pgMoveRel **
- ***************
-
-
- DESCRIPTION The pgMoveRel function moves the cursor from the current (x,y)
- cursor position to a new position specified by an offset amount.
- The cursor position is updated to (x+dx,y+dy).
-
-
- SYNTAX C void pgMoveRel( int dx, int dy );
-
- Pascal PROCEDURE pgMoveRel( dx, dy:integer );
-
- Basic SUB pgMoveRel( dx%, dy% )
-
- Fortran SUBROUTINE pgMoveRel( dx, dy )
- INTEGER*2 dx, dy
-
- Clipper PROCEDURE pgMOVREL( dx, dy )
-
-
- PARAMETERS dx,dy Amount of offset to add to the current position. The
- coordinate to move to is given by (x+dx, y+dy).
-
-
- RETURN None.
-
-
- SEE ALSO pgLine, pgLineRel, pgLineTo, pgMoveTo
-
-
- EXAMPLES Move the cursor 100 pixels to the right and 50 pixels down from
- the current position, then draw a horizontal line.
-
- C pgMoveRel( 100, 50 );
- pgLineRel( 400, 0 );
-
- Pascal pgMoveRel( 100, 50 );
- pgLineRel( 400, 0 );
-
- Basic call pgMoveRel( 100, 50 )
- call pgLineRel( 400, 0 )
-
- Fortran call pgMoveRel( 100, 50 )
- call pgLineRel( 400, 0 )
-
- Clipper pgMOVREL( 100, 50 )
- pgLINREL( 400, 0 )
-
-
- **************
- ** pgMoveTo **
- **************
-
-
- DESCRIPTION The pgMoveTo function moves the cursor from the current cursor
- position to the new position specified by the coordinate (x,y).
-
-
- SYNTAX C void pgMoveTo( int x, int y );
-
- Pascal PROCEDURE pgMoveTo( x, y:integer );
-
- Basic SUB pgMoveTo( x%, y% )
-
- Fortran SUBROUTINE pgMoveTo( x, y )
- INTEGER*2 x, y
-
- Clipper PROCEDURE pgMOVTO( x, y )
-
-
- PARAMETERS x,y Coordinate of point to move to.
-
-
- RETURN None.
-
-
- SEE ALSO pgLine, pgLineRel, pgLineTo, pgMoveRel
-
-
- EXAMPLES Draw a horizontal line from coordinate (100,100) to (300,400).
-
- C pgMoveTo( 100, 100 );
- pgLineTo( 300, 400 );
-
- Pascal pgMoveTo( 100, 100 );
- pgLineTo( 300, 400 );
-
- Basic call pgMoveTo( 100, 100 )
- call pgLineTo( 300, 400 )
-
- Fortran call pgMoveTo( 100, 100 )
- call pgLineTo( 300, 400 )
-
- Clipper pgMOVTO( 100, 100 )
- pgLINTO( 300, 400 )
-
-
- ***************
- ** pgNewPage **
- ***************
-
-
- DESCRIPTION The pgNewPage function inserts a formfeed into the current
- drawing file. All subsequent graphic calls will be printed to
- the next page until another pgNewPage function is encountered.
-
- Note that the pgEndDrw command will automatically force a page
- eject, therefore, it is not necessary to call pgNewPage just
- before calling pgEndDrw. Doing so will simply cause an extra
- blank page to be printed.
-
-
- SYNTAX C void pgNewPage( void );
-
- Pascal PROCEDURE pgNewPage;
-
- Basic SUB pgNewPage
-
- Fortran SUBROUTINE pgNewPage
-
- Clipper PROCEDURE pgNEWPG()
-
-
- PARAMETERS None.
-
-
- RETURN None.
-
-
- SEE ALSO pgEndDrw, pgClearViewPort
-
-
- EXAMPLES Draw a circle, eject the page, then write the text string "New
- Page" on the next page.
-
- C pgCircle( 500, 500, 200, pgFILL );
- pgNewPage();
- pgDrawTextXY( 100, 100, "New Page" );
-
- Pascal pgCircle( 500, 500, 200, pgFILL );
- pgNewPage;
- pgDrawTextXY( 100, 100, 'New Page' );
-
- Basic call pgCircle( 500, 500, 200, pgFILL )
- call pgNewPage
- call pgDrawTextXY( 100, 100, "New Page" )
-
- Fortran call pgCircle( 500, 500, 200, pgFILL )
- call pgNewPage
- call pgDrawTextXY( 100, 100, 'New Page'//char(0) )
-
- Clipper pgCIR( 500, 500, 200, pgFILL )
- pgNEWPG()
- pgDTXY( 100, 100, "New Page" )
-
-
- ***************
- ** pgOpenDrw **
- ***************
-
-
- DESCRIPTION The pgOpenDrw function opens an existing PGL drawing file and
- sets the pointer to the end of the file for appending new
- graphics commands. Note that if a previous drawing file was
- opened with either the pgInitDrw or pgOpenDrw command, you must
- first call pgEndDrw before opening another file. Attempting to
- open a second file without closing the first may cause
- unpredictable results.
-
- If the drawing file was successfully opened, the ierr parameter
- will return a value of zero, otherwise, a failure occurred.
- Possible causes of error might be too many files already opened,
- the specified file doesn't exist, or the specified file is not
- a PGL drawing file.
-
- Once the file has been opened, you may call the pgGetDevMaxX,
- and pgGetDevMaxY functions to return the virtual drawing
- resolution originally used to create the drawing file.
-
-
- SYNTAX C void pgOpenDrw( char far *fname, int far *ierr );
-
- Pascal PROCEDURE pgOpenDrw( fname:string;
- var ierr:integer );
-
- Basic SUB pgOpenDrw( SEG fname$, SEG ierr% )
-
- Fortran SUBROUTINE pgOpenDrw( fname, ierr )
- CHARACTER*(*) fname
- INTEGER*2 ierr
-
- Clipper PROCEDURE pgOPEN( <expC>fname, <ref>ierr )
-
-
- PARAMETERS fname Character string name of an existing PGL drawing
- file.
- ierr Returned error code.
-
-
- RETURN None.
-
-
- SEE ALSO pgEndDrw, pgGetDevMaxX, pgGetDevMaxY, pgInitDrw
-
-
- EXAMPLES Open a drawing file and check for an open failure.
-
- C int ierr, maxx, maxy;
- pgOpenDrw( "TEST.PLT", &ierr );
- if( ierr != 0 ) printf( "OPEN FAILURE" );
- maxx = pgGetMaxX();
- maxy = pgGetMaxY();
-
- Pascal var
- ierr, maxx, maxy : integer;
- pgOpenDrw( 'TEST.PLT', ierr );
- if( ierr <> 0 ) writeln( 'OPEN ERROR' );
- maxx := pgGetMaxX;
- maxy := pgGetMaxY;
-
- Basic call pgOpenDrw( "TEST.PLT", ierr% )
- if ierr% <> 0 print "OPEN ERROR"
- maxx% = pgGetMaxX%
- maxy% = pgGetMaxY%
-
- Fortran integer*2 ierr, maxx, maxy
- call pgOpenDrw( 'TEST.PLT'//char(0), ierr )
- if( ierr .ne. 0 ) print *, 'OPEN ERROR'
- maxx = pgGetMaxX
- maxy = pgGetMaxY
-
- Clipper pgOPEN( "TEST.PLT", @ierr )
- if( ierr <> 0 ) ? "OPEN ERROR"
- maxx = pgGetMaxX()
- maxy = pgGetMaxY()
-
-
- ***********
- ** pgPie **
- ***********
-
-
- DESCRIPTION The pgPie function draws circular pie slices of any angular
- extent. The pie is centered at the coordinate (x,y) with a
- radius of rad. The start and termination angles of the pie are
- given by the parameters sa and ea, respectively, specified in
- degree measure. Zero degrees is taken to be the 3 o'clock
- position increasing positively in a counterclockwise direction.
- The pie may be outlined with a solid line using the current
- drawing color, filled using the current fill color and pattern,
- or both outlined and filled.
-
- The center coordinate of the pie, (x,y), is specified in the
- viewport coordinate system. The cursor position is not updated
- after drawing.
-
-
- SYNTAX C void pgPie( int x, int y, int rad, int sa, int ea,
- int fill );
-
- Pascal PROCEDURE pgPie( x, y, rad, sa, ea, fill: integer );
-
- Basic SUB pgPie( x%, y%, rad%, sa%, ea%, fill% )
-
- Fortran SUBROUTINE pgPie( x, y, rad, sa, ea, fill )
- INTEGER*2 x, y, rad, sa, ea, fill
-
- Clipper PROCEDURE pgPI( x, y, rad, sa, ea, fill )
-
-
- PARAMETERS x,y Center point of the pie.
- rad Radius of the pie.
- sa Start angle of the pie.
- ea End angle of the pie.
- fill Fill flag.
-
-
- The fill flag parameter may be one of the following manifest
- constants:
-
- Constant Value Action
-
- pgOUTLINE 1 Draw the outline only using the
- current drawing color.
- pgFILL 2 Fill using the current fill color and
- fill pattern. The border is not
- drawn.
- pgOFILL 3 Draw the outline and fill the
- interior.
-
-
- RETURN None.
-
-
- SEE ALSO pgCircle, pgEllipse, pgSector, pgSetColor, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw an outline of a pie slice of radius 200 centered at
- (500,500) from 30 to 60 degrees.
-
- C pgSetColor( 2 );
- pgPie( 500, 500, 200, 30, 60, pgOUTLINE );
-
- Pascal pgSetColor( 2 );
- pgPie( 500, 500, 200, 30, 60, pgOUTLINE );
-
- Basic call pgSetColor( 2 )
- call pgPie( 500, 500, 200, 30, 60, pgOUTLINE )
-
- Fortran call pgSetColor( 2 )
- call pgPie( 500, 500, 200, 30, 60, pgOUTLINE )
-
- Clipper pgSCOLOR( 2 )
- pgPI( 500, 500, 200, 30, 60, pgOUTLINE )
-
-
- ***************
- ** pgPolygon **
- ***************
-
-
- DESCRIPTION The pgPolygon function draws self-closing polygons. The
- polygon may be outlined with a solid line using the current
- drawing color, filled using the current fill color and pattern,
- or both outlined and filled. The polygon may not be self-
- intersecting.
-
- The coordinates of the polygon vertices are passed in a vector
- list such that the first two values contained in the vector
- represents the (x,y) coordinate of the first vertex, the next
- two values in the vector represents the second vertex and so on.
- The polygon is self-closing, therefore, it is not necessary for
- the first and last vertices to be equal. The coordinates are
- specified relative to the currently defined viewport. The
- cursor position is not updated after drawing.
-
-
- SYNTAX C void pgPolygon( int far *data, int numpoints,
- int fill );
-
- Pascal PROCEDURE pgPolygon( var data; numpoints,
- fill:integer );
-
- Basic SUB pgPolygon( SEG data%, numpoints%, fill% )
-
- Fortran SUBROUTINE pgPolygon( data, numpoints, fill )
- INTEGER*2 data(n), numpoints, fill
-
- Clipper PROCEDURE pgPOLYGN( data, numpoints, fill )
-
-
- PARAMETERS data Pointer to a vector of (x,y) coordinate pairs
- representing the vertices of the polygon.
- numpoints Number of points in the polygon. Each (x,y)
- coordinate pair counts as one point.
- fill Fill flag.
-
- The fill flag parameter may be one of the following manifest
- constants:
-
- Constant Value Action
-
- pgOUTLINE 1 Draw the outline only using the
- current drawing color.
- pgFILL 2 Fill using the current fill color and
- fill pattern. The border is not
- drawn.
- pgOFILL 3 Draw the outline and fill the
- interior.
-
-
- RETURN None.
-
-
- SEE ALSO pgCircle, pgEllipse, pgPolyLine, pgSector, pgSetColor,
- pgSetFillMode, pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw a right triangle and fill it using the polygon function.
-
- C int polydata[6] = { 100,100, 100,600, 500,600 };
- pgSetColor( 2 );
- pgPolygon( polydata, 3, pgFILL );
-
- Pascal const polydata : array[0..5] of integer
- = ( 100,100, 100,600, 500,600 );
- pgPolygon( polydata, 3, pgFILL );
-
- Basic DIM polydata%(5)
- polydata%(0) = 100 : polydata%(1) = 100
- polydata%(2) = 100 : polydata%(3) = 600
- polydata%(4) = 500 : polydata%(5) = 600
- pgPolygon( polydata%(0), 3, pgFILL )
-
- Fortran integer*2 polydata(6)
- data polydata / 100,100, 100,600, 500,600 /
- call pgPolygon( polydata, 3, pgFILL )
-
- Clipper public polydata[6]
- polydata[1] = 100
- polydata[2] = 100
- polydata[3] = 100
- polydata[4] = 600
- polydata[5] = 500
- polydata[6] = 600
- pgPOLYGN( polydata, 3, pgFILL )
-
-
- ****************
- ** pgPolyLine **
- ****************
-
-
- DESCRIPTION The pgPolyLine function draws straight lines between
- consecutive data coordinates specified in a vector list using
- the current color and line style. If the first and last
- vertices are equal, then a closed polygon will be drawn.
-
- The coordinates of the polyline are passed in a vector list
- such that the first two values contained in the vector
- represents the (x,y) coordinate of the first point, the next
- two values in the vector represents the second point and so on.
- The coordinates are specified relative to the currently defined
- viewport. The cursor position is not updated after drawing.
-
-
- SYNTAX C void pgPolyLine( int far *data, int numpoints );
-
- Pascal PROCEDURE pgPolyLine( var data; numpoints:integer );
-
- Basic SUB pgPolyLine( SEG data%, numpoints% )
-
- Fortran SUBROUTINE pgPolyLine( data, numpoints )
- INTEGER*2 data(n), numpoints
-
- Clipper PROCEDURE pgPOLYLN( polydata, numpoints )
-
-
- PARAMETERS data Pointer to a vector of (x,y) coordinates pairs.
- numpoints Number of data points. Each (x,y) coordinate pair
- counts as one point.
-
-
- RETURN None.
-
-
- SEE ALSO pgArc, pgEllArc, pgPolygon, pgSetColor, pgSetLineStyle,
- pgSetLinePattern
-
-
- EXAMPLES Draw a right triangle using the polyline function.
-
- C int polydata[8]={100,100, 100,600, 500,600, 100,100};
- pgPolyLine( polydata, 4 );
-
- Pascal const polydata : array[0..7] of integer
- = ( 100,100, 100,600, 500,600, 100,100 );
- pgPolyLine( polydata, 4 );
-
- Basic DIM polydata%(0 TO 7)
- polydata%(0) = 100 : polydata%(1) = 100
- polydata%(2) = 100 : polydata%(3) = 600
- polydata%(4) = 500 : polydata%(5) = 600
- polydata%(6) = 100 : polydata%(7) = 100
- call pgPolyLine( polydata%(0), 4 )
-
- Fortran integer*2 polydata(8)
- data polydata / 100,100, 100,600, 500,600,100,100 /
- call pgPolyLine( polydata, 4 )
-
- Clipper public polydata[8]
- polydata[1] = 100
- polydata[2] = 100
- polydata[3] = 100
- polydata[4] = 600
- polydata[5] = 500
- polydata[6] = 600
- polydata[7] = 100
- polydata[8] = 100
- pgPOLYLN( polydata, 4 )
-
-
- *****************
- ** pgRectangle **
- *****************
-
-
- DESCRIPTION The pgRectangle function draws a rectangle using the current
- drawing color. The rectangle may be outlined with a solid line
- using the current drawing color, filled using the current fill
- color and pattern, or both outlined and filled.
-
- The coordinate of the rectangle are specified relative to the
- currently defined viewport and may be any two diagonally
- opposing corners. The cursor position is not updated after
- drawing.
-
-
- SYNTAX C void pgRectangle( int x1, int y1, int x2, int y2,
- int fill );
-
- Pascal PROCEDURE pgRectangle( x1, y1, x2, y2,
- fill:integer );
-
- Basic SUB pgRectangle( x1%, y1%, x2%, y2%, fill% )
-
- Fortran SUBROUTINE pgRectangle( x1, y1, x2, y2, fill )
- INTEGER*2 x1, y1, x2, y2, fill
-
- Clipper PROCEDURE pgRECT( x1, y1, x2, y2, fill )
-
-
- PARAMETERS x1,y1 Coordinate of upper-left corner of rectangle.
- x2,y2 Coordinate of lower-right corner of rectangle.
- fill Fill flag.
-
- The fill flag parameter may be one of the following manifest
- constants:
-
- Constant ValueAction
-
- pgOUTLINE 1 Draw the outline only using the current
- drawing color.
- pgFILL 2 Fill using the current fill color and fill
- pattern. The border is not drawn.
- pgOFILL 3 Draw the outline and fill the interior.
-
-
- RETURN None.
-
-
- SEE ALSO pgEllipse, pgCircle, pgPie, pgSetColor, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw three rectangles to demonstrate the effects of the
- different fill options.
-
- C pgSetColor( 1 );
- pgSetFillStyle( pgFHATCH, 2 );
- pgRectangle( 100, 100, 200, 200, pgOUTLINE );
- pgRectangle( 300, 300, 400, 400, pgFILL );
- pgRectangle( 500, 500, 600, 600, pgOFILL );
-
- Pascal pgSetColor( 1 );
- pgSetFillStyle( pgFHATCH, 2 );
- pgRectangle( 100, 100, 200, 200, pgOUTLINE );
- pgRectangle( 300, 300, 400, 400, pgFILL );
- pgRectangle( 500, 500, 600, 600, pgOFILL );
-
- Basic call pgSetColor( 1 )
- call pgSetFillStyle( pgFHATCH, 2 )
- call pgRectangle( 100, 100, 200, 200, pgOUTLINE )
- call pgRectangle( 300, 300, 400, 400, pgFILL )
- call pgRectangle( 500, 500, 600, 600, pgOFILL )
-
- Fortran call pgSetColor( 1 )
- call pgSetFillStyle( pgFHATCH, 2 )
- call pgRectangle( 100, 100, 200, 200, pgOUTLINE )
- call pgRectangle( 300, 300, 400, 400, pgFILL )
- call pgRectangle( 500, 500, 600, 600, pgOFILL )
-
- Clipper pgSCOLOR( 1 )
- pgSFSTYLE( pgFHATCH, 2 )
- pgRECT( 100, 100, 200, 200, pgOUTLINE )
- pgRECT( 300, 300, 400, 400, pgFILL )
- pgRECT( 500, 500, 600, 600, pgOFILL )
-
-
- **************
- ** pgSector **
- **************
-
-
- DESCRIPTION The pgSector function draws elliptical pie slices of any
- angular extent. The sector is centered at the coordinate (x,y)
- with radii of xrad and yrad. The start and termination angles
- of the sector are given by the parameters sa and ea,
- respectively, specified in degree measure. Zero degrees is
- taken to be the 3 o'clock position increasing positively in a
- counterclockwise direction. The sector may be outlined with a
- solid line using the current drawing color, filled using the
- current fill color and pattern, or both outlined and filled.
-
- The center coordinate of the sector, (x,y), is specified
- relative to the currently defined viewport. The cursor
- position is not updated after drawing.
-
-
- SYNTAX C void pgSector( int x, int y, int xrad, int yrad,
- int sa, int ea, int fill );
-
- Pascal PROCEDURE pgSector( x, y, xrad, yrad, sa, ea,
- fill:integer );
-
- Basic SUB pgSector( x%, y%, xrad%, yrad%, sa%, ea%, fill% )
-
- Fortran SUBROUTINE pgSector( x, y, xrad, yrad, sa, ea, fill )
- INTEGER*2 x, y, xrad, yrad, sa, ea, fill
-
- Clipper PROCEDURE pgSECT( x, y, xrad, yrad, sa, ea, fill )
-
-
- PARAMETERS x,y Center point of the sector.
- xrad Horizontal radius of the sector.
- yrad Vertical radius of the sector.
- sa Start angle of the sector.
- ea End angle of the sector.
- fill Fill flag.
-
- The fill flag parameter may be one of the following manifest
- constants:
-
- Constant Value Action
-
- pgOUTLINE 1 Draw the outline only using the
- current drawing color.
- pgFILL 2 Fill using the current fill color and
- fill pattern. The border is not
- drawn.
- pgOFILL 3 Draw the outline and fill the
- interior.
-
-
- RETURN None.
-
-
- SEE ALSO pgEllipse, pgCircle, pgPie, pgSetColor, pgSetFillMode,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Draw an elliptic pie slice of radii 200 by 100 centered at
- (500,500) from 30 to 270 degrees.
-
- C pgSector( 500, 500, 200, 100, 30, 270, pgFILL );
-
- Pascal pgSector( 500, 500, 200, 100, 30, 270, pgFILL );
-
- Basic call pgSector( 500, 500, 200, 100, 30, 270, pgFILL )
-
- Fortran call pgSector( 500, 500, 200, 100, 30, 270, pgFILL )
-
- Clipper pgSECT( 500, 500, 200, 100, 30, 270, pgFILL )
-
-
- **********************
- ** pgSetCharSpacing **
- **********************
-
-
- DESCRIPTION The pgSetCharSpacing function is used to place additional
- spacing between characters in a text string. The desired
- spacing is specified in terms of pixel units. The default
- setting is 0.
-
-
- SYNTAX C void pgSetCharSpacing( int space );
-
- Pascal PROCEDURE pgSetCharSpacing( space:integer );
-
- Basic SUB pgSetCharSpacing( space% )
-
- Fortran SUBROUTINE pgSetCharSpacing( space )
- INTEGER*2 space
-
- Clipper PROCEDURE pgSCHARSP( space )
-
-
- PARAMETERS space Additional spacing to use between text string
- characters.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetCharSpacing, pgSetTextJustify
-
-
- EXAMPLES Set the character spacing to twice the current value, then
- display the text "Hello World".
-
- C pgSetTextStyle( pgTRIPLEX );
- pgSetCharSpacing( 2 * pgGetCharSpacing() );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgSetCharSpacing( 2 * pgGetCharSpacing );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgSetCharSpacing( 2 * pgGetCharSpacing% )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgSetCharSpacing( 2 * pgGetCharSpacing )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgSCHARSP( 2 * pgGCHARSP() )
- pgDTXY( 100, 100, "Hello World" )
-
-
- *******************
- ** pgSetClipArea **
- *******************
-
-
- DESCRIPTION The pgSetClipArea function is used to define a rectangular
- clipping region on the page. The clipping region is defined in
- terms of the absolute virtual coordinate system. All subsequent
- graphics, including text, is clipped at the boundaries. By
- default, the clipping region tracks the viewport area. If you
- wish to set a clipping region different from the viewport area,
- you must first set the viewport, then call pgSetClipArea.
-
- When pgSetClipArea is called, clipping is automatically enabled.
- You may call the pgSetClipping function to turn clipping off.
-
-
- SYNTAX C void pgSetClipArea( int x1, int y1, int x2, int y2 );
-
- Pascal PROCEDURE pgSetClipArea( x1, y1, x2, y2:integer );
-
- Basic SUB pgSetClipArea( x1%, y1%, x2%, y2% )
-
- Fortran SUBROUTINE pgSetClipArea( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
-
- Clipper PROCEDURE pgSCLIPA( x1, y1, x2, y2 )
-
-
- PARAMETERS x1,y1 Upper-left corner of clipping region.
- x2,y2 Lower-right corner of clipping region.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetClipArea, pgGetClipping, pgSetClipping, pgSetViewPort
-
-
- EXAMPLES Get the current clipping region. Set the clipping area to the
- full printable region and fill that region, then restore the
- clipping region.
-
- C int left, top, right, bottom;
- pgGetClipArea( &left, &top, &right, &bottom );
- pgSetClipArea( 0, 0, pgGetMaxX(), pgGetMaxY() );
- pgRectangle( 0, 0, pgGetMaxX(), pgGetMaxY(), pgFILL );
- pgSetClipArea( left, top, right, bottom );
-
- Pascal var
- left, top, right, bottom : integer;
- pgGetClipArea( left, top, right, bottom );
- pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY );
- pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL );
- pgSetClipArea( left, top, right, bottom );
-
- Basic call pgGetClipArea( left%, top%, right%, bottom% )
- call pgSetClipArea( 0, 0, pgGetMaxX%, pgGetMaxY% )
- call pgRectangle(0, 0, pgGetMaxX%, pgGetMaxY%, pgFILL)
- call pgSetClipArea( left%, top%, right%, bottom% )
-
- Fortran integer*2 left, top, right, bottom
- call pgGetClipArea( left, top, right, bottom )
- call pgSetClipArea( 0, 0, pgGetMaxX, pgGetMaxY )
- call pgRectangle( 0, 0, pgGetMaxX, pgGetMaxY, pgFILL )
- call pgSetClipArea( left, top, right, bottom )
-
- Clipper pgGCLIPA( @left, @top, @right, @bottom )
- pgSCLIPA( 0, 0, pgGMAXX(), pgGMAXY() )
- pgRECT( 0, 0, pgGMAXX(), pgGMAXY(), pgFILL )
- pgSCLIPA( left, top, right, bottom )
-
-
- *******************
- ** pgSetClipping **
- *******************
-
-
- DESCRIPTION The pgSetClipping function is used to enable or disable
- clipping. If enabled, all subsequent graphics, including text,
- will be clipped at the boundaries set by the pgSetClipArea
- function. If disabled, clipping will be performed at the
- boundaries of the page. By default, clipping is enabled.
- Clipping is also automatically enabled when you call the
- pgSetClipArea function.
-
-
- SYNTAX C void pgSetClipping( int flag );
-
- Pascal PROCEDURE pgSetClipping( flag:integer );
-
- Basic SUB pgSetClipping( flag% )
-
- Fortran SUBROUTINE pgSetClipping( flag )
- INTEGER*2 flag
-
- Clipper PROCEDURE pgSCLIP( flag )
-
-
- PARAMETERS flag Switch flag to enable or disable clipping.
-
- The switch flag status may be one of the following manifest
- constants:
-
- Constant Value
-
- pgON 1
- pgOFF 0
-
-
- RETURN None.
-
-
- SEE ALSO pgGetClipArea, pgGetClipping, pgSetClipArea, pgSetViewPort
-
-
- EXAMPLES Get the current clipping flag. Disable clipping and fill a
- rectangular region, then restore the clipping parameter.
-
- C int clipflag;
- clipflag = pgGetClipping();
- pgSetClipping( pgOFF );
- pgRectangle( 0, 0, 500, 200, pgFILL );
- pgSetClipping( clipflag );
-
- Pascal var
- clipflag : integer;
- clipflag := pgGetClipping;
- pgSetClipping( pgOFF );
- pgRectangle( 0, 0, 500, 200, pgFILL );
- pgSetClipping( clipflag );
-
- Basic clipflag% = pgGetClipping%
- call pgSetClipping( pgOFF )
- call pgRectangle( 0, 0, 500, 200, pgFILL )
- call pgSetClipping( clipflag% )
-
- Fortran integer*2 clipflag
- clipflag = pgGetClipping
- call pgSetClipping( pgOFF )
- call pgRectangle( 0, 0, 500, 200, pgFILL )
- call pgSetClipping( clipflag )
-
- Clipper clipflag = pgGCLIP()
- pgSCLIP( pgOFF )
- pgRECT( 0, 0, 500, 200, pgFILL )
- pgSCLIP( clipflag )
-
-
- ****************
- ** pgSetColor **
- ****************
-
-
- DESCRIPTION The pgSetColor function sets the current color index to color.
- The default color index is 1.
-
- The default colors associated with valid color indices are
- color model dependent. That is, on black and white printers,
- index 0 is white and all other color values (1 to 255) are
- black. On PaintJet printers, there are 16 colors at 90 dpi and
- 8 colors at 180 dpi. These may be remapped using pgSetPalette
- or the RGB content of these colors may be altered using
- pgSetRgbPalette. The PaintJet/XL supports up to 256 colors.
- The first 8 PaintJet/XL colors correspond to the PaintJet's
- 8 colors @180 dpi. The colors 8 to 255 are preset by default,
- but may be remapped using pgSetPalette or may be altered by
- pgSetRgbPalette.
-
- The following functions use the current drawing color: pgArc,
- pgCircle, pgDrawText, pgDrawTextXY, pgEllArc, pgEllipse,
- pgLine, pgLineRel, pgLineTo, pgPie, pgPolygon, pgPolyLine,
- pgRectangle, and pgSector.
-
-
- SYNTAX C void pgSetColor( int color );
-
- Pascal PROCEDURE pgSetColor( color:integer );
-
- Basic SUB pgSetColor( color% )
-
- Fortran SUBROUTINE pgSetColor( color )
- INTEGER*2 color
-
- Clipper PROCEDURE pgSCOLOR( color )
-
-
- PARAMETERS color Desired color index.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetColor
-
-
- EXAMPLES Set the current drawing color to 1.
-
- C pgSetColor( 1 );
-
- Pascal pgSetColor( 1 );
-
- Basic call pgSetColor( 1 )
-
- Fortran call pgSetColor( 1 )
-
- Clipper pgSCOLOR( 1 )
-
-
- *******************
- ** pgSetDefaults **
- *******************
-
-
- DESCRIPTION The pgSetDefaults function resets all PGL graphics parameters
- to their default state. Parameter values are automatically set
- to their default values when pgInitDrw and pgOpenDrw are called.
- The default values are listed below:
-
- Parameter Value
-
- Viewport Set to full virtual drawing resolution
- Clipping region Set to full virtual drawing region
- Clipping flag Clipping is turned ON
- Cursor position Cursor placed at (0, 0)
- Drawing color Color index 1
-
- Fill color Color index 1
- Fill mode pgOPAQ
- Fill style pgFSOLID
-
- Line style pgLSOLID
- Line thickness 1
- Line weight Not in effect. Lines will be drawn with
- line thickness 1.
-
- Color palette Previous palette mapping no longer valid
- RGB palette Previous RGB color definitions no longer
- valid
-
- Character spacing 0
- Text bolding 1
- Text justification (pgLEFT, pgBOTTOM)
- Text orientation (1, 0)
- Text scaling (1, 1, 1, 1)
- Text style pgSMALL
-
-
- SYNTAX C void pgSetDefaults( void );
-
- Pascal PROCEDURE pgSetDefaults;
-
- Basic SUB pgSetDefaults
-
- Fortran SUBROUTINE pgSetDefaults
-
- Clipper PROCEDURE pgSDEFAULT()
-
-
- PARAMETERS None.
-
-
- RETURN None.
-
-
- SEE ALSO pgInitDrw, pgOpenDrw
-
-
- EXAMPLES Set all PGL graphics parameters to their default state.
-
- C pgSetDefaults();
-
- Pascal pgSetDefaults;
-
- Basic call pgSetDefaults
-
- Fortran call pgSetDefaults
-
- Clipper pgSDEFAULT()
-
-
- *******************
- ** pgSetFillMode **
- *******************
-
-
- DESCRIPTION The pgSetFillMode function specifies whether filling operations
- are to be performed transparently or opaquely. When filling in
- opaque mode, any underlying graphics is replaced by the fill
- pattern. In transparent mode, fill patterns are overlaid on
- the specified region without destroying underlying graphics.
- The default fill mode is pgOPAQ.
-
-
- SYNTAX C void pgSetFillMode( int mode );
-
- Pascal PROCEDURE pgSetFillMode( mode:integer );
-
- Basic SUB pgSetFillMode( mode% )
-
- Fortran SUBROUTINE pgSetFillMode( mode )
- INTEGER*2 mode
-
- Clipper PROCEDURE pgSFMODE( mode )
-
-
- PARAMETERS mode Fill mode.
-
- Predefined fill mode flags may be specified using one of the
- following manifest constants:
-
- Constant Value Description
-
- pgTRANS 0 Transparent fill (does not
- clear the fill region before
- filling).
- pgOPAQ 1 Opaque fill (clears the fill
- region before filling).
-
-
- RETURN None.
-
-
- SEE ALSO pgGetFillMode, pgGetFillPattern, pgGetFillStyle,
- pgSetFillPattern, pgSetFillStyle
-
-
- EXAMPLES Get the current fill mode, set the fill mode to be transparent
- and draw two overlapping circles using different fill patterns,
- then restore the fill mode.
-
- C int mode;
- mode = pgGetFillMode();
- pgSetFillMode( pgTRANS );
- pgSetFillStyle( pgFLTSLASH, 2 );
- pgCircle( 400, 400, 300, pgOFILL );
- pgSetFillStyle( pgFLTBKSLASH, 2 );
- pgCircle( 600, 400, 300, pgOFILL );
- pgSetFillMode( mode );
-
- Pascal var
- mode : integer;
- mode := pgGetFillMode;
- pgSetFillMode( pgTRANS );
- pgSetFillStyle( pgFLTSLASH, 2 );
- pgCircle( 400, 400, 300, pgOFILL );
- pgSetFillStyle( pgFLTBKSLASH, 2 );
- pgCircle( 600, 400, 300, pgOFILL );
- pgSetFillMode( mode );
-
- Basic mode% = pgGetFillMode%
- call pgSetFillMode( pgTRANS )
- call pgSetFillStyle( pgFLTSLASH, 2 )
- call pgCircle( 400, 400, 300, pgOFILL )
- call pgSetFillStyle( pgFLTBKSLASH, 2 )
- call pgCircle( 600, 400, 300, pgOFILL )
- call pgSetFillMode( mode% )
-
- Fortran integer*2 mode
- mode = pgGetFillMode
- call pgSetFillMode( pgTRANS )
- call pgSetFillStyle( pgFLTSLASH, 2 )
- call pgCircle( 400, 400, 300, pgOFILL )
- call pgSetFillStyle( pgFLTBKSLASH, 2 )
- call pgCircle( 600, 400, 300, pgOFILL )
- call pgSetFillMode( mode )
-
- Clipper mode = pgGFMODE()
- pgSFMODE( pgTRANS )
- pgSFSTYLE( pgFLTSLASH, 2 )
- pgCIR( 400, 400, 300, pgOFILL )
- pgSFSTYLE( pgFLTBKSLASH, 2 )
- pgCIR( 600, 400, 300, pgOFILL )
- pgSFMODE( mode )
-
-
- **********************
- ** pgSetFillPattern **
- **********************
-
-
- DESCRIPTION The pgSetFillPattern function specifies a fill color and
- defines an 8x8 bit pattern to use in all subsequent fill
- operations. The default fill pattern is a solid fill. The
- default fill color is color index 1.
-
- The following functions use the current fill color and pattern:
- pgCircle, pgEllipse, pgPie, pgPolygon, pgRectangle, and
- pgSector.
-
-
- SYNTAX C void far pgSetFillPattern( char far *pattern,
- int fcolor );
-
- Pascal PROCEDURE pgSetFillPattern( var pattern;
- fcolor:integer );
-
- Basic SUB pgSetFillPattern( SEG pattern%, fcolor% )
-
- Fortran SUBROUTINE pgSetFillPattern( pattern, fcolor )
- CHARACTER*1 pattern(8)
- INTEGER*2 fcolor
-
- Clipper PROCEDURE pgSFPAT( pattern, fcolor )
-
-
- PARAMETERS pattern 8x8 bit pattern that determines how the filled region
- looks.
- fcolor Color index of fill color.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetFillPattern, pgGetFillStyle, pgSetFillStyle
-
-
- EXAMPLES Set a fill pattern.
-
- C char pat[8]={0xFF,0x80,0x80,0x80,0xFF,0x08,0x08,0x08};
- int color;
- color = 1;
- pgSetFillPattern( &pat, &color );
-
- Pascal var
- pat : array [0..7] of
- byte=($FF,$80,$80,$80,$FF,$08,$08,$08);
- color : integer;
- color := 1;
- pgSetFillPattern( pat, color );
-
- Basic DIM pat%(3)
- color% = 1
- pat%(0)=&HFF80; pat%(1)=&H8080;
- pat%(2)=&HFF08; pat%(3)=&H0808;
- call pgSetFillPattern( pat%(0), color% )
-
- Fortran character*1 pat(8)
- integer*2 color
- C -- Lahey Fortran -- C
- data pat/Z'FF',Z'80',Z'80',Z'80',
- + Z'FF',Z'08',Z'08',Z'08'/
- C -- Microsoft Fortran -- C
- data pat/16#FF,16#80,16#80,16#80,
- + 16#FF,16#08,16#08,16#08/
- color = 1
- call pgSetFillPattern( pat, color )
-
- Clipper public pat, color
- color = 1
- pat = CHR(255)+CHR(128)+CHR(128)+CHR(128)+;
- CHR(255)+CHR(8)+CHR(8)+CHR(8)
- pgSFPAT( pat, color )
-
-
- ********************
- ** pgSetFillStyle **
- ********************
-
-
- DESCRIPTION The pgSetFillStyle function specifies one of twelve predefined
- fill styles and a fill color to use in all subsequent fill
- operations. The default fill style is pgFSOLID. The default
- fill color is color index 1.
-
- The following functions use the current fill style: pgCircle,
- pgEllipse, pgPie, pgPolygon, pgRectangle, and pgSector.
-
-
- SYNTAX C void pgSetFillStyle( int style, int color );
-
- Pascal PROCEDURE pgSetFillStyle( style, color:integer );
-
- Basic SUB pgSetFillStyle( style%, color% )
-
- Fortran SUBROUTINE pgSetFillStyle( style, color )
- INTEGER*2 style, color
-
- Clipper PROCEDURE pgSFSTYLE( style, color )
-
-
- PARAMETERS style Code specifying a predefined fill pattern.
- color Color index of fill color.
-
- Predefined fill patterns may be specified using one of the
- following manifest constants:
-
- Constant Value Description
-
- pgFEMPTY 0 Empty fill
- pgFSOLID 1 Solid fill with current color
- pgFLINE 2 Fill with line (---)
- pgFLTSLASH 3 Fill with /// normal width lines
- pgFSLASH 4 Fill with /// thick lines
- pgFBKSLASH 5 Fill with \\\ thick lines
- pgFLTBKSLASH 6 Fill with \\\ normal width lines
- pgFHATCH 7 Light hatch fill
- pgFXHATCH 8 Heavy cross hatch fill
- pgFINTERLEAVE 9 Interleaving line fill
- pgFWIDEDOT 10 Fill with widely spaced dots
- pgFCLOSEDOT 11 Fill with closely spaced dots
-
-
- RETURN None.
-
-
- SEE ALSO pgGetFillPattern, pgGetFillStyle, pgSetFillPattern
-
-
- EXAMPLES Get the current fill style and color, set a different fill
- style and color and draw a circle, then restore the original
- fill style and color.
-
- C int fstyle, fcolor;
- pgGetFillStyle( &fstyle, &fcolor );
- pgSetFillStyle( pgFINTERLEAVE, 1 );
- pgCircle( 500, 500, 200, pgFILL );
- pgSetFillStyle( fstyle, fcolor );
-
- Pascal var
- fstyle, fcolor : integer;
- pgGetFillStyle( fstyle, fcolor );
- pgSetFillStyle( pgFINTERLEAVE, 1 );
- pgCircle( 500, 500, 200, pgFILL );
- pgSetFillStyle( fstyle, fcolor );
-
- Basic call pgGetFillStyle( fstyle%, fcolor% )
- call pgSetFillStyle( pgFINTERLEAVE, 1 )
- call pgCircle( 500, 500, 200, pgFILL )
- call pgSetFillStyle( fstyle%, fcolor% )
-
- Fortran integer*2 fstyle, fcolor
- pgGetFillStyle( fstyle, fcolor )
- call pgSetFillStyle( pgFINTERLEAVE, 1 )
- call pgCircle( 500, 500, 200, pgFILL )
- call pgSetFillStyle( fstyle, fcolor )
- Clipper pgGFSTYLE( @fstyle, @fcolor )
- pgSFSTYLE( pgFINTERLEAVE, 1 )
- pgCIR( 500, 500, 200, pgFILL )
- pgSFSTYLE( fstyle, fcolor )
-
-
- **********************
- ** pgSetLinePattern **
- **********************
-
-
- DESCRIPTION The pgSetLinePattern function sets the mask and thickness used
- for line drawing. The mask argument is a 16-bit array, where
- each bit represents a pixel in the line being drawn. If a bit
- is 1, the corresponding pixel is set to the color of the line
- (the current color). If a bit is 0, the corresponding pixel is
- left unchanged. The template is repeated for the entire length
- of the line. The default mask is hex FFFF.
-
- The following functions use the current line pattern: pgLine,
- pgLineRel, pgLineTo, and pgPolyLine.
-
-
- SYNTAX C void pgSetLinePattern( int pattern, int thickness );
-
- Pascal PROCEDURE pgSetLinePattern( pattern,
- thickness:integer );
-
- Basic SUB pgSetLinePattern( pattern%, thickness% )
-
- Fortran SUBROUTINE pgSetLinePattern( pattern, thickness )
- INTEGER*2 pattern, thickness
-
- Clipper PROCEDURE pgSLPAT( pattern, thickness )
-
-
- PARAMETERS pattern Desired line-style pattern.
- thickness Desired pixel width for line thickness.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetLinePattern, pgGetLineStyle, pgSetLineStyle
-
-
- EXAMPLES Set the line pattern to be hex 0F0F with a line thickness of 5.
-
- C pgSetLinePattern( 0x0F0F, 5 );
-
- Pascal pgSetLinePattern( $0F0F, 5 );
-
- Basic call pgSetLinePattern( &H0F0F, 5 )
-
- Fortran call pgSetLinePattern( 3855, 5 )
-
- Clipper pgSLPAT( 3855, 5 )
-
-
- ********************
- ** pgSetLineStyle **
- ********************
-
-
- DESCRIPTION The pgSetLineStyle function specifies one of nine predefined
- line styles and a line thickness value to use in all subsequent
- line drawing operations. The default line style is pgLSOLID.
- The default line thickness is 1.
-
- The following functions use the current line style: pgLine,
- pgLineRel, pgLineTo, and pgPolyLine.
-
-
- SYNTAX C void pgSetLineStyle( int style, int thickness );
-
- Pascal PROCEDURE pgSetLineStyle( style, thickness:integer );
-
- Basic SUB pgSetLineStyle( style%, thickness% )
-
- Fortran SUBROUTINE pgSetLineStyle( style, thickness )
- INTEGER*2 style, thickness
-
- Clipper PROCEDURE pgSLSTYLE( style, thickness )
-
-
- PARAMETERS style Code specifying a predefined line style.
- thickness Thickness of lines in pixels.
-
- Predefined line styles may be specified using one of the
- following manifest constants:
-
- Constant Value Description
-
- pgLSOLID 0 Solid line.
- pgLHUGEDASH 1 Huge dash line.
- pgLBIGDASH 2 Big dash line.
- pgLMEDDASH 3 Medium dash line.
- pgLSMALLDASH 4 Small dash line.
- pgLWIDEDOT 5 Wide dot line.
- pgLCLOSEDOT 6 Close dot line.
- pgLDASHDOT 7 Dash dot line.
- pgLCENTER 8 Center line.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetLinePattern, pgGetLineStyle, pgGetLineWeight,
- pgSetLinePattern, pgSetLineWeight
-
-
- EXAMPLES Get the current line style and thickness, set a different line
- style and thickness and draw a cross hair, then restore the
- original line style and thickness.
-
- C int lstyle, lthickness;
- pgGetLineStyle( &lstyle, <hickness );
- pgSetLineStyle( pgLCENTER, 7 );
- pgLine( 500, 400, 700, 400 );
- pgLine( 600, 300, 600, 500 );
- pgSetLineStyle( lstyle, lthickness );
-
- Pascal var
- lstyle, lthickness : integer;
- pgGetLineStyle( lstyle, lthickness );
- pgSetLineStyle( pgLCENTER, 7 );
- pgLine( 500, 400, 700, 400 );
- pgLine( 600, 300, 600, 500 );
- pgSetLineStyle( lstyle, lthickness );
-
- Basic call pgGetLineStyle( lstyle%, lthickness% )
- call pgSetLineStyle( pgLCENTER, 7 )
- call pgLine( 500, 400, 700, 400 )
- call pgLine( 600, 300, 600, 500 )
- call pgSetLineStyle( lstyle%, lthickness% )
-
- Fortran integer*2 lstyle, lthickness
- call pgGetLineStyle( lstyle, lthickness )
- call pgSetLineStyle( pgLCENTER, 7 )
- call pgLine( 500, 400, 700, 400 )
- call pgLine( 600, 300, 600, 500 )
- call pgSetLineStyle( lstyle, lthickness )
-
- Clipper pgGLSTYLE( @lstyle, @lthickness )
- pgSLSTYLE( pgLCENTER, 7 )
- pgLIN( 500, 400, 700, 400 )
- pgLIN( 600, 300, 600, 500 )
- pgSLSTYLE( lstyle, lthickness )
-
-
- *********************
- ** pgSetLineWeight **
- *********************
-
-
- DESCRIPTION The pgSetLineWeight function is used to specify a weighting
- factor for line drawing. This is an alternate method of
- generating lines of varying thickness. The weighting factor
- represents the number of thousandths of an inch for the line
- width. For example, 1=0.001", 6=0.006", etc. The actual line
- width will be rounded off somewhat due to your printer's
- resolution.
-
- The advantage of using this function is that your plots will
- look very similar regardless of the resolution of the printer.
- Line widths specified with the pgSetLineStyle will appear as
- different widths when printed at different resolutions (i.e. a
- line with a thickness other than 1 will appear twice as wide
- when printed at 75 dpi as when printed at 150 dpi).
-
- The pgSetLineStyle function also sets the line thickness in
- pixels. You must call pgSetLineWeight after calling
- pgSetLineStyle in order for line weight to take effect. The
- pgSetLineWeight function is effective until pgSetLineStyle is
- called again.
-
-
- SYNTAX C void pgSetLineWeight( int weight );
-
- Pascal PROCEDURE pgSetLineWeight( weight:integer );
-
- Basic SUB pgSetLineWeight( weight% )
-
- Fortran SUBROUTINE pgSetLineWeight( weight )
- INTEGER*2 weight
-
- Clipper PROCEDURE pgSLWGT( weight )
-
-
- PARAMETERS weight Thickness of the line specified in thousandths of an
- inch (e.g. 1=0.001", 100=0.1", etc.).
-
-
- RETURN None.
-
-
- SEE ALSO pgGetLinePattern, pgGetLineStyle, pgGetLineWeight,
- pgSetLinePattern, pgSetLineStyle
-
-
- EXAMPLES Set the line weight to draw lines which are approximately 0.05"
- wide.
-
- C pgSetLineWeight( 50 );
- pgLine( 0, 0, 1000, 1000 );
-
- Pascal pgSetLineWeight( 50 );
- pgLine( 0, 0, 1000, 1000 );
-
- Basic call pgSetLineWeight( 50 )
- call pgLine( 0, 0, 1000, 1000 )
-
- Fortran call pgSetLineWeight( 50 )
- call pgLine( 0, 0, 1000, 1000 )
-
- Clipper pgSLWGT( 50 )
- pgLIN( 0, 0, 1000, 1000 )
-
-
- *******************
- ** pgSetPageForm **
- *******************
-
-
- DESCRIPTION The pgSetPageForm function allows you to specify the orientation
- of the paper as portrait or landscape. You must first load a
- device driver with the pgLoadDevInfo function. There is no
- default setting for page form.
-
- This and other page functions merely allow you to select a
- specific set of print parameters in order to return information
- such as paper size, resolution, number of colors, number of bit
- planes, etc. Setting a page orientation does not mean your
- drawings will automatically be printed in that form. You must
- select the page orientation at print time.
-
-
- SYNTAX C void pgSetPageForm( int form );
-
- Pascal PROCEDURE pgSetPageForm( form:integer );
-
- Basic SUB pgSetPageForm( form% )
-
- Fortran SUBROUTINE pgSetPageForm( form )
- INTEGER*2 form
-
- Clipper PROCEDURE pgSPFORM( form )
-
-
- PARAMETERS form The orientation of the paper. The orientation may be
- specified using the following manifest constants.
-
- Constant Value
-
- pgPORTRAIT 0
- pgLANDSCAPE 1
-
-
- RETURN None.
-
-
- SEE ALSO pgLoadDevInfo, pgSetPageMargins, pgSetPageSize
-
-
- EXAMPLES Load the 'HPLJET' device driver and set the page orientation to
- LANDSCAPE.
-
- C int ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageForm( pgLANDSCAPE );
-
- Pascal var
- ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageForm( pgLANDSCAPE );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- call pgSetPageForm( pgLANDSCAPE )
-
- Fortran integer*2 ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageForm( pgLANDSCAPE )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPFORM( pgLANDSCAPE )
-
-
- **********************
- ** pgSetPageMargins **
- **********************
-
-
- DESCRIPTION The pgSetPageMargins function allows you to specify the left,
- top, right, and bottom page margins. You must first load a
- device driver with the pgLoadDevInfo function. There are no
- default settings for page margins.
-
- Page margins are specified in units of 100=1" (e.g., 150=1.5",
- 50=0.5", etc.). No internal checking is performed to insure
- correct margins. For example, if the paper width is 8.5" wide,
- you may not specify left and right margins which are 5" each
- (presumes paper is at least 10" wide).
-
- Note that the bottom page margin is only meaningful if you have
- specified full page size. At half or quarter page size, the
- bottom margin is not applicable.
-
- This and other page functions merely allow you to select a
- specific set of printer parameters in order to return
- information such as paper size, resolution, number of colors,
- number of bit planes, etc. Selecting a set of page margins
- does not mean your drawings will automatically be printed in
- that form. You must select the page margins at print time.
-
-
- SYNTAX C void pgSetPageMargins( int left, int top,
- int right, int bottom );
-
- Pascal PROCEDURE pgSetPageMargins( left, top,
- right, bottom:integer );
-
- Basic SUB pgSetPageMargins( left%, top%, right%, bottom% )
-
- Fortran SUBROUTINE pgSetPageMargins( left, top,
- right, bottom )
- INTEGER*2 left, top, right, bottom
-
- Clipper PROCEDURE pgSPMARGIN( left, top, right, bottom )
-
-
- PARAMETERS left Left paper margins.
- top Top paper margin.
- right Right paper margin.
- bottom Bottom paper margin.
-
-
- RETURN None.
-
-
- SEE ALSO pgLoadDevInfo, pgSetPageForm, pgSetPageSize
-
-
- EXAMPLES Load the 'HPLJET' device driver and set the left, top, right,
- and bottom page margins to 1.5", 1.0", 1.5", and 2.0",
- respectively.
-
- C int ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageMargins( 150, 100, 150, 200 );
-
- Pascal var
- ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageMargins( 150, 100, 150, 200 );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- call pgSetPageMargins( 150, 100, 150, 200 )
-
- Fortran integer*2 ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageMargins( 150, 100, 150, 200 )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPMARGIN( 150, 100, 150, 200 )
-
-
- *******************
- ** pgSetPageSize **
- *******************
-
-
- DESCRIPTION The pgSetPageSize function allows you to specify the portion of
- the paper to use (FULL, HALF, or QUARTER page). You must first
- load a device driver with the pgLoadDevInfo function. There is
- no default setting for page size.
-
- This and other page functions merely allow you to select a
- specific set of printer parameters in order to return
- information such as paper size, resolution, number of colors,
- number of bit planes, etc. Selecting a page size does not mean
- your drawings will automatically be printed in that form.
- You must select the page size at print time.
-
-
- SYNTAX C void pgSetPageSize( int size );
-
- Pascal PROCEDURE pgSetPageSize( size:integer );
-
- Basic SUB pgSetPageSize( size% )
-
- Fortran SUBROUTINE pgSetPageSize( size )
- INTEGER*2 size
-
- Clipper PROCEDURE pgSPSIZE( size )
-
-
- PARAMETERS size The size of the paper. Page size may be specified
- using the following manifest constants.
-
- Constant Value
-
- pgHALFPAGE 0
- pgFULLPAGE 1
- pgQUARTERPAGE 2
-
-
- RETURN None.
-
-
- SEE ALSO pgLoadDevInfo, pgSetPageMargins, pgSetPageForm
-
-
- EXAMPLES Load the 'HPLJET' device driver and set the page size to FULL.
-
- C int ierr;
- ierr = pgLoadDevInfo( "HPLJET" );
- pgSetPageSize( pgFULLPAGE );
-
- Pascal var
- ierr : integer;
- ierr := pgLoadDevInfo( 'HPLJET' );
- pgSetPageSize( pgFULLPAGE );
-
- Basic ierr% = pgLoadDevInfo%( "HPLJET" )
- call pgSetPageSize( pgFULLPAGE )
-
- Fortran integer*2 ierr
- ierr = pgLoadDevInfo( 'HPLJET'//char(0) )
- call pgSetPageSize( pgFULLPAGE )
-
- Clipper ierr = pgLDINFO( "HPLJET" )
- pgSPSIZE( pgFULLPAGE )
-
-
- ******************
- ** pgSetPalette **
- ******************
-
-
- DESCRIPTION The pgSetPalette function is used to associate the color
- specified in the argument index with the pixel value color.
- The maximum possible value of the argument color depends on the
- number of colors that can be simultaneously displayed on the
- printer you are using. This function is only valid when
- printing to a color printer. For example, for an HP PaintJet,
- there are eight colors in high resolution mode, therefore,
- color values can range from 0 to 7. You can obtain this
- information by calling pgGetDevColors.
-
-
- SYNTAX C void pgSetPalette( int index, int color );
-
- Pascal PROCEDURE pgSetPalette( index, color:integer );
-
- Basic SUB pgSetPalette( index%, color% )
-
- Fortran SUBROUTINE pgSetPalette( index, color )
- INTEGER*2 index, color
-
- Clipper PROCEDURE pgSPAL( index, color )
-
-
- PARAMETERS index Color index to be redefined.
- color Color to be associated with the index.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetDevColors, pgSetColor, pgSetFillPattern, pgSetFillStyle,
- pgSetRgbPalette
-
-
- EXAMPLES Draw a line using color index 3, use the pgSetPalette function
- to reverse the definitions of color index 3 and 4 such that
- color 4 is associated with index 3 and color 3 is associated
- with index 4, reset the color to index 3, then draw another
- line.
-
- C pgSetColor( 3 );
- pgLine( 0, 0, pgGetMaxX(), pgGetMaxY() );
- pgSetPalette( 3, 4 );
- pgSetPalette( 4, 3 );
- pgSetColor( 3 );
- pgLine( 0, pgGetMaxY(), pgGetMaxX(), 0 );
-
- Pascal pgSetColor( 3 );
- pgLine( 0, 0, pgGetMaxX, pgGetMaxY );
- pgSetPalette( 3, 4 );
- pgSetPalette( 4, 3 );
- pgSetColor( 3 );
- pgLine( 0, pgGetMaxY, pgGetMaxX, 0 );
-
- Basic call pgSetColor( 3 )
- call pgLine( 0, 0, pgGetMaxX%, pgGetMaxY% )
- call pgSetPalette( 3, 4 )
- call pgSetPalette( 4, 3 )
- call pgSetColor( 3 )
- call pgLine( 0, pgGetMaxY%, pgGetMaxX%, 0 )
-
- Fortran call pgSetColor( 3 )
- call pgLine( 0, 0, pgGetMaxX, pgGetMaxY )
- call pgSetPalette( 3, 4 )
- call pgSetPalette( 4, 3 )
- call pgSetColor( 3 )
- call pgLine( 0, pgGetMaxY, pgGetMaxX, 0 )
-
- Clipper pgSCOLOR( 3 )
- pgLIN( 0, 0, pgGetMaxX(), pgGetMaxY() )
- pgSPAL( 3, 4 )
- pgSPAL( 4, 3 )
- pgSCOLOR( 3 )
- pgLIN( 0, pgGetMaxY(), pgGetMaxX(), 0 )
-
-
- ****************
- ** pgSetPixel **
- ****************
-
-
- DESCRIPTION The pgSetPixel function sets a pixel at the coordinate (x,y) to
- the specified color. The coordinate is specified in the
- viewport coordinate system. The cursor position is not updated
- after drawing.
-
-
- SYNTAX C void pgSetPixel( int x, int y, int color );
-
- Pascal PROCEDURE pgSetPixel( x, y, color:integer );
-
- Basic SUB pgSetPixel( x%, y%, color% )
-
- Fortran SUBROUTINE pgSetPixel( x, y, color )
- INTEGER*2 x, y, color
-
- Clipper PROCEDURE pgSETPIX( x, y, color )
-
-
- PARAMETERS x,y Coordinate of target pixel.
- color Color to light target pixel.
-
-
- RETURN None.
-
-
- SEE ALSO pgLine, pgLineTo, pgLineRel
-
-
- EXAMPLES Set the pixel at coordinate (100,200) to color 1.
-
- C pgSetPixel( 100, 200, 1 );
-
- Pascal pgSetPixel( 100, 200, 1);
-
- Basic call pgSetPixel( 100, 200, 1 )
-
- Fortran call pgSetPixel( 100, 200, 1 )
-
- Clipper pgSETPIX( 100, 200, 1 )
-
-
- *********************
- ** pgSetRgbPalette **
- *********************
-
-
- DESCRIPTION The pgSetRgbPalette function is used to explicitly define how a
- pixel value or color number maps to an actual printed color.
- The argument index is the color number between 0 and 255 that
- is being defined. The arguments red, green, and blue,
- respectively, are used to specify the level of the red, green,
- and blue components of the color corresponding to the pixel
- value index.
-
- Note that eight bits of each color component, red, green, and
- blue, are used. Therefore, there are 28=256 possible levels of
- red, green, and blue in each color which allow for a total of
- 256x256x256 = 16,777,216 possible colors.
-
- The actual number of colors available to you is dependent on
- the printer. The ToolKit lets you specify RGB color values in
- a somewhat device independent fashion. At print time, the
- ToolKit printing utilities convert the RGB color palette
- requests into device specific requests, or the RGB information
- is not used if the output device does not support an RGB
- palette. As of this writing, the PaintJet, PaintJet/XL, and
- PostScript printers are the only printers that support an RGB
- palette. The pgSetRgbPalette information is not used if you
- print on any other output device.
-
-
- SYNTAX C void pgSetRgbPalette( int index, int red, int green,
- int blue );
-
- Pascal PROCEDURE pgSetRgbPalette( index, red, green,
- blue:integer );
-
- Basic SUB pgSetRgbPalette( index%, red%, green%, blue% )
-
- Fortran SUBROUTINE pgSetRgbPalette( index, red, green, blue )
- INTEGER*2 index, red, green, blue
-
- Clipper PROCEDURE pgSRGB( index, red, green, blue )
-
-
- PARAMETERS index Color index to be defined.
- red Value of red component of the color.
- green Value of green component of the color.
- blue Value of blue component of the color.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetDevColors, pgSetPalette
-
-
- EXAMPLES Define color indices 1, 2, and 3 to be red, green, and blue,
- respectively.
-
- C pgSetRgbPalette( 1, 255, 0, 0 );
- pgSetRgbPalette( 2, 0, 255, 0 );
- pgSetRgbPalette( 3, 0, 0, 255 );
-
- Pascal pgSetRgbPalette( 1, 255, 0, 0 );
- pgSetRgbPalette( 2, 0, 255, 0 );
- pgSetRgbPalette( 3, 0, 0, 255 );
-
- Basic call pgSetRgbPalette( 1, 255, 0, 0 )
- call pgSetRgbPalette( 2, 0, 255, 0 )
- call pgSetRgbPalette( 3, 0, 0, 255 )
-
- Fortran call pgSetRgbPalette( 1, 255, 0, 0 )
- call pgSetRgbPalette( 2, 0, 255, 0 )
- call pgSetRgbPalette( 3, 0, 0, 255 )
-
- Clipper pgSRGB( 1, 255, 0, 0 )
- pgSRGB( 2, 0, 255, 0 )
- pgSRGB( 3, 0, 0, 255 )
-
-
- **********************
- ** pgSetTextBolding **
- **********************
-
-
- DESCRIPTION The pgSetTextBolding function sets the current text bolding
- parameter. The bolding parameter simply sets the line thickness
- to use when drawing text. The default level of bolding is 1.
-
-
- SYNTAX C void pgSetTextBolding( int bold );
-
- Pascal PROCEDURE pgSetTextBolding( bold:integer );
-
- Basic SUB pgSetTextBolding( bold% )
-
- Fortran SUBROUTINE pgSetTextBolding( bold )
- INTEGER*2 bold
-
- Clipper PROCEDURE pgSTBOLD( bold )
-
-
- PARAMETERS bold Bolding level.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetTextBolding
-
-
- EXAMPLES Set text bolding to five times the current value, then display
- the text "Bold Text".
-
- C pgSetTextStyle( pgTRIPLEX );
- pgSetTextBolding( 5 * pgGetTextBolding() );
- pgDrawTextXY( 100, 100, "Bold Text" );
-
- Pascal pgSetTextStyle( pgTRIPLEX );
- pgSetTextBolding( 5 * pgGetTextBolding );
- pgDrawTextXY( 100, 100, 'Bold Text' );
-
- Basic call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextBolding( 5 * pgGetTextBolding% )
- call pgDrawTextXY( 100, 100, "Bold Text" )
-
- Fortran call pgSetTextStyle( pgTRIPLEX )
- call pgSetTextBolding( 5 * pgGetTextBolding )
- call pgDrawTextXY( 100, 100, 'Bold Text'//char(0) )
-
- Clipper pgSTSTYLE( pgTRIPLEX )
- pgSTBOLD( 5 * pgGTBOLD() )
- pgDTXY( 100, 100, "Bold Text" )
-
-
- **********************
- ** pgSetTextJustify **
- **********************
-
-
- DESCRIPTION The pgSetTextJustify function is used to specify the horizontal
- and vertical justification of displayed text strings. Text
- justification is relative to the current cursor position when
- using pgDrawText and relative to the specified text position
- passed to the pgDrawTextXY function.
-
- pgLEFT and pgRIGHT justification applies to the direction in
- which the text is drawn, regardless of whether it is displayed
- horizontally or vertically. pgTOP and pgBOTTOM justification
- applies to the direction perpendicular to the direction in
- which the text is drawn.
-
- The default justification is (pgLEFT, pgBOTTOM).
-
-
- SYNTAX C void pgSetTextJustify( int horiz, int vert );
-
- Pascal PROCEDURE pgSetTextJustify( horiz, vert:integer );
-
- Basic SUB pgSetTextJustify( horiz%, vert% )
-
- Fortran SUBROUTINE pgSetTextJustify( horiz, vert )
- INTEGER*2 horiz, vert
-
- Clipper PROCEDURE pgSTJUST( horiz, vert )
-
-
- PARAMETERS horiz Specifies horizontal justification of text.
- vert Specifies vertical justification of text.
-
- Valid text justification manifest constants are as follows:
-
- Constant Value Description
-
- pgLEFT 0 Left justified
- pgRIGHT 2 Right justified
- pgCENTER 1 Center justified
- pgTOP 2 Top justified
- pgBOTTOM 0 Bottom justified
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextJustify
-
-
- EXAMPLES Draw a cross hair, then set the text justification to be right
- justified horizontally and bottom justified vertically and
- display the text "Hello World".
-
- C pgLine( 0, 500, 1000, 500 );
- pgLine( 500, 0, 500, 1000 );
- pgSetTextJustify( pgRIGHT, pgBOTTOM );
- pgDrawTextXY( 500, 500, "Hello World" );
-
- Pascal pgLine( 0, 500, 1000, 500 );
- pgLine( 500, 0, 500, 1000 );
- pgSetTextJustify( pgRIGHT, pgBOTTOM );
- pgDrawTextXY( 500, 500, 'Hello World' );
-
- Basic call pgLine( 0, 500, 1000, 500 )
- call pgLine( 500, 0, 500, 1000 )
- call pgSetTextJustify( pgRIGHT, pgBOTTOM )
- call pgDrawTextXY( 500, 500, "Hello World" )
-
- Fortran call pgLine( 0, 500, 1000, 500 )
- call pgLine( 500, 0, 500, 1000 )
- call pgSetTextJustify( pgRIGHT, pgBOTTOM )
- call pgDrawTextXY( 500, 500, 'Hello World'//char(0) )
- Clipper pgLIN( 0, 500, 1000, 500 )
- pgLIN( 500, 0, 500, 1000 )
- pgSTJUST( pgRIGHT, pgBOTTOM )
- pgDTXY( 500, 500, "Hello World" )
-
-
- *********************
- ** pgSetTextOrient **
- *********************
-
-
- DESCRIPTION The pgSetTextOrient function is used to specify a vector
- indicating the direction of text display. The default
- orientation is (1,0).
-
-
- SYNTAX C void pgSetTextOrient( int x, int y );
-
- Pascal PROCEDURE pgSetTextOrient( x, y:integer );
-
- Basic SUB pgSetTextOrient( x%, y% )
-
- Fortran SUBROUTINE pgSetTextOrient( x, y )
- INTEGER*2 x, y
-
- Clipper PROCEDURE pgSTORIEN( x, y )
-
-
- PARAMETERS x,y Vector specifying the text orientation.
-
- Currently, only four text orientations are allowed. These are
- summarized as follows:
-
- (x, y) Description
-
- ( 1, 0) Text displayed horizontally from left to right
- ( 0, 1) Text displayed vertically from bottom to top
- (-1, 0) Text displayed horizontally from right to left
- (inverted)
- ( 0,-1) Text displayed vertically from top to bottom
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextOrient
-
-
- EXAMPLES Set the text orientation for upside down drawing, then display
- the text "Upside-Down".
-
- C pgSetTextOrient( -1, 0 );
- pgDrawTextXY( 600, 100, "Upside-Down" );
-
- Pascal pgSetTextOrient( -1, 0 );
- pgDrawTextXY( 600, 100, 'Upside-Down' );
-
- Basic call pgSetTextOrient( -1, 0 )
- call pgDrawTextXY( 600, 100, "Upside-Down" )
-
- Fortran call pgSetTextOrient( -1, 0 )
- call pgDrawTextXY( 600, 100, 'Upside-Down'//char(0) )
-
- Clipper pgSTORIEN( -1, 0 )
- pgDTXY( 600, 100, "Upside-Down" )
-
-
- **********************
- ** pgSetTextScaling **
- **********************
-
-
- DESCRIPTION The pgSetTextScaling function is used to specify a separate
- horizontal and vertical scale factor for displaying text
- strings.
-
- The horizontal scale factor is computed as (mx/dx) and is always
- applied to the direction in which text is drawn, regardless of
- whether it is displayed horizontally or vertically. The
- vertical scale factor is computed as (my/dy) and is always
- applied to the direction perpendicular to the direction in
- which the text is drawn.
-
- The default scale factors are 1:1 for both directions.
-
- The pgSetTextScaling function affects the values returned from
- the pgGetTextHeight and pgGetTextLength functions. When
- printing on PostScript printers using PGL2PS this function is
- only approximate and may be reliable.
-
-
- SYNTAX C void pgSetTextScaling( int mx, int dx,
- int my, int dy );
-
- Pascal PROCEDURE pgSetTextScaling( mx, dx,
- my, dy:integer );
-
- Basic SUB pgSetTextScaling( mx%, dx%, my%, dy% )
-
- Fortran SUBROUTINE pgSetTextScaling( mx, dx, my, dy )
- INTEGER*2 mx, dx, my, dy
-
- Clipper PROCEDURE pgSTSCALE( mx, dx, my, dy )
-
-
- PARAMETERS mx,dx Horizontal scale factor.
- my,dy Vertical scale factor.
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
- pgGetTextScaling
-
-
- EXAMPLES Set the text scale factor to draw tall and thin text, then
- short and fat text.
-
- C pgSetTextScaling( 1, 1, 3, 1 );
- pgDrawTextXY( 100, 100, "Tall and Thin" );
- pgSetTextScaling( 3, 1, 1, 1 );
- pgDrawTextXY( 100, 400, "Short and Fat" );
-
- Pascal pgSetTextScaling( 1, 1, 3, 1 );
- pgDrawTextXY( 100, 100, 'Tall and Thin' );
- pgSetTextScaling( 3, 1, 1, 1 );
- pgDrawTextXY( 100, 400, 'Short and Fat' );
-
- Basic call pgSetTextScaling( 1, 1, 3, 1 )
- call pgDrawTextXY( 100, 100, "Tall and Thin" )
- call pgSetTextScaling( 3, 1, 1, 1 )
- call pgDrawTextXY( 100, 400, "Short and Fat" )
-
- Fortran call pgSetTextScaling( 1, 1, 3, 1 )
- call pgDrawTextXY(100, 100, 'Tall and Thin'//char(0))
- call pgSetTextScaling( 3, 1, 1, 1 )
- call pgDrawTextXY(100, 400, 'Short and Fat'//char(0))
-
- Clipper pgSTSCALE( 1, 1, 3, 1 )
- pgDTXY( 100, 100, "Tall and Thin" )
- pgSTSCALE( 3, 1, 1, 1 )
- pgDTXY( 100, 400, "Short and Fat" )
-
-
- ********************
- ** pgSetTextStyle **
- ********************
-
-
- DESCRIPTION The pgSetTextStyle function is used to specify one of seven
- fully scalable vector font sets to use for displaying text.
- The default font style is pgSMALL.
-
-
- SYNTAX C void pgSetTextStyle( int fontstyle );
-
- Pascal PROCEDURE pgSetTextStyle( fontstyle:integer );
-
- Basic SUB pgSetTextSyle( fontstyle% )
-
- Fortran SUBROUTINE pgSetTextStyle( fontstyle )
- INTEGER*2 fontstyle
-
- Clipper PROCEDURE pgSTSTYLE( fontstyle )
-
-
- PARAMETERS fontstyle Font to be used (loaded from disk file).
-
- There are currently seven font sets which may be selected. The
- font is selected by specifying one of the manifest constants
- (or its value) listed below:
-
- Constant Value Description File Name
-
- pgSMALL 0 Small SMALL.FNT
- pgSIMPLEX 1 Simplex SIMPLEX.FNT
- pgDUPLEX 2 Duplex DUPLEX.FNT
- pgTRIPLEX 3 Triplex TRIPLEX.FNT
- pgGOTHIC 4 Gothic GOTHIC.FNT
- pgSCRIPT 5 Script SCRIPT.FNT
- pgSDUPLEX 6 Script Duplex SDUP.FNT
-
-
- RETURN None.
-
-
- SEE ALSO pgDrawText, pgDrawTextXY, pgGetTextHeight, pgGetTextLength,
- pgGetTextStyle
-
-
- EXAMPLES Load the DUPLEX font set and display a text string.
-
- C pgSetTextStyle( pgDUPLEX );
- pgDrawTextXY( 100, 100, "Hello World" );
-
- Pascal pgSetTextStyle( pgDUPLEX );
- pgDrawTextXY( 100, 100, 'Hello World' );
-
- Basic call pgSetTextStyle( pgDUPLEX )
- call pgDrawTextXY( 100, 100, "Hello World" )
-
- Fortran call pgSetTextStyle( pgDUPLEX )
- call pgDrawTextXY( 100, 100, 'Hello World'//char(0) )
-
- Clipper pgSTSTYLE( pgDUPLEX )
- pgDTXY( 100, 100, "Hello World" )
-
-
- *******************
- ** pgSetViewPort **
- *******************
-
-
- DESCRIPTION The pgSetViewPort function is used to define a rectangular
- region on the page for displaying graphics. The viewport
- coordinate origin is defined to be the upper-left hand corner
- of the viewport.
-
- The viewport region is defined in terms of the absolute virtual
- coordinate system. After setting a viewport, the cursor
- position will be placed at the upper-left hand corner of the
- viewport. The coordinate at this point is (0,0) and all
- subsequent graphics calls are made relative to this coordinate.
-
- The clipping region is automatically defined to match the
- viewport region. Use the pgSetClipArea command to define a
- clipping region independent of the viewport. Use the
- pgSetClipping command to turn clipping on or off.
-
-
- SYNTAX C void pgSetViewPort( int x1, int y1, int x2, int y2 );
-
- Pascal PROCEDURE pgSetViewPort( x1, y1, x2, y2 : integer );
-
- Basic SUB pgSetViewPort( x1%, y1%, x2%, y2% )
-
- Fortran SUBROUTINE pgSetViewPort( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
-
- Clipper PROCEDURE pgSVIEWP( x1, y1, x2, y2 )
-
-
- PARAMETERS x1,y1 Upper-left corner of viewport.
- x2,y2 Lower-right corner of viewport.
-
-
- RETURN None.
-
-
- SEE ALSO pgGetClipArea, pgGetClipping, pgGetViewPort, pgSetClipArea,
- pgSetClipping
-
-
- EXAMPLES Use the pgGetViewPort and pgSetViewPort functions to fill the
- current viewport with a pattern, erase a rectangular portion of
- the fill region leaving a border 20 pixels wide by setting a
- new viewport and clearing it with the pgClearViewPort function,
- then restore the viewport to the original size.
-
- C int x1, y1, x2, y2;
- pgGetViewPort( &x1, &y1, &x2, &y2 );
- pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
- pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
- pgClearViewPort();
- pgSetViewPort( x1, y1, x2, y2 );
-
- Pascal var
- x1, y1, x2, y2 : integer;
- pgGetViewPort( x1, y1, x2, y2 );
- pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL );
- pgSetViewPort( x1+20, y1+20, x2-20, y2-20 );
- pgClearViewPort;
- pgSetViewPort( x1, y1, x2, y2 );
-
- Basic call pgGetViewPort( x1%, y1%, x2%, y2% )
- call pgRectangle( 0, 0, x2%-x1%, y2%-y1%, pgOFILL )
- call pgSetViewPort( x1%+20, y1%+20, x2%-20,
- y2%-20)
- call pgClearViewPort
- call pgSetViewPort( x1%, y1%, x2%, y2% )
-
- Fortran integer*2 x1, y1, x2, y2
- call pgGetViewPort( x1, y1, x2, y2 )
- call pgRectangle( 0, 0, x2-x1, y2-y1, pgOFILL )
- call pgSetViewPort( x1+20, y1+20, x2-20, y2-20 )
- call pgClearViewPort
- call pgSetViewPort( x1, y1, x2, y2 )
-
- Clipper pgGVIEWP( @x1, @y1, @x2, @y2 )
- pgRECT( 0, 0, x2-x1, y2-y1, pgOFILL )
- pgSVIEWP( x1+20, y1+20, x2-20, y2-20 )
- pgCVIEWP()
- pgSVIEWP( x1, top, right, y2 )
-
-
- ***********************************
- ** Appendix A: FUNCTION SUMMARY **
- ***********************************
-
-
- The following is an alphabetical summary of PGL ToolKit function prototypes.
- The READ.ME file on your distribution diskettes may contain new and/or updated
- function definitions.
-
-
-
- C void pgArc( int x, int y, int rad, int sa, int ea );
- Pascal PROCEDURE pgArc( x, y, rad, sa, ea:integer );
- Basic SUB pgArc( x%, y%, rad%, sa%, ea% )
- Fortran SUBROUTINE pgArc( x, y, rad, sa, ea )
- INTEGER*2 x, y, rad, sa, ea
- Clipper PROCEDURE pgA( x, y, rad, sa, ea )
-
-
- C void pgBMData( int row, int far *data );
- Pascal PROCEDURE pgBMData( row:integer; var data );
- Basic SUB pgBMData( row%, SEG data% )
- Fortran SUBROUTINE pgBMData( row, data )
- INTEGER*2 row, data(n)
- Clipper PROCEDURE pgBMD( row, data )
-
-
- C void pgBMEnd();
- Pascal PROCEDURE pgBMEnd;
- Basic SUB pgBMEnd
- Fortran SUBROUTINE pgBMEnd
- Clipper PROCEDURE pgBMD()
-
-
- C void pgBMInit( int x, int y, int width, int height, int bpp,
- int compflag );
- Pascal PROCEDURE pgBMInit( x, y, width, height, bpp, compflag:integer );
- Basic SUB pgBMInit( x%, y%, width%, height%, bpp%, compflag% )
- Fortran SUBROUTINE pgBMInit( x, y, width, height, bpp, compflag )
- INTEGER*2 x, y, width, height, bpp, compflag
- Clipper PROCEDURE pgBMI( x, y, width, height, bpp, compflag )
-
-
- C void pgCircle( int x, int y, int rad, int fill );
- Pascal PROCEDURE pgCircle( x, y, rad, fill:integer );
- Basic SUB pgCircle( x%, y%, rad%, fill% )
- Fortran SUBROUTINE pgCircle( x, y, rad, fill )
- INTEGER*2 x, y, rad, fill
- Clipper PROCEDURE pgCIR( x, y, rad, fill )
-
-
- C void pgClearDrw( int far *ierr );
- Pascal PROCEDURE pgClearDrw( var ierr:integer );
- Basic SUB pgClearDrw( SEG ierr% )
- Fortran SUBROUTINE pgClearDrw( ierr )
- INTEGER*2 ierr
- Clipper PROCEDURE pgCLEAR( <ref>ierr )
-
-
- C void pgClearViewPort( void );
- Pascal PROCEDURE pgClearViewPort;
- Basic SUB pgClearViewPort
- Fortran SUBROUTINE pgClearViewPort
- Clipper PROCEDURE pgCLEARVP()
-
-
- C void pgDrawText( char far *str );
- Pascal PROCEDURE pgDrawText( str:string );
- Basic SUB pgDrawText( SEG str$ )
- Fortran SUBROUTINE pgDrawText( str )
- CHARACTER*(*) str
- Clipper PROCEDURE pgDT( <expC>str )
-
-
- C void pgDrawTextXY( int x, int y, char far *str );
- Pascal PROCEDURE pgDrawTextXY( x, y:integer; str:string );
- Basic SUB pgDrawTextXY( x%, y%, SEG str$ )
- Fortran SUBROUTINE pgDrawTextXY( x, y, str )
- CHARACTER*(*) str
- INTEGER*2 x, y
- Clipper PROCEDURE pgDTXY( x, y, <expC>str )
-
-
- C void pgEllArc( int x, int y, int xrad, int yrad, int sa,
- int ea );
- Pascal PROCEDURE pgEllArc( x, y, xrad, yrad, sa, ea:integer );
- Basic SUB pgEllArc( x%, y%, xrad%, yrad%, sa%, ea% )
- Fortran SUBROUTINE pgEllArc( x, y, xrad, yrad, sa, ea )
- INTEGER*2 x, y, xrad, yrad, sa, ea
- Clipper PROCEDURE pgELLA( x, y, xrad, yrad, sa, ea )
-
-
- C void pgEllipse( int x, int y, int xrad, int yrad, int fill );
- Pascal PROCEDURE pgEllipse( x, y, xrad, yrad, fill:integer );
- Basic SUB pgEllipse( x%, y%, xrad%, yrad%, fill% )
- Fortran SUBROUTINE pgEllipse( x, y, xrad, yrad, fill )
- INTEGER*2 x, y, xrad, yrad, fill
- Clipper PROCEDURE pgELL( x, y, xrad, yrad, fill )
-
-
- C void pgEndDrw( void );
- Pascal PROCEDURE pgEndDrw;
- Basic SUB pgEndDrw
- Fortran SUBROUTINE pgEndDrw
- Clipper PROCEDURE pgEND()
-
-
- C int pgGetAbsX( void );
- Pascal FUNCTION pgGetAbsX : integer;
- Basic FUNCTION pgGetAbsX%
- Fortran INTEGER*2 FUNCTION pgGetAbsX
- Clipper FUNCTION pgGABSX()
-
-
- C int pgGetAbsY( void );
- Pascal FUNCTION pgGetAbsY : integer;
- Basic FUNCTION pgGetAbsY%
- Fortran INTEGER*2 FUNCTION pgGetAbsY
- Clipper FUNCTION pgGABSY()
-
-
- C int pgGetCharSpacing( void );
- Pascal FUNCTION pgGetCharSpacing : integer;
- Basic FUNCTION pgGetCharSpacing%
- Fortran INTEGER*2 FUNCTION pgGetCharSpacing
- Clipper FUNCTION pgGCHARSP()
-
-
- C void pgGetClipArea( int far *x1, int far *y1,
- int far *x2, int far *y2 );
- Pascal PROCEDURE pgGetClipArea( var x1, y1, x2, y2:integer );
- Basic SUB pgGetClipArea( SEG x1%, SEG y1%, SEG x2%, SEG y2% )
- Fortran SUBROUTINE pgGetClipArea( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
- Clipper PROCEDURE pgGCLIPA( <ref>x1, <ref>y1, <ref>x2, <ref>y2 )
-
-
- C int pgGetClipping( void );
- Pascal FUNCTION pgGetClipping : integer;
- Basic FUNCTION pgGetClipping%
- Fortran INTEGER*2 FUNCTION pgGetClipping
- Clipper FUNCTION pgGCLIP()
-
-
- C int pgGetColor( void );
- Pascal FUNCTION pgGetColor : integer;
- Basic FUNCTION pgGetColor%
- Fortran INTEGER*2 FUNCTION pgGetColor
- Clipper FUNCTION pgGCOLOR()
-
-
- C int pgGetDevColors( int res );
- Pascal FUNCTION pgGetDevColors( res:integer ) : integer;
- Basic FUNCTION pgGetDevColors%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevColors( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDCOLORS( res )
-
-
- C int pgGetDevHeight( void );
- Pascal FUNCTION pgGetDevHeight : integer;
- Basic FUNCTION pgGetDevHeight%
- Fortran INTEGER*2 FUNCTION pgGetDevHeight
- Clipper FUNCTION pgGDHEIGHT()
-
-
- C int pgGetDevMaxX( int res );
- Pascal FUNCTION pgGetDevMaxX( res:integer ) : integer;
- Basic FUNCTION pgGetDevMaxX%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevMaxX( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDMAXX( res )
-
-
- C int pgGetDevMaxY( int res );
- Pascal FUNCTION pgGetDevMaxY( res:integer ) : integer;
- Basic FUNCTION pgGetDevMaxY%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevMaxY( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDMAXY( res )
-
-
- C int pgGetDevModes( void );
- Pascal FUNCTION pgGetDevModes : integer;
- Basic FUNCTION pgGetDevModes%
- Fortran INTEGER*2 FUNCTION pgGetDevModes
- Clipper FUNCTION pgGDMODES()
-
-
- C int pgGetDevOffsetX( void );
- Pascal FUNCTION pgGetDevOffsetX : integer;
- Basic FUNCTION pgGetDevOffsetX%
- Fortran INTEGER*2 FUNCTION pgGetDevOffsetX
- Clipper FUNCTION pgGDOFFX()
-
-
- C int pgGetDevOffsetY( void );
- Pascal FUNCTION pgGetDevOffsetY : integer;
- Basic FUNCTION pgGetDevOffsetY%
- Fortran INTEGER*2 FUNCTION pgGetDevOffsetY
- Clipper FUNCTION pgGDOFFY()
-
-
- C int pgGetDevPlanes( int res );
- Pascal FUNCTION pgGetDevPlanes( res:integer ) : integer;
- Basic FUNCTION pgGetDevPlanes%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevPlanes( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDPLANES( res )
-
-
- C int pgGetDevResX( int res );
- Pascal FUNCTION pgGetDevResX( res:integer ) : integer;
- Basic FUNCTION pgGetDevResX%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevResX( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDRESX( res )
-
-
- C int pgGetDevResY( int res );
- Pascal FUNCTION pgGetDevResY( res:integer ) : integer;
- Basic FUNCTION pgGetDevResY%( res% )
- Fortran INTEGER*2 FUNCTION pgGetDevResY( res )
- INTEGER*2 res
- Clipper FUNCTION pgGDRESY( res )
-
-
- C int pgGetDevType( void );
- Pascal FUNCTION pgGetDevType : integer;
- Basic FUNCTION pgGetDevType%
- Fortran INTEGER*2 FUNCTION pgGetDevType
- Clipper FUNCTION pgGDTYPE()
-
-
- C int pgGetDevWidth( void );
- Pascal FUNCTION pgGetDevWidth : integer;
- Basic FUNCTION pgGetDevWidth%
- Fortran INTEGER*2 FUNCTION pgGetDevWidth
- Clipper FUNCTION pgGDWIDTH()
-
-
- C int pgGetFillMode( void );
- Pascal FUNCTION pgGetFillMode : integer;
- Basic FUNCTION pgGetFillMode%
- Fortran INTEGER*2 FUNCTION pgGetFillMode
- Clipper FUNCTION pgGFMODE()
-
-
- C void pgGetFillPattern( char far *fpat, int far *color );
- Pascal PROCEDURE pgGetFillPattern( var fpat; var color:integer );
- Basic SUB pgGetFillPattern( SEG fpat%, SEG color% )
- Fortran SUBROUTINE pgGetFillPattern( fpat, color )
- CHARACTER*1 fpat(8)
- INTEGER*2 color
- Clipper PROCEDURE pgGFPAT( <ref>fpat, <ref>color )
-
-
- C void pgGetFillStyle( int far *style, int far *color );
- Pascal PROCEDURE pgGetFillStyle( var style, color:integer );
- Basic SUB pgGetFillStyle( SEG style%, SEG color% )
- Fortran SUBROUTINE pgGetFillStyle( style, color )
- INTEGER*2 style, color
- Clipper PROCEDURE pgGFSTYLE( <ref>style, <ref>color )
-
-
- C void pgGetLinePattern( int far *mask, int far *thickness );
- Pascal PROCEDURE pgGetLinePattern( var mask, thickness:integer );
- Basic SUB pgGetLinePattern( SEG mask%, SEG thickness% )
- Fortran SUBROUTINE pgGetLinePattern( mask, thickness )
- INTEGER*2 mask, thickness
- Clipper PROCEDURE pgGLPAT( <ref>mask, <ref>thickness )
-
-
- C void pgGetLineStyle( int far *lstyle, int far *thickness );
- Pascal PROCEDURE pgGetLineStyle( var lstyle, thickness:integer );
- Basic SUB pgGetLineStyle( SEG lstyle%, SEG thickness% )
- Fortran SUBROUTINE pgGetLineStyle( lstyle, thickness )
- INTEGER*2 lstyle, thickness
- Clipper PROCEDURE pgGLSTYLE( <ref>lstyle, <ref>thickness )
-
-
- C int pgGetLineWeight( void );
- Pascal FUNCTION pgGetLineWeight : integer;
- Basic FUNCTION pgGetLineWeight%
- Fortran INTEGER*2 FUNCTION pgGetLineWeight
- Clipper FUNCTION pgGLWGT()
-
-
- C int pgGetMaxX( void );
- Pascal FUNCTION pgGetMaxX : integer;
- Basic FUNCTION pgGetMaxX%
- Fortran INTEGER*2 FUNCTION pgGetMaxX
- Clipper FUNCTION pgGMAXX()
-
-
- C int pgGetMaxY( void );
- Pascal FUNCTION pgGetMaxY : integer;
- Basic FUNCTION pgGetMaxY%
- Fortran INTEGER*2 FUNCTION pgGetMaxY
- Clipper FUNCTION pgGMAXY()
-
-
- C int pgGetStatus( void );
- Pascal FUNCTION pgGetStatus : integer;
- Basic FUNCTION pgGetStatus%
- Fortran INTEGER*2 FUNCTION pgGetStatus
- Clipper FUNCTION pgSTATUS()
-
-
- C int pgGetTextBolding( void );
- Pascal FUNCTION pgGetTextBolding : integer;
- Basic FUNCTION pgGetTextBolding%
- Fortran INTEGER*2 FUNCTION pgGetTextBolding
- Clipper FUNCTION pgGTBOLD()
-
-
- C int pgGetTextHeight( void );
- Pascal FUNCTION pgGetTextHeight : integer;
- Basic FUNCTION pgGetTextHeight%
- Fortran INTEGER*2 FUNCTION pgGetTextHeight
- Clipper FUNCTION pgGTHGT()
-
-
- C void pgGetTextJustify( int far *hor, int far *vert );
- Pascal PROCEDURE pgGetTextJustify( var hor, vert:integer );
- Basic SUB pgGetTextJustify( SEG hor%, SEG vert% )
- Fortran SUBROUTINE pgGetTextJustify( hor, vert )
- INTEGER*2 hor, vert
- Clipper PROCEDURE pgGTJUST( <ref>hor, <ref>vert )
-
-
- C int pgGetTextLength( char far *str );
- Pascal FUNCTION pgGetTextLength( str:string ) : integer;
- Basic FUNCTION pgGetTextLength%( SEG str$ )
- Fortran INTEGER*2 FUNCTION pgGetTextLength( str )
- CHARACTER*(*) str
- Clipper FUNCTION pgGTLEN( <expC>str )
-
-
- C void pgGetTextOrient( int far *x, int far *y );
- Pascal PROCEDURE pgGetTextOrient( var x, y:integer );
- Basic SUB pgGetTextOrient( SEG x%, SEG y% )
- Fortran SUBROUTINE pgGetTextOrient( x, y )
- INTEGER*2 x, y
- Clipper PROCEDURE pgGTORIEN( <ref>x, <ref>y )
-
-
- C void pgGetTextScaling( int far *mx, int far *dx,
- int far *my, int far *dy );
- Pascal PROCEDURE pgGetTextScaling( var mx, dx, my, dy:integer );
- Basic SUB pgGetTextScaling( SEG mx%, SEG dx%, SEG my%, SEG dy% )
- Fortran SUBROUTINE pgGetTextScaling( mx, dx, my, dy )
- INTEGER*2 mx, dx, my, dy
- Clipper PROCEDURE pgGTSCALE( <ref>mx, <ref>dx, <ref>my, <ref>dy)
-
-
- C int pgGetTextStyle( void );
- Pascal FUNCTION pgGetTextStyle : integer;
- Basic FUNCTION pgGetTextStyle%
- Fortran INTEGER*2 FUNCTION pgGetTextStyle
- Clipper FUNCTION pgGTSTYLE()
-
-
- C void pgGetViewPort( int far *x1, int far *y1,
- int far *x2, int far *y2 );
- Pascal PROCEDURE pgGetViewPort( var x1, y1, x2, y2:integer );
- Basic SUB pgGetViewPort( SEG x1%, SEG y1%, SEG x2%, SEG y2% )
- Fortran SUBROUTINE pgGetViewPort( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
- Clipper PROCEDURE pgGVIEWP( <ref>x1, <ref>y1, <ref>x2, <ref>y2 )
-
-
- C int pgGetX( void );
- Pascal FUNCTION pgGetX : integer;
- Basic FUNCTION pgGetX%
- Fortran INTEGER*2 FUNCTION pgGetX
- Clipper FUNCTION pgGX()
-
-
- C int pgGetY( void );
- Pascal FUNCTION pgGetY : integer;
- Basic FUNCTION pgGetY%
- Fortran INTEGER*2 FUNCTION pgGetY
- Clipper FUNCTION pgGY()
-
-
- C void pgInitDrw( char far *file, int wid, int hgt,
- int far *ierr );
- Pascal PROCEDURE pgInitDrw( file:string; wid, hgt:integer;
- var ierr:integer )
- Basic SUB pgInitDrw( SEG file$, wid%, hgt%, SEG ierr% )
- Fortran SUBROUTINE pgInitDrw( file, wid, hgt, ierr )
- CHARACTER*(*) file
- INTEGER*2 wid, hgt, ierr
- Clipper PROCEDURE pgINIT( <expC>file, wid, hgt, <ref>ierr )
-
-
- C void pgLine( int x1, int y1, int x2, int y2 );
- Pascal PROCEDURE pgLine( x1, y1, x2, y2:integer );
- Basic SUB pgLine( x1%, y1%, x2%, y2% )
- Fortran SUBROUTINE pgLine( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
- Clipper PROCEDURE pgLIN( x1, y1, x2, y2 )
-
-
- C void pgLineRel( int dx, int dy );
- Pascal PROCEDURE pgLineRel( dx, dy:integer );
- Basic SUB pgLineRel( dx%, dy% )
- Fortran SUBROUTINE pgLineRel( dx, dy )
- INTEGER*2 dx, dy
- Clipper PROCEDURE pgLINREL( dx, dy )
-
-
- C void pgLineTo( int x, int y );
- Pascal PROCEDURE pgLineTo( x, y:integer );
- Basic SUB pgLineTo( x%, y% )
- Fortran SUBROUTINE pgLineTo( x, y )
- INTEGER*2 x, y
- Clipper PROCEDURE pgLINTO( x, y )
-
-
- C int pgLoadDevInfo( char far *dev );
- Pascal FUNCTION pgLoadDevInfo( dev:string ) : integer;
- Basic FUNCTION pgLoadDevInfo%( SEG dev$ )
- Fortran INTEGER*2 FUNCTION pgLoadDevInfo( dev )
- CHARACTER*(*) dev
- Clipper FUNCTION pgLDINFO( <expC>dev )
-
-
- C void pgMoveRel( int dx, int dy );
- Pascal PROCEDURE pgMoveRel( dx, dy:integer );
- Basic SUB pgMoveRel( dx%, dy% )
- Fortran SUBROUTINE pgMoveRel( dx, dy )
- INTEGER*2 dx, dy
- Clipper PROCEDURE pgMOVREL( dx, dy )
-
-
- C void pgMoveTo( int x, int y );
- Pascal PROCEDURE pgMoveTo( x, y:integer );
- Basic SUB pgMoveTo( x%, y% )
- Fortran SUBROUTINE pgMoveTo( x, y )
- INTEGER*2 x, y
- Clipper PROCEDURE pgMOVTO( x, y )
-
-
- C void pgNewPage( void );
- Pascal PROCEDURE pgNewPage;
- Basic SUB pgNewPage
- Fortran SUBROUTINE pgNewPage
- Clipper PROCEDURE pgNEWPG()
-
-
- C void pgOpenDrw( char far *fname, int far *ierr );
- Pascal PROCEDURE pgOpenDrw( fname:string; var ierr:integer );
- Basic SUB pgOpenDrw( SEG fname$, SEG ierr% )
- Fortran SUBROUTINE pgOpenDrw( fname, ierr )
- CHARACTER*(*) fname
- INTEGER*2 ierr
- Clipper PROCEDURE pgOPEN( <expC>fname, <ref>ierr )
-
-
- C void pgPie( int x, int y, int rad, int sa, int ea, int fill );
- Pascal PROCEDURE pgPie( x, y, rad, sa, ea, fill:integer );
- Basic SUB pgPie( x%, y%, rad%, sa%, ea%, fill% )
- Fortran SUBROUTINE pgPie( x, y, rad, sa, ea, fill )
- INTEGER*2 x, y, rad, sa, ea, fill
- Clipper PROCEDURE pgPI( x, y, rad, sa, ea, fill )
-
-
- C void pgPolygon( int far *data, int numpoints, int fill );
- Pascal PROCEDURE pgPolygon( var data; numpoints, fill:integer );
- Basic SUB pgPolygon( SEG data%, numpoints%, fill% )
- Fortran SUBROUTINE pgPolygon( data, numpoints, fill )
- INTEGER*2 data(n), numpoints, fill
- Clipper PROCEDURE pgPOLYGN( data, numpoints, fill )
-
-
- C void pgPolyLine( int far *data, int numpoints );
- Pascal PROCEDURE pgPolyLine( var data; numpoints:integer );
- Basic SUB pgPolyLine( SEG data%, numpoints% )
- Fortran SUBROUTINE pgPolyLine( data, numpoints )
- INTEGER*2 data(n), numpoints
- Clipper PROCEDURE pgPOLYLN( polydata, numpoints )
-
-
- C void pgRectangle( int x1, int y1, int x2, int y2, int fill );
- Pascal PROCEDURE pgRectangle( x1, y1, x2, y2, fill:integer );
- Basic SUB pgRectangle( x1%, y1%, x2%, y2%, fill% )
- Fortran SUBROUTINE pgRectangle( x1, y1, x2, y2, fill )
- INTEGER*2 x1, y1, x2, y2, fill
- Clipper PROCEDURE pgRECT( x1, y1, x2, y2, fill )
-
-
- C void pgSector( int x, int y, int xrad, int yrad, int sa,
- int ea, int fill );
- Pascal PROCEDURE pgSector( x, y, xrad, yrad, sa, ea, fill:integer );
- Basic SUB pgSector( x%, y%, xrad%, yrad%, sa%, ea%, fill% )
- Fortran SUBROUTINE pgSector( x, y, xrad, yrad, sa, ea, fill )
- INTEGER*2 x, y, xrad, yrad, sa, ea, fill
- Clipper PROCEDURE pgSECT( x, y, xrad, yrad, sa, ea, fill )
-
-
- C void pgSetCharSpacing( int space );
- Pascal PROCEDURE pgSetCharSpacing( space:integer );
- Basic SUB pgSetCharSpacing( space% )
- Fortran SUBROUTINE pgSetCharSpacing( space )
- INTEGER*2 space
- Clipper PROCEDURE pgSCHARSP( space )
-
-
- C void pgSetClipArea( int x1, int y1, int x2, int y2 );
- Pascal PROCEDURE pgSetClipArea( x1, y1, x2, y2:integer );
- Basic SUB pgSetClipArea( x1%, y1%, x2%, y2% )
- Fortran SUBROUTINE pgSetClipArea( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
- Clipper PROCEDURE pgSCLIPA( x1, y1, x2, y2 )
-
-
- C void pgSetClipping( int flag );
- Pascal PROCEDURE pgSetClipping( flag:integer );
- Basic SUB pgSetClipping( flag% )
- Fortran SUBROUTINE pgSetClipping( flag )
- INTEGER*2 flag
- Clipper PROCEDURE pgSCLIP( flag )
-
-
- C void pgSetColor( int color );
- Pascal PROCEDURE pgSetColor( color:integer );
- Basic SUB pgSetColor( color% )
- Fortran SUBROUTINE pgSetColor( color )
- INTEGER*2 color
- Clipper PROCEDURE pgSCOLOR( color )
-
-
- C void pgSetDefaults( void );
- Pascal PROCEDURE pgSetDefaults;
- Basic SUB pgSetDefaults
- Fortran SUBROUTINE pgSetDefaults
- Clipper PROCEDURE pgSDEFAULT()
-
-
- C void pgSetFillMode( int mode );
- Pascal PROCEDURE pgSetFillMode( mode:integer );
- Basic SUB pgSetFillMode( mode% )
- Fortran SUBROUTINE pgSetFillMode( mode )
- INTEGER*2 mode
- Clipper PROCEDURE pgSFMODE( mode )
-
-
- C void far pgSetFillPattern( char far *pattern, int fcolor );
- Pascal PROCEDURE pgSetFillPattern( var pattern, fcolor:integer );
- Basic SUB pgSetFillPattern( SEG pattern%, fcolor% )
- Fortran SUBROUTINE pgSetFillPattern( pattern, fcolor )
- CHARACTER*1 pattern(8)
- INTEGER*2 fcolor
- Clipper PROCEDURE pgSFPAT( pattern, fcolor )
-
-
- C void pgSetFillStyle( int style, int color );
- Pascal PROCEDURE pgSetFillStyle( style, color:integer );
- Basic SUB pgSetFillStyle( style%, color% )
- Fortran SUBROUTINE pgSetFillStyle( style, color )
- INTEGER*2 style, color
- Clipper PROCEDURE pgSFSTYLE( style, color )
-
-
- C void pgSetLinePattern( int pattern, int thickness );
- Pascal PROCEDURE pgSetLinePattern( pattern, thickness:integer );
- Basic SUB pgSetLinePattern( pattern%, thickness% )
- Fortran SUBROUTINE pgSetLinePattern( pattern, thickness )
- INTEGER*2 pattern, thickness
- Clipper PROCEDURE pgSLPAT( pattern, thickness )
-
-
- C void pgSetLineStyle( int style, int thickness );
- Pascal PROCEDURE pgSetLineStyle( style, thickness:integer );
- Basic SUB pgSetLineStyle( style%, thickness% )
- Fortran SUBROUTINE pgSetLineStyle( style, thickness )
- INTEGER*2 style, thickness
- Clipper PROCEDURE pgSLSTYLE( style, thickness )
-
-
- C void pgSetLineWeight( int weight );
- Pascal PROCEDURE pgSetLineWeight( weight:integer );
- Basic SUB pgSetLineWeight( weight% )
- Fortran SUBROUTINE pgSetLineWeight( weight )
- INTEGER*2 weight
- Clipper PROCEDURE pgSLWGT( weight )
-
-
- C void pgSetPageForm( int form );
- Pascal PROCEDURE pgSetPageForm( form:integer );
- Basic SUB pgSetPageForm( form% )
- Fortran SUBROUTINE pgSetPageForm( form )
- INTEGER*2 form
- Clipper PROCEDURE pgSPFORM( form )
-
-
- C void pgSetPageMargins( int left, int top,
- int right, int bottom );
- Pascal PROCEDURE pgSetPageMargins( left, top, right, bottom:integer );
- Basic SUB pgSetPageMargins( left%, top%, right%, bottom% )
- Fortran SUBROUTINE pgSetPageMargins( left, top, right, bottom )
- INTEGER*2 left, top, right, bottom
- Clipper PROCEDURE pgSPMARGIN( left, top, right, bottom )
-
-
- C void pgSetPageSize( int size );
- Pascal PROCEDURE pgSetPageSize( size:integer );
- Basic SUB pgSetPageSize( size% )
- Fortran SUBROUTINE pgSetPageSize( size )
- INTEGER*2 size
- Clipper PROCEDURE pgSPSIZE( size )
-
-
- C void pgSetPalette( int index, int color );
- Pascal PROCEDURE pgSetPalette( index, color:integer );
- Basic SUB pgSetPalette( index%, color% )
- Fortran SUBROUTINE pgSetPalette( index, color )
- INTEGER*2 index, color
- Clipper PROCEDURE pgSPAL( index, color )
-
-
- C void pgSetPixel( int x, int y, int color );
- Pascal PROCEDURE pgSetPixel( x, y, color:integer );
- Basic SUB pgSetPixel( x%, y%, color% )
- Fortran SUBROUTINE pgSetPixel( x, y, color )
- INTEGER*2 x, y, color
- Clipper PROCEDURE pgSETPIX( x, y, color )
-
-
- C void pgSetRgbPalette( int index, int red, int green, int blue );
- Pascal PROCEDURE pgSetRgbPalette( index, red, green, blue:integer );
- Basic SUB pgSetRgbPalette( index%, red%, green%, blue% )
- Fortran SUBROUTINE pgSetRgbPalette( index, red, green, blue )
- INTEGER*2 index, red, green, blue
- Clipper PROCEDURE pgSRGB( index, red, green, blue )
-
-
- C void pgSetTextBolding( int bold );
- Pascal PROCEDURE pgSetTextBolding( bold:integer );
- Basic SUB pgSetTextBolding( bold% )
- Fortran SUBROUTINE pgSetTextBolding( bold )
- INTEGER*2 bold
- Clipper PROCEDURE pgSTBOLD( bold )
-
-
- C void pgSetTextJustify( int horiz, int vert );
- Pascal PROCEDURE pgSetTextJustify( horiz, vert:integer );
- Basic SUB pgSetTextJustify( horiz%, vert% )
- Fortran SUBROUTINE pgSetTextJustify( horiz, vert )
- INTEGER*2 horiz, vert
- Clipper PROCEDURE pgSTJUST( horiz, vert )
-
-
- C void pgSetTextOrient( int x, int y );
- Pascal PROCEDURE pgSetTextOrient( x, y:integer );
- Basic SUB pgSetTextOrient( x%, y% )
- Fortran SUBROUTINE pgSetTextOrient( x, y )
- INTEGER*2 x, y
- Clipper PROCEDURE pgSTORIEN( x, y )
-
-
- C void pgSetTextScaling( int mx, int dx, int my, int dy );
- Pascal PROCEDURE pgSetTextScaling( mx, dx, my, dy:integer );
- Basic SUB pgSetTextScaling( mx%, dx%, my%, dy% )
- Fortran SUBROUTINE pgSetTextScaling( mx, dx, my, dy )
- INTEGER*2 mx, dx, my, dy
- Clipper PROCEDURE pgSTSCALE( mx, dx, my, dy )
-
-
- C void pgSetTextStyle( int fontstyle );
- Pascal PROCEDURE pgSetTextStyle( fontstyle:integer );
- Basic SUB pgSetTextSyle( fontstyle% )
- Fortran SUBROUTINE pgSetTextStyle( fontstyle )
- INTEGER*2 fontstyle
- Clipper PROCEDURE pgSTSTYLE( fontstyle )
-
-
- C void pgSetViewPort( int x1, int y1, int x2, int y2 );
- Pascal PROCEDURE pgSetViewPort( x1, y1, x2, y2:integer );
- Basic SUB pgSetViewPort( x1%, y1%, x2%, y2% )
- Fortran SUBROUTINE pgSetViewPort( x1, y1, x2, y2 )
- INTEGER*2 x1, y1, x2, y2
- Clipper PROCEDURE pgSVIEWP( x1, y1, x2, y2 )
-