NAME: Diablo Graphics Library Version 1.40 MODULE: Diablo.lib,Diablo.hdr RELEASE: 2 AUTHOR: Tim Meekins This documentation describes the usage of the diablo graphics library. The library consists of the following files: DIABLO.HDR and DIABLO.LIB. These are both Turbo Pascal (tm) include files. These files allow a Diablo 630 (tm) printer to be used like an x-y plotter. To use these library routines, the following compiler directives MUST BE PRESENT near the beginning of your program: {$i diablo.hdr} <-- contants and variable declarations. {$i diablo.lib} <-- the library routines themselves. The following paragraphs describe each of the library commands: INIT_DIABLO ----------- This should be the first procedure called by the main program. This initializes the printer for graphics printing and sets up all current pointers and variables. RESET_DIABLO ------------ This is used to reset the printer to normal printing modes and to form feed the paper. A call to init_diablo is necessary to continue printing and variables will be reset. GRAPHWINDOW (x1,y1, x2,y2) -------------------------- This sets a window area of the paper in which all plotting is to be done. Nothing will be displayed outside of these coordinates. The first coordinate pair (x1,y1) is the upper left corner relative the edges of the paper and the second coordinate pair (x2,y2) is the lower right corner relative to the edges of the paper. Coordinate (x1,y1) now becomes point (0,0) when using plotting commands. The default value for the window is (0,0),(500,500) which is equal to the size of an 8 1/2" x 11" sheet of paper. SET_REALISM (state) ------------------- When the command set_realism(on) is called a scaling factor is invoked which provides a more realistic looking picture. Circles now become perfectly circular and squares have the same length sides. The default value is set_realism(off). With realism off, a box 20 units wide and 20 units high will not have the same length and width because printer carriage does not move the same distance in the horizontal and vertical directions. When realism is on, the upper and lower portions will be unused unless graphwindow is called to change it. The graphwindow becomes (0,62),(500,562). A sheet of 8 1/2" x 11" paper is now (0,0),(500,624). MOVE (x,y) ---------- This procedure will move the printer carriage to coordinate position (x,y). This procedure is mainly used by the other routines. PLOT (x,y) ---------- This procedure will move the printer carriage to (x,y) and plot a dot dot there. If (x,y) is outside the range of graph_window, no dot will be plotted. DRAW (x1,y1, x2,y2) ------------------- This procedure will draw a line from point (x1,y1) to point (x2,y2). All parts of the line extending outside of graph_window will not be plotted, a low level clipping routine will prohibit it. This routine is based on the Quadrantal Digital Differential Analyzer. In the future it may be changed to a modified Bresenham alogorithm for increased performance. DRAWTO (x,y) ------------ Draws a line from the current plotting position to the point (x,y). To draw two a box of size 10, try the following: draw(0,0,10,0);drawto(10,10);drawto(0,10);drawto(0,0); POLY (x,y,r,n) -------------- Draws an n sided polygon with radius r at (x,y). CIRCLE (x,y,r) -------------- Draws a circle with radius r at (x,y). The following are not official procedures but can still be accessed by diablo.lib: DOT - plot's a dot at current (x,y) and update new (x,y). UP - move carriage up one line. DOWN - move carriage down one line. RIGHT - move carriage right one dot. LEFT - move carriage left one dot. Be careful using these routines because graph_window boundaries are not checked and realism scale factors are not incorporated here. I hope you have fun using this library! If you have any suggestions or questions, leave e-mail on CORE Z-NODE (614/864-2673) or PHOENIX PBBS (614/863-9611) to TIM MEEKINS. You can also write directly to me: Tim Meekins 8372 Morris Rd. Hilliard, OH 43026 December 28, 1986.