PROGRAM RASTER C C This is the root section of the general purpose raster generation C program. One or several input files, containing coded vector lists, C are entered, and each file may be scaled and offsetted and then C plotted on one many vector oriented devices or raster oriented C devices. C C For more information on this program's use, see the HELP files. C For more info on the raster generation, see RASGEN, the C rasterization (is that a word?) subroutine (its commented to death). C For information on the device independant graphics routines used at C Michigan State University, see the subroutine VECTOR, part of the C MSULIB library (RASGEN also describes the calls from VECTOR). C C This package was written with the intention that adding new printers C would be a fairly easy task. The user interface (subroutine INPUT) C should set up the device number, and RASTER will call the added driver C subroutine. See the existing driver subroutines - they are very much the C same, letting RASGEN do all the hard work. New printers will require C a subroutine to pack the raster data into print buffers, after which C it is a simple matter to send the print buffer to the printer. C C All vectors received by RASGEN are assumed to be in inches, with the C origin in the lower left corner of the paper. The width of the paper C is the Y axis (11-12 inches, depending on the printer) and the long axis C of the paper is the X coordinate. This allows an almost infinate length C graph (limited by problems with integers - ie 32767 divided by the C nibs/inch in the X direction. For the Printronix (72 nibs/inch in X), C the maximum length of paper is 32767 / 72 = ~455 inches. Long enough.) C C The raster buffer actually comes in two parts - a series of pointers C and the buffer itself. The buffer is orginized so that the low bit of C the first byte is the (0,0) bit in that band or window. The most C significant bit of the first byte is the eighth bit from the edge of the C paper. The low bit of the second byte will be the nineth bit, and so on. C So one row of dots is described by a series of bytes, and the next row C by another series, etc. Each series of bytes is pointed to by a pointer C from the first part of the common region. This pointer is an X offset C into the buffer, to find the line of dots we need to operate on. C C PAPER LAYOUT: C C ========================================================================== C (0,11). (n,11) . C C C C C ^ C | C Y C C C C C (0,0) . X--> (n,0) . C ========================================================================== C | | | | C raster band or window 1 #2 #3 etc C C C C Overlay tree: C C |-------INIT-INPUT-VECTOR C | C | C | |------RASGEN C |-------IDS (driver program)----| C | IDSRAS (raster buffer) |------IDSOUT (output) C RASTER.FTN -----| C RASTER.COM | C | |------RASGEN C |-------PTX (driver program)----| C | PTXRAS (raster buffer) |------PTXOUT (output) C | C | C | |------RASGEN C |-------VERS (driver program)---| C | VERRAS (raster buffer) |------VEROUT (output) C | C | C | C |-------others ??? C C C C Questions, comments, problems, bugs? C C Please contact me: Hugh Gregg C Physiology or Chemistry Department C Michigan State University C E. Lansing, Michigan 48824 C (517) 355-5125 C C C modification history: C C 3 april 83 hg initial edit C 24 april 83 hg finished version 1 - all but help files C C C=========================================================================== C