This directory contains the device independent graphics, device drivers and graphics file manager used by PIC. The .OBJ files for the drivers are present so if you need to recreate a new version of the driver, you can link it to piclib.olb and the respective graphics library. The file "makefile" is set up do so already; you will need to make sure that the logicals that point to the graphics libraries are in accordance with your system's environment. DDHP7221.MOD source for driver for hp7221 B|T plotters DDHP7475.MOD source for driver for hp7475 plotters DDHP7550.MOD source for driver for hp7550 plotters DDRGL.MOD source for driver for vt125 (or vt240 & 241 ) DDTEK.MOD **EXPERIMENTAL** source for driver for tektronics plotters using plot10. DDTERM.MOD source to program to look at graphic files generated by PIC DIG.DEF Definition module for Device Independent Graphics package. DIG.MOD Implementation module for Device Independent Graphics package. DIG.SYM symbol file generated by the Modula-2 compiler F.F Contains a form feed FORSYMB.FOR fortran interface between DIG and hp plot21 package for hp7221 GFILEMANA.DEF Definition module GFILEMANA.MOD Implementation module GFILEMANA.SYM Symbol file generated by the compiler HP7221.DEF FOREIGN definition module to interface with the fortran hp plot21 package supplied by HP HP7221.SYM The symbol file HPISP.DEF FOREIGN definition module to interface with the fortran hp ISPP package supplied by HP HPISP.SYM The symbol file MAKEFILE.COM command procedure to generate just the device drivers from .OBJ files. RGL.DEF FOREIGN definition module to interface with the fortran regal package supplied by DEC RGL.SYM The symbol file TEK.DEF FOREIGN definition module to interface with the fortran plot10 package supplied by tektronics TEK.SYM the symbol file TEST.MOD A test program to generate characters. TY.COM Command file to type all the .def and .mod files Graphics Device Drivers. ------------------------ The Graphics drivers (DD*.MOD) are all written in Modula-2. They read the binary file generated by PIC and invoke the device dependent plotting instructions to carry out the actual plotting. The contents of the binary file have the following syntax: .... .... .. .. .. .. *EOG Each keyword is made up of 4 characters ( PACKED ARRAY [1..4] OF CHAR ). The type and number of values dependents upon the graphics instruction indicated by the keyword. Here are all the possible keywords the values that follow it. The text within (* .. and *) serves as explanationon; it is not a part of the values. INIT baudrate (* Initialize device. "baudrate" is an integer which for tektronics plotters specifies the baudrate and for 7221 plotters, the pen speed. *) ERAS (* Erase the graphics surface. *) WIND lowerx,lowery,upperx,uppery (* specifies the hard limit, e.g, paper size, for the plotter. *) MAPW xmin,ymin,xmax,ymax (* Map the hard limit frame with these ranges. *) MOVE x,y (* Move to x,y with pen up. *) DRAW x,y (* Draw to x,y with pen down. *) PLIN pcount,x[1],y[1],...,x[pcount],y[pcount] (* connect x[1],y[1] thru x[pcount],y[pcount] with line of current line pattern. "pcount" is an integer that indicate how many x,y pairs are present. *) LPAT SOLI|DASH|DOTT (* Set line pattern to solid, dashed or dotted. *) FONT HARD|ROMA|STIC|SCRI|GOTH (* Select one of the 5 fonts available in PLOT21 package for the HP7221 plotters. *) CSIZ cht,cwid,slant,hindex,vindex (* Set Character size: charhite, charwidth, slant. hindex and vindex are integers that specify the sizes in terms of either vt125 regis or tek plot10. *) COLO BLAC|BLUE|GREE|REDD (* Pen color to select. *) LORG 3|6|9 (* Label origin for generating text strings. The following example indicates what is desired: suppose the text to be plotted is HELLO and x,y are the coordinates specified by the following TEXT command. LORG 3 means (top) left justify HELLO about x,y LORG 6 means (top) center justify HELLO about x,y LORG 9 means (top) right justify HELLO about x,y 3 6 9 v v v HELLO The character position about x,y is as follows: for LORG=3 | ---+----- |A | i.e, the base line is on top of the characters. *) TEXT x,y,rotation,charcount,80 bytes string (* x,y specifies the location, rotation in degrees about the horizontal, charcount is an integer specifying the number of characters to actually plot out of the 80 bytes that follow. *) *EOG (* Always the LAST keyword signifying the end of file. *) You can use DDTERM to look at the contents of the binary file. The driver program can be written in FORTRAN also. Fortran read can read binary files,e.g READ(03) will do binary reads from file code 03. So the data structures needed and the read statements for reading the TEXT command: TEXT x,y,rotation,charcount,80 bytes string will be: CHARACTER*4 keyword REAL x, y, rotation INTEGER charcount CHARACTER*80 string .. .. .. READ(03) keyword .. IF( keyword .eq. 'TEXT' ) THEN READ(03) x, y, rotation, charcount, string CALL Symbol( x, y, rotation, string, charcount.... ) ELSE IF... .. The Modula-2 sources for the drivers can serve as an example for writting a new driver. If you do write a new driver, I will appreciate if you could send me copy of it. The compiled form of the drivers are present here as .OBJ files. The MAKEFILE.COM can be used to link them to the respective graphics libraries. Because of copyright agreements, I cannot include the .EXE files for the drivers. You'll have to link the .OBJ files to the libraries you have at your installation. For example, the driver DDHP7221 requires routines which HP supplies in their HP PLOT21 graphics package for the HP 7221 series plotters. DDHP7475 and DDHP7550 currently rely on the HP ISPP plotting package. But because the plotters themselves recognize the fairly powerful HP-GL instructions, the drivers for all such HP plotters can be written with the need of a package. Instead of calling the "SYMBOL" routine for example, the "LB" instruction can be used. As a matter of fact, a number of tasks in DDHP7475 and DDHP7550 are performed by invoking the routine "Buf" which essentially sends the HP-GL instructions stored in either the "IBUG" or "XBUF" array. So if your have the HP plotters that recognize the HP-GL instructions, you can modify the modula-2 source. If you don't have modula-2, you can rewrite the driver in FORTRAN or PASCAL, and send HP-GL commands instead of HP ISPP. If you have the HP's DGL or AGP packages, you can use those. Keep in mind that you would need to create the FOREIGN DEFINITION modules for these packages so that the routines can be invoked from modula-2.