This directory holds a graphics output driver for Amulet. It is a quick hack that lets a selected window (actually any object that holds graphical objects, but usually a window) be output to a CGM, Postscript, or HPGL file. The actual graphics driver is provided by the RALCGM software, which is present in a subdirectory. RALCGM may be freely used EXCEPT in commercial applications - if in doubt, read the copyright notice and contact the RALCGM developers yourself. RALCGM came from: ftp//ftp.cc.rl.ac.uk/pub/graphics/ralcgm/unix/ralcgm-3.50.tar.Z These instructions are for OpenVMS, but Unix and Windows should be similar (somebody else write the makefiles. It may be a bit of a challenge on the Mac - you won't be able to build a version that writes CGM to your screen, but you can still build the pieces you need for a graphics driver for Amulet.) Obtain the RALCGM distribution and unpack it into a [.ralcgm] subdirectory. You will need it for font lists for postscript output, for instance. Then overwrite that with the contents of [.ralcgm_pieces...] - modifying the RALCGM distribution. OpenVMS commands $ copy [.ralcgm_pieces.src]*.* [.ralcgm.src] $ copy [.ralcgm_pieces.include]*.* [.ralcgm.include] $ copy [.ralcgm_pieces]*.* [.ralcgm] Unix would be % cp -R ./ralcgm_pieces ./ralcgm Go to the top level of the RALCGM distribution and build whatever graphics options you need, but at the very least, get all of the fonts and so forth built, and have the CGMDATA and CGMMENUFONT environmental variables set up. Actually, the CGM output types will work without the fonts, but Postscript output will crash. Then build the amulet specific versions (different defines) OpenVMS would be $ @gen_ralcgm.com Unix would be % cgmconfig Windows/Mac, well, try figuring out what the OpenVMS/Unix variants are doing and replicate it. There are some example CGM files in [.examples] which you can send to your X11 console (OpenVMS/Unix) or render to postscript and print (all platforms). All example files should come out ok. Example: $ ralcgm [.examples]CA.CGM (to the default device) $ ralcgm [.examples]CA.CGM -p ca.ps (postscript, to a file) Move the working binaries someplace safe. Next clean out the existing object library, and make one specifically for use with AMULET, the AMULET executables will live in the top part of ralcgm, the more general ralcgm executables will live in [.bin]. $ delete [.bin]ralcgm.olb. Now build the version that will be a graphics driver for Amulet, which writes to CGM, Postscript, and HPGL devices only. In the top RALCGM directory do: $ @make_vms.com (OpenVMS) or, for Unix, Windows, Mac write a makefile that does what make_vms.com does, then run it. After RALCGM builds, step up one level, and build the test program: $ @make_vms_shared.com (OpenVMS) or, for Unix, Windows, Mac write a makefile that does what make_vms.com does, then run it. The test program puts examples of every Amulet graphic type into a window, and then lets you save them to different format output files. Note that POSTSCRIPT and HPGL can have some options set via the environmental variables CGMPSOPT and CGMHPGLOPT. These are single character variables. Presented here in (mostly) mutually exclusive pairs (the second one is the default), for postscript the options are C Colour PostScript (even images can be color) M Monochrome PostScript (everything but images can still be color) E Encapsulated PostScript (EPSF) N Normal PostScript V Switch Border On I Make Border Transparent L Set Paper to be Landscape P Set Paper to be Portrait F Handle Background colour (probably if you set this, and have a black background, you get solid black paper.) B Ignore Background colour D Decompose polygon if complex W Polygon always sent as whole Q,1,2,3,4,5,6,7,8,9 Beats me, some sort of device redirector The HPGL options are (again in pairs, but I have no idea which are the defaults): 3 Set papersize to A3 4 Set papersize to A4 L Set Paper to be Landscape P Set Paper to be Portrait N Set not to put out printer control codes C Set to put out printer control codes A Set to automatic page feed M Set to manual page feed This first version of the software just builds regular libraries, not shareable libraries, so the executable is about 500 Kbytes larger than it needs to be. Files in this distribution are: aaa_readme.txt this file cgm.binary example file in cgm binary format cgm_binary.uu example file in cgm binary format, uuencoded cgm.clear example file in cgm clear format cgm.ps example file in postscript format (color) make_vms_shared.com build procedure for VMS save_graphics.cc save_graphics module test_save_graphics.cc test program for save_graphics thekids.gif test image to use The [.ralcgm...] pieces are assorted modifications needed to build ralcgm with Amulet (or at all, for OpenVMS). The blah.*_dist files are the originals from the 3.50 distribution, and the blah.* are the modified ones. On Unix, these will overwrite the originals, hence the _dist files. [.ralcgm_pieces]aaa_notes.txt [.ralcgm_pieces]gen_ralcgm.com [.ralcgm_pieces]mach.h [.ralcgm_pieces]make_vms.com [.ralcgm_pieces.examples]make_vms.com [.ralcgm_pieces.include]cgmin.h [.ralcgm_pieces.include]cgmin.h_dist [.ralcgm_pieces.include]cgminit.h [.ralcgm_pieces.include]cgminit.h_dist [.ralcgm_pieces.include]cgminit_frag.h [.ralcgm_pieces.include]cgmlib.h [.ralcgm_pieces.include]cgmlib.h_dist [.ralcgm_pieces.include]cgmmach.h [.ralcgm_pieces.include]cgmmach.h_dist [.ralcgm_pieces.include]cgmout.h [.ralcgm_pieces.include]cgmout.h_dist [.ralcgm_pieces.include]mach.h [.ralcgm_pieces.src]cgmfile.c [.ralcgm_pieces.src]cgmfile.c_dist [.ralcgm_pieces.src]cgmlib.c [.ralcgm_pieces.src]cgmlib.c_dist [.ralcgm_pieces.src]cgmmain.c [.ralcgm_pieces.src]cgmmain.c_dist [.ralcgm_pieces.src]cgmochar.c [.ralcgm_pieces.src]cgmochar.c_dist [.ralcgm_pieces.src]cgmohpgl.c [.ralcgm_pieces.src]cgmohpgl.c_dist [.ralcgm_pieces.src]cgmoxw.c [.ralcgm_pieces.src]cgmoxw.c_dist [.ralcgm_pieces.src]cgmrand.c [.ralcgm_pieces.src]cgmrand.c_dist [.ralcgm_pieces.src]cgmtrap.c [.ralcgm_pieces.src]cgmtrap.c_dist David Mathog mathog@seqaxp.bio.caltech.edu Manager, sequence analysis facility, biology division, Caltech 3-JUL-1997