home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / SCNDSIGN.ZIP / MDRAW.DOC < prev    next >
Encoding:
Text File  |  1988-03-26  |  17.6 KB  |  425 lines

  1.                     MONODRAW User Documentation
  2.  
  3.  
  4.                           Frank G. Pagan
  5.                        3206 Kingswood Court
  6.                         Fullerton, CA 92635
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                            Introduction
  13.  
  14.  
  15. MONODRAW is a simple but useful public domain drawing program for 
  16. IBM-compatible personal computers equipped with a Hercules-
  17. compatible monochrome graphics adapter and a high resolution 
  18. monochrome monitor.  There are no other special system 
  19. requirements. 
  20.  
  21. Monochrome graphics is the most affordable kind of graphics 
  22. available on PC and XT class computers and is a very common
  23. feature on these machines.  It is also of very high quality,
  24. providing 720 pixel columns by 348 pixel rows.  All things
  25. considered, it is an excellent graphics system for applications
  26. where color is not needed or wanted.  Unfortunately, it has gone
  27. unsupported by the great majority of public domain software
  28. products and by many low-end commercial products.  MONODRAW should
  29. help to fill this gap.
  30.  
  31. The program is primarily oriented toward the creation and printing
  32. of line drawings (diagrams) with a limited amount of embedded
  33. text.  On the one hand, it is definitely not an "object-oriented"
  34. CAD program; on the other hand, it lacks some of the more exotic
  35. features of many paint programs.  What it does do is allow you to 
  36. set individual pixels, draw and erase lines, rectangles and 
  37. elliptical curves, fill areas with various patterns, draw text in 
  38. any of five fonts and a wide range of sizes, duplicate parts of a 
  39. diagram, save and retrieve diagrams on disk, and print a hard copy 
  40. of a diagram.  Even with a dot matrix printer, publication-quality 
  41. results can be achieved. 
  42.  
  43. There are a couple of features that distinguish MONODRAW from most 
  44. paint programs.  One is that all menu and settings information is 
  45. located on a separate screen page, which is nevertheless instantly 
  46. accessible at any time.  This frees all 250,560 (= 720 x 348) 
  47. pixels for use in the diagram itself.  In keeping with this 
  48. philosophy of maximum resolution, the drawing cursor consists of a 
  49. single blinking pixel, giving you the finest possible degree of 
  50. control over your diagram.
  51.  
  52.  
  53.  
  54.                           Getting Started
  55.  
  56.  
  57. The program is contained in the file MDRAW.EXE.  To run it, insert 
  58. the disk into the logged drive and type MDRAW at the DOS prompt.  
  59. As the title screen warns you, the drawing commands are case 
  60. sensitive and you should make sure that your Caps Lock is off.  To  
  61. get past the title screen, press any key.  You will then see what 
  62. we will call the settings/help screen being created.  The top half 
  63. shows the various drawing options, which you can change at any 
  64. time, and their current settings.  The bottom half is a quick-
  65. reference summary of the various keypress drawing commands that 
  66. you can issue when the drawing screen is displayed.  You press the 
  67. Escape key to switch from the settings/help screen to the drawing 
  68. screen or vice versa. 
  69.  
  70. To try out some of the basic drawing commands, press Escape to 
  71. switch to the drawing screen.  The screen will be blank except for 
  72. a single, fast-blinking pixel at the extreme upper left.  This is 
  73. the drawing cursor.  To make that pixel stay lit, press the space 
  74. bar.  The cursor's position has not changed, but you can't see it 
  75. at the moment because it blinks only when it is positioned at an 
  76. unlit pixel.  Now hold down a shift key and press the down arrow
  77. key four times.  You will see the cursor move down a distance of 
  78. 16 pixels at each keystroke.  Release the shift key and press L; a 
  79. line is drawn from the original corner position down to the 
  80. current cursor position.  The program will now remember the latter 
  81. as a "previous" position for another Line command.  To see this, 
  82. hold down Shift and press right arrow four times; at each of these 
  83. keystrokes, the cursor jumps 32 pixels to the right.  Now when you 
  84. press L (unshifted), a horizontal line is drawn from the previous 
  85. point to the cursor.  To make a complete triangle, first move the 
  86. cursor back to the upper left corner by pressing Shift Home four 
  87. times and press the L key again.
  88.  
  89. You could of course draw a rectangle one side at a time too, but, 
  90. for rectangles made of verical and horizontal lines, there is a 
  91. much faster way.  First move clear to the right of the triangle by 
  92. pressing shift right arrow six times.  Press the space bar to mark 
  93. this pixel.  Press shift PgDn four times to move rightwards and 
  94. downwards.  Press unshifted B (for "Box") and a rectangle is 
  95. drawn, with the previous point as the upper left corner and the 
  96. cursor as the bottom right corner.
  97.  
  98. To draw an ellipse, first move the cursor to the right by pressing 
  99. shift right arrow four times.  Mark this pixel using the space 
  100. bar; this is the starting point for the ellipse.  Move the cursor 
  101. upwards and rightwards by pressing shift PgUp twice.  This is the 
  102. first counterclockwise quarter point for the ellipse; i.e., the 
  103. program will take the center of the ellipse to be in the same 
  104. column as the previous point and in the same row as the cursor.  
  105. Press unshifted C ("Curve") and the ellipse will be drawn.
  106.  
  107. If you want to leave the program for now and get back to DOS, 
  108. press the Q key (unshifted).  The long beep you hear is the 
  109. program warning you that you have not saved your drawing.  Press Q 
  110. again to let it know that you really did mean to Quit 
  111. nevertheless. 
  112.  
  113.  
  114.  
  115.                    Changing the Current Settings
  116.  
  117.  
  118. When you went through the drawing exercise described above, you
  119. were using the default drawing settings.  This meant, for example, 
  120. that all lines were solid (not dotted or dashed) and of normal 
  121. thickness (1 pixel as opposed to 3), and that all curves were full 
  122. ellipses.  You could not add text to your diagram because there is 
  123. no default text string, and you could not save it to disk because 
  124. there is no default file name.  Whenever you need to set or change 
  125. attributes such as these, you make use of the settings/help 
  126. screen.  Press Escape, if necessary, to switch to it. 
  127.  
  128. The settings panel has a cursor, consisting of a small solid 
  129. square, positioned immediately to the right of the current 
  130. heading.  Initially, it marks the top line, which invites you to 
  131. press a function key to change a setting or Escape to switch to 
  132. the drawing screen.  Pressing one of the ten function keys will 
  133. move the cursor to the end of the corresponding setting heading:
  134.  
  135.         F1. Drawing name
  136.         F2. Line style
  137.         F3. Curve type
  138.         F4. Text font
  139.         F5. Text size
  140.         F6. Text flow direction
  141.         F7. Horizontal text justification
  142.         F8. Vertical text justification
  143.         F9. Fill pattern
  144.        F10. Text string
  145.  
  146. You must then either press a key in an indicated range (for F2 
  147. through F9) or enter a sequence of characters (for F1 or F10) to 
  148. change the setting.
  149.  
  150. For F2 through F9, the current setting is marked by an asterisk at 
  151. the left.  When you press a valid digit key (or A or B for F9), 
  152. the asterisk will move to mark the new setting, and the cursor 
  153. will return to the top line.  For F1, type a valid file name, 
  154. possibly beginning with a drive specifier and/or a directory path.
  155. Do not add a file extension; '.DGM' will be added automatically.
  156. The characters will appear under the F1 heading as you type them;
  157. you can use the backspace key to correct mistakes.  Pressing the
  158. Enter key terminates the entry and returns the cursor to the top
  159. line.  An F10 entry works similarly, except that you can type any
  160. string of characters that does not go past the right side of the
  161. screen.
  162.  
  163. The possible settings for F2 through F9 are described below.  In 
  164. each case, the asterisk marks the default setting.  You should 
  165. experiment freely with changing a setting, switching to the 
  166. drawing screen to see the effect on subsequent drawing actions, 
  167. switching back to change another setting, etc.
  168.  
  169. The LINE STYLE (F2) settings are
  170.  
  171.       * 0 - Normal solid
  172.         1 - Normal dotted
  173.         2 - Normal dashed
  174.         3 - Thick solid
  175.         4 - Thick dotted
  176.         5 - Thick dashed
  177.  
  178. Normal lines are 1 pixel thick.  "Thick" lines are 3 pixels thick.
  179.  
  180. The CURVE TYPE (F3) settings are
  181.  
  182.       * 0 - Full ellipse
  183.         1 - Half ellipse
  184.         2 - Quarter ellipse
  185.  
  186. A circle is, of course, a special case of an ellipse.  Half and 
  187. quarter ellipses are useful for drawing such things as rounded 
  188. ends and corners of objects.
  189.  
  190. The TEXT FONT (F4) settings are
  191.  
  192.       * 0 - 8 by 8
  193.         1 - Triplex
  194.         2 - Small
  195.         3 - Sans serif
  196.         4 - Gothic
  197.  
  198. The default font is the one used in the settings/help screen.  In
  199. the default size, each character occupies an 8 by 8 block of 
  200. pixels.  The other fonts employ proportional spacing. 
  201.  
  202. The TEXT SIZE (F5) setting is a number between 0 and 9.  The 
  203. default is 0, corresponding to the smallest size.  The actual 
  204. effect of this setting on character size depends on what the 
  205. current font is.
  206.  
  207. The TEXT FLOW (F6) settings are
  208.  
  209.       * 0 - Horizontal
  210.         1 - Vertical
  211.  
  212. The HORIZ JUSTIFY (F7) settings are
  213.  
  214.       * 0 - Left
  215.         1 - Center
  216.         2 - Right
  217.  
  218. Assuming that text flow is horizontal, with setting 0 the text 
  219. string will be drawn to the right starting at the cursor position
  220. when a Text command is issued.  With setting 1 it will be drawn 
  221. such that the string is centered around the cursor.  With setting 
  222. 2 it will be drawn such that the string ends at the cursor.
  223.  
  224. The VERT JUSTIFY (F8) settings are
  225.  
  226.       * 0 - Bottom
  227.         1 - Center
  228.         2 - Top
  229.  
  230. Assuming that the text flow is vertical, with setting 0 the text 
  231. string will be drawn upwards starting at the cursor position when 
  232. a Text command is issued.  With setting 1 it will be drawn such 
  233. that the string is centered around the cursor.  With setting 2 it 
  234. will be drawn such that the string is below the cursor.
  235.  
  236. The FILL PATTERN (F9) settings are
  237.  
  238.         0 - Empty
  239.       * 1 - Solid
  240.         2 - Horizontal lines
  241.         3 - Light slash
  242.         4 - Thick slash
  243.         5 - Thick backslash
  244.         6 - Light backslash
  245.         7 - Hatch
  246.         8 - Heavy cross hatch
  247.         9 - Interleaving lines
  248.         a - Widely spaced dots
  249.         b - Closely spaced dots
  250.  
  251.  
  252. In general, whenever you press an inappropriate key, you will hear 
  253. a short beep and nothing will change.
  254.  
  255.  
  256.  
  257.                      Moving the Drawing Cursor
  258.  
  259.  
  260. In the drawing screen, the cursor is a single pixel, which will be 
  261. blinking unless it has been turned on by a drawing command.  You
  262. move the cursor using the eight "motion" keys in the numeric 
  263. keypad, either shifted or unshifted.  The direction of movement 
  264. corresponds to the position of the key relative to the 5 key.  The 
  265. cursor cannot be moved past an edge of the screen.
  266.  
  267. Left arrow: 1 pixel to the left.
  268. Home: 1 to the left and 1 up.
  269. Up arrow: 1 up.
  270. PgUp: 1 up and 1 to the right.
  271. Right arrow: 1 to the right.
  272. PgDn: 1 to the right and 1 down.
  273. Down arrow: 1 down.
  274. End: 1 down and 1 to the left.
  275. Shift left arrow: 32 pixels to the left.
  276. Shift Home: 32 to the left and 16 up.
  277. Shift up arrow: 16 up.
  278. Shift PgUp: 16 up and 32 to the right.
  279. Shift right arrow: 32 to the right.
  280. Shift PgDn: 32 to the right and 16 down.
  281. Shift down arrow: 16 down.
  282. Shift End: 16 down and 32 to the left.
  283.  
  284.  
  285.  
  286.  
  287.                        The Drawing Commands
  288.  
  289.  
  290. There are 14 keystroke commands you can issue when the drawing 
  291. screen is displayed, and they are all explained below.  The Line, 
  292. Box, Curve, and Get commands make use of a "previous" pixel 
  293. position distinct from the current cursor position.  This previous 
  294. position is set by each mark (space bar), Line, Box, and Curve 
  295. command to the position of the cursor at the time the command is 
  296. issued. No command changes the cursor position itself. 
  297.  
  298. The MODE (m) command toggles between the program's drawing and 
  299. erasing modes.  Initially, the program is in the drawing mode.  In 
  300. the erasing mode, the cursor blinks at double speed (if it is at 
  301. an unlit pixel).  The mark (space bar), Line, Box, and Curve 
  302. commands then have the effect of turning off lit pixels.
  303.  
  304. The MARK (space bar) command sets the current pixel and updates 
  305. the "previous" position.
  306.  
  307. The LINE (l) command draws a straight line from the previous 
  308. position to the current position using the current line style and 
  309. updates the previous position. 
  310.  
  311. The BOX (b) command, using the current line style, draws a 
  312. rectangle with one corner at the previous position and the 
  313. diagonally opposite corner at the current position.  The previous 
  314. position is updated.
  315.  
  316. The CURVE (c) command, using the current line style, draws a full, 
  317. half, or quarter ellipse using the previous position as the 
  318. starting point and the current position as the first 
  319. counterclockwise quarter point.  The previous position is updated.
  320.  
  321. The FILL (F) command fills an enclosed area surrounding the cursor 
  322. with the current fill pattern.
  323.  
  324. The TEXT (t) command draws the current text string in accordance
  325. with the current font, size, flow, and justification settings.  
  326. The vertical position of horizontal text is affected by the 
  327. vertical justification setting: for bottom justify, the text 
  328. appears slightly higher than the cursor; for center justify, it 
  329. appears next to the cursor; and for top justify, it appears 
  330. slightly lower than the cursor. 
  331.  
  332. The GET (g) command captures a rectangular block of pixels defined 
  333. by the previous position and the current position.  You will hear 
  334. a short beep if the block is too large.
  335.  
  336. The PUT (p) command sets a rectangular block of pixels, using the 
  337. current position as the upper left corner, to be a duplication of 
  338. a block captured by a preceding Get command.
  339.  
  340. The WRITE (w) command saves the current diagram and current 
  341. settings to a disk file n.DGM, where n is the current drawing 
  342. name.  If n is not a valid file name, you will hear a short beep. 
  343.  
  344. The INPUT (i) command retrieves a saved diagram and settings from 
  345. the disk file n.DGM, where n is the current drawing name.  If the
  346. diagram has not been saved since the last change, you will hear a 
  347. long beep.  To confirm that you want to replace the current 
  348. drawing with one on disk, repeat the Input command; to abort, 
  349. press any other key.  As a reminder that any of the settings could 
  350. have been changed by the input operation, the settings/help screen 
  351. is flashed momentarily.  If the file is not found, you will hear a 
  352. short beep. 
  353.  
  354. The HARDCOPY (H) command sends the diagram to a printer.  This has 
  355. nontrivial ramifications.  For further information, read the next 
  356. section. 
  357.  
  358. The CLEAR (Alt C) command erases the drawing screen.  If the 
  359. diagram has not been saved since the last change, you will hear a 
  360. long beep.  To confirm that you want to discard the current 
  361. drawing, repeat the Clear command; to abort, press any other key.
  362.  
  363. The QUIT (q) command terminates the program run.  If the diagram 
  364. has not been saved since the last change, you will hear a long 
  365. beep.  To confirm that you do not want to save the current 
  366. drawing, repeat the Quit command; to abort, press any other key.
  367.  
  368.  
  369.  
  370.  
  371.                        Printing a Hard Copy
  372.  
  373.  
  374. The Hardcopy command actually invokes a completely separate 
  375. program assumed to reside in a file PRINTDWG.EXE in the current 
  376. directory.  The problem of printing graphics "screen dumps" is 
  377. notorious for its dependence on user taste and the characteristics 
  378. of different printers.  Accordingly, you are free to acquire any 
  379. printing program you like and rename it PRINTDWG.EXE, or even, if 
  380. you have the know-how, write your own.
  381.  
  382. The particular printing program supplied with MONODRAW was written 
  383. for an Epson-like dot matrix printer (specifically, a Star 
  384. Micronics Gemini 10X).  It prints the diagram on a standard 
  385. letter-sized form, rotated 90 degrees to the right so that the 
  386. leftmost pixel columns of the diagram are printed as the topmost 
  387. dot rows across the sheet.  The aspect ratio of the resulting hard
  388. copy is 12% "flatter" than it is on the screen.  The source code 
  389. (in Turbo Pascal version 4.0) for this program is supplied in the 
  390. file PRINTDWG.PAS, in case you want to try modifying it to suit 
  391. your own taste or your own printer. 
  392.  
  393. When PRINTDWG.EXE is finished printing the hard copy, MONODRAW 
  394. retakes control of the computer.  If PRINTDWG.EXE is not found, 
  395. you will hear a short beep.
  396.  
  397.  
  398.  
  399.  
  400.                         Some Helpful Hints
  401.  
  402.  
  403. Creating diagrams often involves a lot of erasing and redrawing.  
  404. There are several ways of erasing parts of a diagram in MONODRAW.  
  405. If you toggle into erase Mode, you can erase individual pixels 
  406. with the Mark (space bar) command or entire lines, boxes, and 
  407. curves with the L, B, and C commands.  To completely clear a small 
  408. area of a diagram, you can move to a blank region, capture a blank
  409. block of pixels with the Get command, move to the area to be 
  410. cleared, and issue a Put command.  (If you momentarily use the 
  411. erase mode when marking the previous point for the Get, that point 
  412. will remain unlit.)  Contiguous groups of lit pixels, such as 
  413. those comprising text characters, can be deleted by setting the 
  414. fill pattern to empty, toggling to the erase mode, and issuing a 
  415. Fill command.
  416.  
  417. For many diagrams it is a good idea to draw all the text items 
  418. first and all the line items later.  Otherwise, it can be hard to 
  419. get the text items to fit right.
  420.  
  421. Before doing a "dangerous" operation such as a Fill, Put or Text 
  422. in a complex diagram, you should first do a precautionary Write.  
  423. That way, if the operation does not do what you expected, you can 
  424. undo it by issuing an Input command. 
  425.