PICTURETHIS "SHAREWARE" VERSION RELEASE 2.00 MAY 1, 1989 USER MANUAL, PART 1 OF 5 PARTS Copyright 1988, 1989 by Patricia Y. Williams and Gregory Williams, All Rights Reserved. HortIdeas Publishing, Route 1, Box 302, Black Lick Road, Gravel Switch, KY 40328 U.S.A. Trademarks/Owners: CaptureThis and PictureThis/Patricia Y. Williams and Gregory Williams; Hercules/Hercules Computer Technology, Inc.; IBM and PC-DOS, International Business Machines Corp.; MS-DOS, Microsoft Corp.; PostScript/Adobe Systems Inc. NOTE: Carefully read all of the terms and conditions of the License Agreement (near the beginning of the READTHIS.1ST file on distribution disk #1) PRIOR to using the PictureThis and/or CaptureThis programs. USE OF THE PROGRAM(S) INDICATES YOUR ACCEPTANCE OF THOSE TERMS AND CONDITIONS. TABLE OF CONTENTS (PART 1) INTRODUCTION .............................................4 1. PRELIMINARIES .........................................5 2. RUNNING PictureThis ...................................7 3. EXITING FROM PictureThis ..............................7 4. ILLEGAL KEYSTROKES, HELP SCREENS, AND STATUS BOX ......7 4.1 ILLEGAL KEYSTROKES ..................................7 4.2 HELP SCREENS ........................................8 4.3 STATUS BOX ..........................................8 5. CURSOR KEYS ...........................................9 6. "ZOOMING" AND SCROLLING ...............................10 6.1 SCREEN MAGNIFICATIONS AND THE FRAME .................10 6.2 "ZOOMING" AND CENTERING .............................11 6.3 SCROLLING ...........................................12 7. DRAWING CURVES ........................................14 7.1 DRAWING A STRAIGHT LINE .............................14 2 7.2 DRAWING A CURVED LINE ...............................15 8. DRAWING BOXES, SQUARES, CIRCLES, AND OVALS ............17 8.1 DRAWING A BOX .......................................17 8.2 DRAWING A SQUARE ....................................17 8.3 DRAWING A CIRCLE ....................................18 8.4 DRAWING AN OVAL .....................................19 9. FINDING ENDPOINTS .....................................19 10. SMOOTHING CURVES .....................................20 10.1 MANUAL SMOOTHING ...................................20 10.2 AUTOMATIC SMOOTHING ................................22 10.3 REMOVING GUIDELINES ................................23 11. CUTTING CURVES .......................................23 (PART 2) 12. MODIFYING CURVES .....................................25 12.1 ERASING A CURVE ....................................25 12.2 CHANGING A CURVE ...................................26 12.3 CHANGING A CURVE'S LINE PARAMETERS .................26 12.3.1 CHANGING LINE WEIGHT ............................27 12.3.2 CHANGING LINE GRAY ..............................27 12.3.3 CHANGING THE LINECAP ............................28 12.3.4 SAVING THE LINE PARAMETERS ......................28 13. QUICKSHOW SCREEN .....................................28 14. TRAILS, FILLS, AND JOINS .............................29 14.1 DEFINING A TRAIL ...................................30 14.2 ERASING A TRAIL ....................................32 14.3 FILLING A TRAIL ....................................32 14.3.1 SPECIFYING A FILL GRAY PERCENTAGE ...............32 14.3.2 RESULTS OF FILLING A TRAIL ......................33 14.4 CHANGING THE LINE PARAMETERS OF A TRAIL ............35 14.4.1 CHANGING THE LINE WEIGHT, LINE GRAY, AND LINECAP FOR ALL CURVES IN A TRAIL ......................36 14.4.2 CHANGING THE JOIN FOR A TRAIL ...................36 14.4.3 TRAILS MADE OF CURVES WITH DIFFERENT LINE PARAMETERS .....................................37 15. SETTING THE GLOBAL LINE PARAMETERS ...................37 16. OBJECTS ..............................................38 16.1 GROUPING AN OBJECT .................................39 16.2 UNGROUPING AN OBJECT ...............................40 16.3 ERASING AN OBJECT ..................................41 16.4 LAYERING OBJECTS ...................................41 (PART 3) 17. MANIPULATING OBJECTS .................................44 17.1 MOVING AN OBJECT ...................................44 3 17.2 COPYING AN OBJECT ..................................45 17.3 SCALING AN OBJECT ..................................46 17.4 ROTATING AN OBJECT .................................48 17.5 FLIPPING AN OBJECT .................................49 17.6 INCLINING AN OBJECT ................................50 18. FILE OPERATIONS AND DOS SHELL ........................54 18.1 RETRIEVING A SAVED DRAWING .........................54 18.2 SAVING A DRAWING ...................................55 18.3 IMPORTING CLIP ART .................................56 18.4 EXPORTING CLIP ART .................................57 18.5 READING A TEMPLATE FILE ............................57 (PART 4) 18.6 WRITING A POSTSCRIPT FILE ..........................59 18.7 SHELLING TO DOS ....................................63 19. UNITS AND POSITION BOXES .............................63 19.1 CHANGING THE CURRENT UNIT ..........................63 19.2 CURRENT POSITION BOX ...............................65 19.3 INTERNAL UNITS .....................................65 19.4 RELATIVE POSITION BOX ..............................66 20. CURSOR SPEED AND GRID ................................67 20.1 SETTING THE FAST CURSOR SPEED ......................67 20.2 SETTING THE GRID ...................................67 20.2.1 CHANGING THE SPACING OF THE GRID ................68 20.2.2 CHANGING THE FORM OF THE GRID ...................68 20.2.3 CHANGING THE COLOR OF THE GRID ..................69 20.3 USING THE GRID .....................................69 21. CHANGING THE FRAME AND SCALING THE DRAWING ...........70 21.1 CHANGING THE FRAME .................................70 21.2 SCALING THE DRAWING ................................71 22. NOTING POINTS AND MEASURING ..........................72 22.1 NOTED POINTS .......................................72 22.2 MEASURING DISTANCES ................................72 23. ASPECT RATIO .........................................73 24. VIEWSCREEN, PALETTE, AND SCREEN TOGGLES ..............74 24.1 VIEWSCREEN .........................................74 24.2 CHANGING THE PALETTE ...............................74 24.3 SCREEN TOGGLES .....................................75 (PART 5) 25. TEMPLATES ............................................77 25.1 CAPTURING SCREENS FOR USE AS TEMPLATES .............77 25.2 MOVING THE TEMPLATE ................................81 26. DRAWING HINTS ........................................81 26.1 JOINING CURVES AT ENDPOINTS ONLY ...................81 4 26.2 USING THE "Del" KEY TO MOVE TO ENDPOINTS ...........81 26.3 SMOOTHER SMOOTHING .................................81 26.4 JOINING CURVES WITH DIFFERENT LINE WEIGHTS .........82 26.5 DOING DETAILED WORK ON THE 300% SCREEN .............82 26.6 DOING FINE WORK ON A LARGE SCALE AND THEN SCALING DOWN ..............................................82 26.7 DRAWING AN OVAL WITH SIDE ENDPOINTS AT SPECIFIC POSITIONS .........................................82 27. MEMORY LIMITS AND MEMORY USED BOX ....................83 28. INCOMPATIBILITIES AND "BUGS" .........................84 APPENDIX. STATES AND ERROR MESSAGES ......................84 STATE MNEMONICS .........................................84 ERROR MESSAGES ..........................................85 INTRODUCTION As "desktop publishers" of two newsletters ("HortIdeas," a monthly on the latest research, tips, and products for home gardeners, available for $15.00 per year from the address above, and "Continuing the Conversation," a quarterly of ideas in cybernetics, available for $8.00 per year from the address above), we have been dismayed by the inflated prices and high-end hardware needs of much publishing software for personal computers. So we wrote PictureThis -- both for ourselves and for others who need to produce high quality drawings using IBM PC compatibles WITHOUT HAVING TO SPEND A FORTUNE ON SOFTWARE AND HARDWARE. PictureThis is inexpensive, you can "try it first" (as "shareware"), and it DOESN'T require a fancy graphics board and monitor, mouse, lots of RAM, expanded memory, or even a hard disk. To quote A.J. Liebling: "Freedom of the press belongs to those who own one." We want to help make "the electronic press" more affordable! With PictureThis, you can quickly and easily produce resolution-independent drawing files for delivery to PostScript-compatible laser printers and imagesetters -- either freehand or by tracing "template" screens captured with the companion CaptureThis program. YOU DO NOT HAVE TO KNOW HOW TO PROGRAM IN THE PostScript PAGE DESCRIPTION LANGUAGE TO USE PictureThis AND CaptureThis!!! Hardware and software requirements for this "Shareware" Version: an IBM PC, XT, AT, or compatible running MS-DOS or PC-DOS 2.0 or above (not tested with 4.X), with at least 384 KB RAM, at least one 5.25" DSDD floppy disk drive, and CGA (320 x 200 four-color and 640 x 200 two-color resolution) video board compatibility (including Hercules-compatible monochrome graphics boards with hardware or software CGA emulation, and EGA boards, and VGA boards), plus a PostScript-compatible printer or imagesetter with some kind of interface to your computer (whether direct, such as a cable connection with communications software, or indirect, 5 such as sending disks with PostScript files to a typesetting service). If you don't have direct access to a PostScript- compatible output device, there are now several laser typesetting service bureaus located throughout North America which can use PostScript files made with PictureThis (sent to the bureaus on disks or via modem) to produce prints with 300, 1270, or even 2540 dots-per-inch at surprisingly low cost and quick turnaround. PostScript files produced with PictureThis use cubic Bezier curves to construct "vector-mapped" drawings which, unlike "bit-mapped" drawings, can be scaled and rotated without becoming "jaggy" (also, vector-mapped drawings typically print much faster than bit-mapped drawings on PostScript- compatible laser printers and imagesetters, and vector- mapped drawing files typically are much smaller than bit- mapped drawing files). PostScript files contain only ASCII characters; they can be edited with a word processor (if you know how to program in PostScript), and they can be merged with other PostScript files (for example, to combine drawings with text from page layout programs). For more information on the PostScript page description language, see the books about PostScript written by Adobe Systems Inc. and others. These books (and other very useful PostScript information, including tutorials and utility programs) are available from Don Lancaster, Synergetics, Box 809, Thatcher, AZ 85552 (write for a free price list). Also, a "PostScript Language Journal" is being published quarterly (P.O. Box 5763, Parsippany, NJ 07054). 1. PRELIMINARIES In a nutshell, here's how you'll be using PictureThis: While viewing their on-screen representations, you prepare drawings consisting of third-order (cubic) Bezier curves, defining each curve by the locations of its two endpoints and by the locations of two "control points" (each associated with one of the endpoints) which determine the curve's shape. PictureThis produces files written in the PostScript page description language; these contain all of the information about your drawings needed by PostScript-equipped laser printers and imagesetters to generate high quality prints. While PostScript files are thus the "ultimate products" of PictureThis, three other kinds of files are involved in the production process: template files, drawing files, and clip art files. CGA (medium- or high-resolution) graphics screens can be captured in template files by using the CaptureThis (or Alternate CaptureThis) program provided with PictureThis; these files can then be imported into PictureThis to provide background screens for tracing. Drawing files are used to store and retrieve information about your drawings in a format usable by PictureThis; you can save a drawing-in- progress in a drawing file for later recall. Clip art files are used to store and retrieve information about parts of your drawings, allowing these parts to be merged with other drawings. 6 To begin, make a backup copy of the distribution disks, if you haven't already! If you have two floppy disk drives, one way to do this (for each of the distribution disks) is to format a new floppy disk using the DOS "FORMAT" command. Next place a distribution disk in drive A and the newly formatted disk in drive B. Copy all of the files on the distribution disk to the new disk by keying in, at the DOS "A>" prompt: COPY *.* B: and then press: ENTER If you don't have two floppy disk drives, or if you need to learn more about copying files, consult your operating system user manual. Store the original distribution disks in a secure place, and use only the backup disks for running PictureThis. The files REQUIRED to run PictureThis are the following: PICTHIS2.EXE (the PictureThis program) PTS2D.OVR (a data file needed by PictureThis; MUST be in the current directory) PTS2T.OVR (another data file needed by PictureThis; MUST be in the current directory) and, OPTIONALLY, CAPTHIS.COM (the CaptureThis program; needed only if you want to capture CGA graphics mode screens for use as templates in PictureThis) or ACAPTHIS.COM (an alternate version of the CaptureThis program which requires no keyboard input to capture CGA graphics mode screens; useful for some computers with compatibility problems, and with some applications programs which "take over" the keyboard; also requires less memory when installed than does CAPTHIS.COM) You might also like to use some of the sample PictureThis files: *.DRW, *.TMP, and *.CLP. To create more room for your working files you should delete the text files from your program disk (#1) after you have printed them. To do this, at the DOS prompt corresponding to the drive with your program disk type: DEL *.TXT and then press: 7 ENTER To use the DOS shell feature of PictureThis, you might want to copy COMMAND.COM to your program disk, also. 2. RUNNING PictureThis To run PictureThis, make sure that PICTHIS2.EXE, PTS2D.OVR, and PTS2T.OVR are in the current directory. At the DOS prompt corresponding to the drive containing the disk with the files, key in: PICTHIS2 then press: ENTER The title screen should appear for a few seconds, allowing you to get a glimpse of PictureThis in action. Then a copyright/ordering information screen should appear. Please read it! After 15 seconds, you can press any key to continue. After you press a key, a blank screen with a border and an X- shaped cursor at its center should appear. If you want to make sure that the drawing screen shown on your monitor is properly scaled relative to the printed copy output's default proportions, see Section 23. 3. EXITING FROM PictureThis To return to the operating system, press the "Escape" key: Esc A prompt will appear which says "Quit PictureThis? (Y/N)"; to exit, type: Y To remain in PictureThis and remove the exit prompt from the screen, press any other key. Note: with a few exceptions, PictureThis is insensitive to case (for example, "Y" is treated the same as "y"). The "Esc" key is generally used in PictureThis to "back out" of an operation, that is, to cancel the current operation and return to the previous operation. Hit the "Esc" key enough times from wherever you are in the program, and you will reach the exit prompt. (More information on "backing out" of particular operations is given throughout this manual.) 4. ILLEGAL KEYSTROKES, HELP SCREENS, AND STATUS BOX 4.1 ILLEGAL KEYSTROKES In general, some keys are NOT valid at particular times in 8 PictureThis. If you press an inappropriate key, you'll hear a BEEP -- just a warning, no harm done. It means: try again! To turn off the speaker you can press: H and invalid keystrokes will no longer cause BEEPs. To turn the speaker back on AND to toggle error messages and prompts on, press "H" again. This causes ALL invalid keystrokes to BEEP a warning, error messages to be displayed when SOME illegal keys are pressed, and special prompts to appear when certain less common operations are being performed. The prompts appear at the top of the screen and disappear when a key is pressed (the key can continue whatever process you are doing). A complete list of error messages is given in the Appendix to this manual. It is a good idea to toggle the error messages/prompts on when you are just learning how to use PictureThis. To return to the initial state of BEEPs ONLY, press "H" one more time. Thus, "H" is a three way toggle; its current status is shown in the status box (see Section 4.3). 4.2 HELP SCREENS To find which keys are valid at any time press: ? A contextual help screen will appear, listing currently valid keys and their effects. A help screen will NOT appear if "?" is pressed when a menu box appears on the screen. 4.3 STATUS BOX Additional information about the current status of PictureThis can be obtained by pressing: W A status box will appear in the lower left hand corner of the screen. To toggle the box off, press "W" again. The status box contains several mnemonic indicators. The first indicator shows whether the cursor will go to the second endpoint of a curve after the curve has been set ("A " with automatic smoothing toggled off; "A+" with automatic smoothing toggled on), or to the first endpoint ("A-"; no automatic smoothing). (See Section 10.2.) The second indicator shows whether guidelines that appear while smoothing and drawing squares or ovals are erased from view or not ("E+" or "E-") (see Section 10.3). The third indicator shows whether the speaker and/or prompts and error messages are toggled on ("H+" for speaker, prompts, and error messages; "H " for speaker only; and "H-" for no speaker, no prompts, and no error messages). Next is a mnemonic for the current operation. This mnemonic is "FREE" when no operation is in process. (See the Appendix for a list 9 of all operation mnemonics.) Next, a letter ("E," "I," or "G") indicates the current cursor movement mode (external, internal, or snap-to grid, respectively; see Sections 19.3 and 20.3). The following number is the current cursor speed (see sections 5 and 20.1). The final two letters show the current units: "PX," pixels; "IN," inches; "PT," points; "PP," picas and points; "CM," centimeters; or "MM," millimeters (see Section 19.1). 5. CURSOR KEYS Keys "1" through "9" on the Numeric Keypad (with the exception of the central key "5") are used to move the cursor vertically, horizontally, or diagonally. The cursor moves in the direction corresponding to the direction of the pressed key from the "5" key. Note: "NumLock" must be toggled OFF, and the "SHIFT" keys must not be pressed. To move the cursor DOWN, press: 2 To move the cursor UP, press: 8 To move the cursor LEFT, press: 4 To move the cursor RIGHT, press: 6 To move the cursor DIAGONALLY DOWN AND LEFT, press: 1 To move the cursor DIAGONALLY DOWN AND RIGHT, press: 3 To move the cursor DIAGONALLY UP AND LEFT, press: 7 To move the cursor DIAGONALLY UP AND RIGHT, press: 9 The distance which the cursor moves on the screen when one of the above keys is pressed is determined by the "Ins" key (and also by the "I" key (see Section 19.3), the current unit setting (see Section 19.1), the snap-to grid setting (see Section 20.3), and the drawing scale (see Section 21.2)). The 10 "Ins" key acts as a toggle between "slow" and "fast" cursor speeds. The initial setting is 1 unit per keystroke; to "speed up" the cursor to more units per keystroke (the default is 10, but the "fast" speed can be adjusted (see Section 20.1)), press: Ins (with "NUMLOCK" toggled OFF and no "SHIFT" key pressed). And to "slow down" the cursor, again press: Ins For diagonal cursor movements (controlled by "1" and "3" and "7" and "9" on the Numeric Keypad), each keystroke results in a movement of 1 unit vertically and 1 unit horizontally when the cursor speed is "slow," or n units vertically and n units horizontally when the cursor speed is "fast" and set to n. You cannot move the cursor beyond the screen edge. If you try, the cursor will remain stopped at the edge. To save time when moving the cursor over large distances, we recommend that you use one of the several "shareware" or "freeware" memory-resident keyboard speedup programs currently available. The source code listing for QUICKEYS.COM (for 8088- and 8086-based computers) was originally published in "PC Magazine", and the source code listing for SETKEY.COM (for 80286-based computers) was originally published in "PC Tech Journal"; these and similar programs are available on computer bulletin boards and/or from "shareware" distributors. 6. "ZOOMING" AND SCROLLING 6.1 SCREEN MAGNIFICATIONS AND THE FRAME There are three different screen magnifications at which you can work in the program: the 100% screen (which initially appears when PictureThis is run), the 300% screen, and the 50% screen. A line drawn on the 100% screen appears three times as long on the 300% screen, and half as long on the 50% screen; thus the percentage of each screen refers to its LINEAR magnification scale. On the the 50% screen, the full drawing area of the screen is visible; on the 100%, one fourth of the drawing area is visible at any time; on the 300% screen, one thirty-sixth of the drawing area is visible at any time. Dotted lines show the edge of the frame at all three magnifications. The frame is a rectangular area indicating the portion of your drawing that will be printed. Any curves or portions of curves outside of this rectangle will be "clipped" off in the PostScript output. The initial frame is set at the edge of the visible 100% screen, in the middle of the full drawing screen. The frame can be changed at any time (see Section 21.1). 11 You can move the cursor to one of the four corners of the frame, regardless of the current screen magnification. To move the cursor to the upper left corner of the frame press (simultaneously): Ctrl and: Home To move the cursor to the lower left corner of the frame press (simultaneously): Ctrl and: End To move the cursor to the upper right corner of the frame press (simultaneously): Ctrl and: PgUp To move the cursor to the lower right corner of the frame press (simultaneously): Ctrl and: PgDn Moving to a corner of the frame can be done during most operations (e.g., while drawing a curve). However, during an operation, if the indicated corner is not on the visible screen, the move cannot be made (and a BEEP will sound). During the "FREE" state, a move to a corner off the screen will scroll the screen so that the corner to which the cursor moves is at the edge of the newly visible screen. 6.2 "ZOOMING" AND CENTERING To switch among the different screen magnifications, use the "+" and "-" keys on the Numeric Keypad. To move from the 100% screen to the 300% screen, press: + To move back from the 300% screen to the 100% screen, press: 12 - To move from the 100% screen to the 50% screen, press: - To move back from the 50% screen to the 100% screen, press: + In other words, to INCREASE the magnification, press: + And to DECREASE the magnification, press: - When the magnification is changed to the 100% or 300% screen, the screen becomes centered on the cursor. When working on the 100% or 300% screen, you can center the screen on the cursor without "zooming" by pressing: X You cannot change between magnifications or center the screen in the middle of an operation, such as drawing a curve. 6.3 SCROLLING You can scroll the 100% and 300% screens by using the cursor keys ("1" to "9", except "5," on the Numeric Keypad) with "NumLock" toggled on or "SHIFT" pressed. To scroll the current screen DOWN (so you can see more at the bottom of the screen), press (simultaneously): 2 and: SHIFT To scroll the current screen UP (so you can see more at the top of the screen), press (simultaneously): 8 and: SHIFT To scroll the current screen LEFT (so you can see more at the left side of the screen), press (simultaneously): 13 4 and: SHIFT To scroll the current screen RIGHT (so you can see more at the right side of the screen), press (simultaneously): 6 and: SHIFT To scroll the current screen DIAGONALLY DOWN AND LEFT (so you can see more at the bottom left corner of the screen), press (simultaneously): 1 and: SHIFT To scroll the current screen DIAGONALLY DOWN AND RIGHT (so you can see more at the bottom right corner of the screen), press (simultaneously): 3 and: SHIFT To scroll the current screen DIAGONALLY UP AND LEFT (so you can see more at the upper left corner of the screen), press (simultaneously): 7 and: SHIFT To scroll the current screen DIAGONALLY UP AND RIGHT (so you can see more at the upper right corner of the screen), press (simultaneously): 9 and: SHIFT 14 As noted above, instead of pressing "SHIFT" simultaneously with Numeric Keypad number keys to scroll, you can toggle "NumLock" on and press the Numeric Keypad number keys only; alternatively (but probably not very easily!), you can use the Main Keyboard number keys (with "SHIFT" NOT pressed). The screen scrolls by increments of approximately one- quarter of the total screen width/height in the chosen direction for horizontal/vertical scrolling, and one-quarter of the total screen width/height in both horizontal and vertical directions for diagonal scrolling. The screen will not scroll beyond the edge of the entire drawing screen. To center the frame on the 100% or 300% screen, press (simultaneously): 5 and: SHIFT You can center the frame on the screen and simultaneously center the cursor in the frame (this is called "zeroing" the screen) by pressing: Z You cannot scroll in the middle of an operation, such as drawing a curve. Usually when you scroll or move between the different screens (when you "zoom"), the cursor remains at the same position relative to the frame. However, if the cursor would end up off the screen by remaining at the same position, it is placed as close as possible to its original position, but still on the screen. 7. DRAWING CURVES In PictureThis, a curve (including a straight line!) is drawn by specifying the positions of its two endpoints and the positions of two "control points" (each of which is associated with one of the endpoints) which determine the curve's shape. These four points uniquely determine the position and shape of the curve. Curves drawn with PictureThis are cubic Bezier curves because such curves are used in the PostScript language. For a mathematical definition of cubic Bezier curves, see the PostScript Reference Manual by Adobe Systems Inc. (published by Addison- Wesley). 7.1 DRAWING A STRAIGHT LINE While in the "FREE" state, move the cursor to a position desired for one of the line's endpoints. Press the "F1" function key to set the first endpoint. A 15 small square appears at the center of the cursor to indicate the first endpoint position, and the state changes to "LINE." Move the cursor to a position desired for the second endpoint. (A line "rubberbands" from the first endpoint.) To set the line, press the "F3" function key. That's all there is to it! A second small square appears at the center of the cursor to indicate the second endpoint position, and the state returns to "FREE." (It is also possible to have the cursor automatically move back to the first endpoint of a line when the line is set; see Section 10.2.) Pressing the "Esc" key during the line drawing operation erases the line, moves the cursor back to the position of the first endpoint, and returns the state to "FREE." Note: To make a single dot on your drawing, you can press "F1" at the dot's position and then press "F3" again without moving the cursor. The dot's size and shape will be determined by the current line parameters (see Section 12.3). 7.2 DRAWING A CURVED LINE While in the "FREE" state, move the cursor to a position desired for an endpoint. Press the "F1" function key to set the first endpoint. A small square appears at the center of the cursor to indicate the first endpoint position, and the state changes to "LINE." Move the cursor to a position desired for a second endpoint. A line "rubberbands" from the first endpoint. Press the "F1" function key again to set the second endpoint. Another small square appears, indicating the second endpoint's position, and the state changes to "CURVE." At this stage, two control points are also established, one at the position of each endpoint. Move the cursor away from the second endpoint. This moves the control point associated with the second endpoint; the curve's shape changes under the influence of the moving control point. Press the "F2" function key to switch the cursor position to the first endpoint. Note that the position of the control point associated with the second endpoint is shown by a dot. Move the cursor away from the first endpoint. This moves the control point associated with the first endpoint; the curve's shape changes under the influence of the moving control point. With the "F2" function key, toggle the cursor back and forth between the positions of the two control points, and 16 move each of the control points in turn until you are satisfied with the shape of the curve. Note that the position of the control point not currently being moved by the cursor is indicated by a dot. To set the curve, press the "F3" function key. This automatically moves the cursor to the second endpoint (for easy drawing of continuous curves made up of successively drawn curves) or to the first endpoint (for easy drawing of several curves from one endpoint), depending on the automatic smoothing toggle setting (see Section 10.2), and erases the dots indicating control points (to avoid cluttering the screen). The state returns to "FREE." Pressing "Esc" during the curve drawing operation BEFORE either control point is moved away from its associated endpoint "backs out" to the line drawing operation. That is, it erases the curve and second endpoint, moves the cursor to the second endpoint's position, draws a straight line from the first endpoint to the cursor, and changes the state from "CURVE" to "LINE." You can now establish a different second endpoint and go on to set a curve, or you can press "Esc" again to go back to the "FREE" state. Pressing "Esc" AFTER you have moved either control point from its associated endpoint changes the curve to a straight line, but does not erase the second endpoint. You can then move the control points or press "Esc" one time to allow a new second control point to be set or two times to return to the "FREE" state. If you imagine a line connecting a curve's endpoint with the control point associated with that endpoint, you will find that the line has the same direction as (is tangent to) the curve at the endpoint. Ditto for the other endpoint and control point. Knowing this makes it easy to guess how you should move control points to make curves shaped as you wish. If one of a curve's control points has NOT been moved away from its associated endpoint, then BOTH ends of that curve will be tangent to imaginary lines connecting the respective endpoints with the control point which HAS BEEN MOVED away from its associated endpoint. You can draw a loop having both endpoints at the same position by pressing "F1" and "F1" again with no intervening cursor movement. Then move the control points as described above to obtain the desired loop. If you press "F1" to establish a second endpoint and move into the "CURVE" state, then press "F3" without moving either control point from its associated endpoint (or moving the control points back after moving them off), you will set a straight line equivalent to one drawn by pressing "F3" at the second endpoint before pressing the second "F1". That is, "F1," move, "F1," "F3" is equivalent to "F1," move, "F3." The control points for a straight line are at the line's endpoints! It is important to realize that screen representations of curves are APPROXIMATIONS to cubic Bezier curves (in fact, the screen representation for each curve consists of only 20 17 straight lines, to provide quick redrawing). These approximations are subject to round-off errors, especially at the 50% and 100% screen settings (always switch to the 300% screen when you need to see the most accurate screen representations of curves). In particular, if the same curve is drawn twice, with the same endpoints and control points each time, but WITH THE ORDER OF SPECIFYING THE ENDPOINTS REVERSED THE SECOND TIME the curve is drawn, the screen representations for the first and second drawings can be SLIGHTLY DIFFERENT (but the hard copy output will show only ONE curve). 8. DRAWING BOXES, SQUARES, CIRCLES, AND OVALS By drawing combinations of straight lines and curves, you can draw boxes, squares, circles, and ovals (ellipses). However, PictureThis provides simpler ways to draw these figures. 8.1 DRAWING A BOX Move the cursor to a position for one corner of the box and press "B". An endpoint appears. The state is now "BOX." Move the cursor away from the first endpoint, in any direction. A box with diagonally opposite corners at the first endpoint's location and the cursor's location is drawn. When you are satisfied with the box, press "F3." Four lines are set, with an endpoint at each corner; your box is complete, and the state returns to "FREE." Pressing "Esc" at any time during the box drawing operation erases the box, moves the cursor back to the box's first corner, and returns to the "FREE" state. 8.2 DRAWING A SQUARE On the typical CGA medium resolution graphics screen, there are more pixels for a given distance in the horizontal direction than pixels for the same distance in the vertical direction (the ratio is usually 1.2 to 1.) Therefore, if you tried to draw a square by using the method in Section 8.1 and moved the cursor up and to the right the same number of pixels, you would not get a square, but a rectangle that is taller than it is wide. To draw a true square easily, do the following: Move the cursor to where you want one corner of the square. Press "B." An endpoint appears. Press "S". Two guidelines through the first corner of your square appear at 45 degree angles (only momentarily if you have the guidelines toggled off (see Section 10.3)). The 18 state is now "SQUARE." Move the cursor in one of the four diagonal directions using the Numeric Keypad keys ("7," "9," "3," or "1"). The cursor moves ONLY along one of the guidelines. A square is drawn, following the cursor. If you want to move along the other guideline, press "F2". The square is erased and the cursor returns to the first corner. The cursor can then be moved along the other guideline. (Pressing "F2" again returns the cursor to the original guideline.) When you are satisfied with the square, press "F3". The guidelines are erased and four lines are established with endpoints at the corners. Your square is complete, and the state is "FREE." Pressing "Esc" during the square operation erases the guidelines, leaves the cursor where it is and returns to the "BOX" state. You can now finish drawing a box with no guideline restraints, or press "Esc" again to return to the "FREE" state. If squares drawn by this method don't appear as true squares, then you need to adjust your screen's aspect ratio (see Section 23). Note: Drawing a square this way is most useful when the current units are pixels (the default when you load PictureThis). If you change to other units (such as inches or centimeters), the cursor moves AUTOMATICALLY the same distance in the vertical and horizontal direction each time a cursor key is pressed, so a true square can be drawn simply by pressing a diagonal cursor key after pressing "B". (See Section 19.) While drawing a square, the cursor moves along the guideline in 1 or 10 (NOT the fast cursor speed) pixels per key press ONLY, regardless of the current units. 8.3 DRAWING A CIRCLE Move the cursor where you want the center of the circle and press "O" (for "oval"). Two guidelines will appear through the cursor, one vertical and one horizontal (only momentarily if you have the guidelines toggled off (see Section 10.3)). The state is now "CIRCLE." Move the cursor to the left or right along the horizontal guideline (using Numeric Keypad keys "4" or "6"). A circle is drawn through the cursor, centered where the guidelines cross. When you are satisfied with the circle, press "F3." The guidelines are erased, and four Bezier curves closely approximating a circle are established with their endpoints at the top, bottom, left, and right. These curves can 19 subsequently be treated just like Bezier curves drawn independently of each other. The cursor returns to the center of the circle; this facilitates drawing concentric circles. (To locate the center of a circle previously drawn, see Section 22.2.) The state returns to "FREE." Pressing "Esc" during the circle operation erases the circle and guidelines, returns the cursor to the center of the circle, and returns the state to "FREE." If circles drawn by this method don't look like true circles, then you need to adjust your screen's aspect ratio (see Section 23). To draw a circle with its side or top endpoints at particular locations, see Section 26.7. 8.4 DRAWING AN OVAL Start as for drawing a circle, by pressing "O" when the cursor is where you want the center of the oval (ellipse). Move the cursor to the right or left along the horizontal guideline to produce a circle. Press "F2." The cursor jumps to the vertical guideline, where it intersects the circle. The state is now "OVAL". Move the cursor up or down (using Numeric Keypad keys "8" and "2"). An oval (ellipse) is drawn through the cursor and the previous position of the cursor on the horizontal guideline, centered where the guidelines cross. Pressing "F2" again returns the cursor to its previous position on the other guideline. You can move the cursor on that guideline. When you are satisfied with the shape of the oval, press "F3." The guidelines are erased and four Bezier curves closely approximating an oval (ellipse) are established, with their endpoints at the top, bottom, left, and right sides of the oval. These Bezier curves can be treated as any other Bezier curves. The cursor returns to the center of the oval, and the state returns to "FREE." Pressing "Esc" during the oval operation erases the guidelines and the oval, returns the cursor to the center of the oval, and returns the state to "FREE." If you want an oval oriented other than horizontally and vertically, you can rotate it (see Section 17.4). If you want an oval to be aligned so that its side endpoints are at particular locations, see Section 26.7. 9. FINDING ENDPOINTS To move the cursor to an endpoint of a previously drawn curve, first press the "Del" key on the Numeric Keypad (with "NUMLOCK" not toggled on and "SHIFT" NOT pressed). The cursor 20 will jump to the endpoint which is APPROXIMATELY closest to the cursor's position when "Del" was pressed. (The measure of "distance" used by PictureThis here is the sum of the horizontal distance and the vertical distance, rather than the true distance; this allows quicker program operation.) All of the curves having that endpoint will be "dashed" to help you distinguish the endpoint at which the cursor is now located from other nearby endpoints. If you want to move the cursor to another endpoint, press "SPACE" or "+" to shift the cursor to the NEXT closest endpoint on the screen to the ORIGINAL cursor position when the "Del" key was pressed. Or press "-" to move the cursor to the previous endpoint (the FARTHEST endpoint from the ORIGINAL cursor location). Continue pressing "SPACE" or "+" and "-" until the cursor is at the desired endpoint. When the cursor is at the endpoint you want (in order to draw more curves with that endpoint, or to modify existing curves having that endpoint, etc.), press any key except "SPACE", "+", "-", "Enter", or "Esc". The cursor will remain at the endpoint and the operation indicated by the key pressed will be carried out (e.g., if "F1" was pressed, a new curve will be started; if a currently invalid key is pressed, the speaker will beep). If you prefer to remain at the endpoint but NOT start another operation, press "ENTER." In either case, the curves that were dashed will be returned to normal. Pressing "Esc" at any time during the operation moves the cursor back to its original position when "Del" was pressed and returns all dashed curves to normal. The cursor can be moved to an endpoint by using this operation any time you can move with the cursor keys, except when moving along a guideline (see Sections 8.2, 8.3, 8.4, 10, and 11). Because the internal coordinates of the endpoints are much finer than the screen resolution (see Section 19.3) the cursor can APPEAR to be at an endpoint when it ISN'T -- the screen resolution is too low to distinguish "close to" from "at." IF YOU WANT TO POSITION THE CURSOR ON AN ENDPOINT, USE THE SELECT ENDPOINT OPERATION TO BE SURE. 10. SMOOTHING CURVES Using smoothing, you can draw a succession of curves end- to-end so that two curves sharing an endpoint also have the same slope (are tangent to each other) at the shared endpoint. Smoothing can be accessed either manually or automatically. 10.1 MANUAL SMOOTHING For manual smoothing, during the drawing of a curve (after "F1" has been pressed at least once to define an endpoint), 21 press: S to move the cursor to the endpoint associated with the currently selected control point IF ONE OR MORE PREVIOUSLY DRAWN CURVES ALSO HAVE THAT ENDPOINT. If NO previously drawn curves also have that endpoint, then you will hear a BEEP if the speaker is toggled on (and you will see an error message if toggled on); the cursor will remain where it is. If there is ONE previously drawn curve with ONE end at that endpoint, a line tangent to that previously drawn curve at the endpoint will appear. If there are TWO OR MORE previously drawn curves with that endpoint, or ONE previously drawn curve with BOTH of its ends at that endpoint, a prompt ("Next: +, Space"/ "Previous: -"/"Select: Enter") will appear on the left side of the screen, and one of the previously drawn curves will be "dashed" to distinguish it. If you want to draw the new curve tangent to the "dashed" curve at their shared endpoint, press: ENTER A guideline tangent to the "dashed" curve at its endpoint will appear. Otherwise, by pressing "SPACE", "+", or "-" repeatedly, you can cause each of the previously drawn curves with the selected endpoint to be "dashed" successively. When the curve to which you want the new curve being drawn to be tangent at their shared endpoint is "dashed," you should press "ENTER" to select it. A guideline tangent to the "dashed" curve at its endpoint will appear. (For a previously drawn curve with both ends at the endpoint, pressing "ENTER" when that curve is "dashed" will cause a guideline tangent to one of its ends to appear; if you want to select the tangent to the OTHER end, instead press "Esc," then "S," and then "SPACE", "+", or "-" (repeatedly) to cycle through the curves until the curve with both ends at the selected endpoint again becomes "dashed". This time when "ENTER" is pressed, a guideline tangent to the OTHER end will appear.) The new curve's control point associated with the shared endpoint is constrained to move along the tangent guideline. To move the control point with the cursor, use the cursor key on the Numeric Keypad closest to the tangent's direction (away from the previously drawn curve) first. Then use the opposite cursor key to move the other direction on the guideline. (By pressing the "Ins" key, you can toggle the cursor to move 1 or 10 (NOT the fast cursor speed) pixels (NOT any other units, regardless of the current units) along the guideline.) The new curve being drawn and the previously drawn curve will have the same tangent at the endpoint they share: the two curves together form a SMOOTH curve (OR, if you move the control point back along the tangent guideline in the direction of the previously drawn curve, the two curves form a CUSP). NOTE: To guarantee a truly smooth curve or a true cusp, you MUST move the control point of the new 22 curve which is associated with the shared endpoint AT LEAST ONE pixel along the tangent guideline. On a tangent guideline, control point position is indicated by a "missing" (background-colored) pixel. Move between the two control points of the new curve by pressing "F2" as usual. A control point not constrained to move along a tangent line is moved by pressing the Numeric Keypad number keys, as usual. Note that BOTH control points of a new curve can be constrained by smoothing, if both of the new curve's endpoints are located at endpoints of previously drawn curves (press "S" when one of the control points is selected, select a previously drawn curve for smoothing, then press "F2" to choose the other control point, press "S" again, and select another previously drawn curve for smoothing). After shaping the new curve as you desire by positioning its control points, press "F3" to set it; this also erases any tangent guidelines. While drawing with smoothing, pressing "Esc" when the cursor is at the control point associated with an endpoint WITH a tangent constraint causes the tangent guideline to be erased and leaves the cursor at the same position; then that control point can be moved WITHOUT constraint by the Numeric Keypad number keys. Pressing "Esc" when the cursor is at the control point associated with an endpoint WITHOUT a tangent constraint erases any tangent guidelines, and behaves as the usual escape from a curve (see Section 7.2). 10.2 AUTOMATIC SMOOTHING For quick drawing of a succession of continuous smooth curves, you can toggle automatic smoothing on by pressing: A Pressing "A" a second time toggles automatic smoothing off and results in the cursor returning to the first endpoint of a curve, instead of the second endpoint, when the curve is set. Pressing "A" a third time results in the cursor returning to the second endpoint of a curve when the curve is set, with automatic smoothing toggled off. This toggling can be done almost any time that a menu does not appear at the top of the screen, and the toggled state will remain in effect until you press the key again. The automatic smoothing indicator in the status box reads "A " when automatic smoothing is off and the cursor returns to the second endpoint when a curve is set, "A+" when automatic smoothing is on and the cursor returns to the second endpoint when a curve is set, and "A-" when automatic smoothing is off and the cursor returns to the first endpoint when a curve is set. With automatic smoothing ON, just after you have finished drawing a curve ("F3" has been pressed and the cursor is positioned at the second endpoint of the curve), if you press "F1" to start drawing a new curve with its first endpoint at the second endpoint of the curve just drawn, a guideline tangent to the curve just drawn will appear at its second 23 endpoint. Proceed by defining a second endpoint for the new curve as usual (move the cursor with the Numeric Keypad number keys and press "F1" again). The control point associated with the first endpoint of the new curve (which is also the second endpoint of the curve just drawn) will be constrained to move along the tangent guideline. Other details are as given above with manual smoothing selected. 10.3 REMOVING GUIDELINES If you don't want to see tangent guidelines during smoothing, or if you don't want the guidelines shown when drawing a circle, oval, or square (perhaps for a better view of an area of a drawing having many curves close together), press: E This is a toggle; pressing it again restores the guidelines to view. "Invisible" guidelines still constrain cursor movement during smoothing or while drawing a square or an oval, just as visible guidelines do. The guideline erase indicator in the status box reads "E-" if the guidelines appear, "E+" if they are invisible. 11. CUTTING CURVES Curves can be connected to each other with precision ONLY at shared endpoints (see Section 26.1) -- but you CAN attach new curves to arbitary points on previously drawn curves. How? By "cutting" a previously drawn curve into TWO smoothly connected curves, which together very closely approximate the original curve. These two curves share a new endpoint resulting from the cutting operation. To begin cutting a curve, press: F5 The state changes to "CUT" and the cursor moves to the nearest endpoint; all curves associated with that endpoint are dashed, just as if you had pressed "Del" (see Section 9). You may now press "SPACE", "+", and "-" repeatedly, until the cursor is on one of the endpoints of the curve you wish to cut. Then press "ENTER" to select that endpoint. If only one curve is associated with the selected endpoint, it will become dashed. If two or more curves are associated with the selected endpoint, choose the particular curve you want to cut as usual, with the "SPACE", "+", "-", and "ENTER." The curve does not have to be entirely on the visible screen. Next, move the cursor ALONG the curve with the cursor keys. The "Ins" key on the Numeric Keypad can be used to switch the cursor movement increment between 1 and 10 pixels. (If the curve goes off the edge of the screen and then back onto the screen, the moving cursor will jump from where the curve leaves the screen to where it reenters the screen.) When the 24 cursor is located where you want a new endpoint, press: F3 A new endpoint and two new curves replace the original curve. The new curves have the same line parameters as the original curve (see Section 12.3). These new curves are automatically inserted into the trail that the original curve was a part of, in place of the original curve (see Section 14).