25 PICTURETHIS "SHAREWARE" VERSION RELEASE 2.00 MAY 1, 1989 USER MANUAL, PART 2 OF 5 PARTS Copyright 1988, 1989 by Patricia Y. Williams and Gregory Williams, All Rights Reserved. 12. MODIFYING CURVES To alter a previously drawn curve, press: F4 The state is now "CURMOD." The cursor automatically jumps to the nearest endpoint and any curves associated with that endpoint are dashed (as if you just pressed "Del"). You may then press "SPACE," "+", and "-" repeatedly (see Section 9) until the cursor is on one of the endpoints of the curve you want to modify. Then press: ENTER If there is only one curve with the selected endpoint, it will become dashed and a menu box (described below) will appear at the top of the screen. If there are more curves than one with the selected endpoint, a box with instructions ("Next: +, Space"/"Previous: -"/"Select: Enter") will appear on the left side of the screen, and one curve with the endpoint will be dashed to distinguish it. If you want to alter the dashed curve, press: ENTER Otherwise, by pressing "SPACE," "+," and "-" repeatedly, you can cause each of the curves with the endpoint to be dashed successively. When the curve you want to modify is dashed, press "ENTER" and a menu box appears at the top of the screen. There are three options: Erase, Change, and Line. Pressing "Esc" backs out to the FREE state. 12.1 ERASING A CURVE While in the "CURMOD" state, the Erase option is accessed by pressing: E This places a prompt in the menu box ("Erase selected curve (Y/N)"), and sets the state to "ERASE." If you want to erase 26 the curve, press "Y." This erases the dashed curve. The cursor remains at the originally selected end point, the menu box disappears, and the state returns to "FREE." Any other key will not erase the curve, and returns you to the curve modification menu and state "CURMOD." You cannot erase a curve that bounds a filled area unless you first change the fill to none (-1) (see Section 14.3). If you try to erase such a curve, an error message will appear, the curve modification menu will come back up, and the state will return to "CURMOD." 12.2 CHANGING A CURVE While in the "CURMOD" state, the Change option is accessed by pressing: C IF both endpoints of the selected curve are on the screen, this changes the selected curve into a straight line (with the same endpoints), and allows changing its SHAPE, BUT NOT ITS ENDPOINTS. The state is now "CHANGE." (If one of the selected curve's endpoints is not on the screen, you will hear a BEEP (and see an error message if toggled on), and be returned to the "FREE" state.) Change the shape of the replacement curve via the "F2," cursor, and "F3" keys, as described above in Section 7.2. You can also smooth the changing curve as in Section 10.1. During changing, the original curve is shown "dashed"; this "dashed" curve disappears when "F3" is pressed to complete the changing procedure. Note: during the changing procedure, if "Esc" is pressed, the original curve returns, with the cursor at the starting endpoint, and the state is returned to "FREE." 12.3 CHANGING A CURVE'S LINE PARAMETERS Each curve has three line parameters associated with it: line weight ("thickness"), line gray percentage (the gray shading of the curve, ranging from white to black), and linecap (the way the end of a thick curve appears). As each curve is drawn, it is assigned the current GLOBAL values for these parameters. When PictureThis is first loaded, the values for the global parameters are as follows: line weight, 1 PostScript point (EXACTLY 1/72 inch; NOT equal to 1 traditional printer's point, which is only APPROXIMATELY 1/72 inch); line gray, 100% (black; 0% corresponds to white); linecap, round. These GLOBAL line parameters may be changed at any time (see Section 15). The following steps will change the SELECTED curve's line parameters ONLY, from the "CURMOD" menu. The Line option is accessed by pressing: L 27 This allows changes in the line weight, the line gray percentage, and the line cap of the "dashed" curve. The state changes to "THISLN," and a line parameter change menu appears. The top line of this menu lists the items that can be changed (Weight, Gray, and Linecap) and the word Keep. The second line of the menu displays the current values of these parameters for the selected curve. 12.3.1 CHANGING LINE WEIGHT To change the weight of the selected curve, press "W." A line weight prompt will appear. Its first line displays the current line weight in PostScript points (one PostScript point = EXACTLY 1/72 inch). The second line requests that you enter the line weight in points. If you are satisfied with the current line weight, press "ENTER" or "Esc"; this will take you back to the line parameter menu with no change in the line weight. If you want to change the line weight, enter a number between -1.00 and 327.00. If you set the line weight between .01 and 327.00, the weight of the curve on the Quickshow screen (see Section 13) and the PostScript output will equal that value (or as close as the output device allows). If you set the weight to 0, the curve's thickness will be the smallest available on the particular output device used (fairly thin on 300 dpi laser printers; almost invisible on 2540 dpi imagesetters). If you set the weight to a negative number, it will be stored as -1. A -1 line weight in PictureThis means that the curve is a "construction" or "blue" curve; that is, it will not appear on the output at all, but is used only as a reference curve, or is part of a trail filled with a gray shade, but not actually appear itself (see Section 14.3). A curve with a line weight of -1 is shown as dotted on the drawing screen of PictureThis, but does not appear at all on the Quickshow screen (see Section 13) or the Viewscreen (see Section 24.1). An invalid input will result in an error message (and a chance to try again). After you have entered a valid line weight, the line parameter menu will reappear with the line weight in the second line changed to indicate your entered line weight. 12.3.2 CHANGING LINE GRAY To change the selected curve's gray shade, press "G." A line gray prompt will appear. The first line of this prompt indicates the current line gray, from 0% (white) to 100% (black). The second line requests that you enter the line gray percentage. If you are satisfied with the current gray, press "ENTER" or "Esc," and the line parameter menu will reappear with an unchanged line gray percentage. If you want to change the line gray percentage, enter a number between 0 (white) and 100 (black). An invalid entry will result in an error message (and a chance to try again). When you have entered a legal line gray percentage, the line parameter menu will reappear with the line gray percentage in the second 28 line changed to indicate your entered line gray percentage. 12.3.3 CHANGING THE LINECAP To change the selected curve's linecap, press "L." A linecap menu appears. The first line of the menu shows the current linecap. The second line allows you to change the cap to Butt, Round, or Square. Pressing "Esc" returns to the line parameter menu without changing the linecap. Pressing "B," "R," or "S" changes the linecap to butt, round, or square, respectively, and returns to the line parameter menu with the new linecap displayed on the second line. For thin lines, the linecap is of little consequence, since it is barely visible. For thick lines, the linecap is significant. A butt cap is a square end perpendicular to the end of the curve and ending at the end of the curve. A curve with a round cap ends with a semicircular cap that has a radius one-half the line width, extending beyond the end of the curve. A square cap ends with a square perpendicular to the end of the curve and extending out from the end of the curve by one-half the width of the line. The best way to see these differences is to draw three horizontal lines on the screen with the same high line weight (say, 100 points), and set each to have different linecaps. Then view the lines on the Quickshow screen (see Section 13). 12.3.4 SAVING THE LINE PARAMETERS To save the line parameters displayed on the second line of the line parameter menu, press "K" (for keep). This will save the line parameters for the selected curve and return to the "FREE" state. If you press "Esc" while the line parameter menu is on the screen, any changes that you made to the weight, gray percentage and linecap since the last keep will NOT be saved. You can change any of the line parameters any number of times before you press "K." Only the final values will be saved. 13. QUICKSHOW SCREEN The Quickshow screen allows you to see a quickly drawn screen representation corresponding to the PostScript "showpage" output. To see the Quickshow screen for the current drawing screen (only in the "FREE" state), press: Q The Quickshow screen is available at any magnification and can be zoomed and scrolled (see Section 6). The Quickshow screen clips curves at the current frame boundaries and shows approximations for proper line weights, line gray percentages, and linecaps (see Section 12.3). It also shows trail joins and fills (see Section 14), and layering of 29 objects (see Section 16.4). Of course, the low resolution of the screen makes the representation of fine lines impossible (they are represented by a single pixel width), the curves have the "jaggies", and the grays are only approximate, but the Quickshow screen is a good way to predict what the PostScript output will look like. When the Quickshow screen has finished drawing, pressing "Esc" will return the state to "FREE" and restore your drawing screen to what was last showing on the Quickshow screen. If there is adequate memory available and no zooming or scrolling has taken place, the drawing screen will be restored instantly, instead of being redrawn. Pressing "Esc" while the Quickshow screen is drawing will stop the drawing. Pressing "Esc" again will return to the "FREE" state. Very wide curves may appear rather slowly on the Quickshow screen when drawn with the highest possible precision (especially if you have a "slow" computer). For this reason, there is a user-settable "flatness" parameter that allows a trade-off between the speed and accuracy of such curves on the Quickshow screen. To set this parameter, press "F9." The state will change to "MISC," and the miscellaneous operations menu will appear. To change the flatness parameter, press "F." A Flatness menu will appear, and you will be able to choose between flat (faster) curves (by pressing "F") or round (more accurate) curves (by pressing "R"). The initial setting for the flatness parameter is flat (faster). If they are very wide, flat curves are indeed "flatter" than round curves on the Quickshow screen, but not on the PostScript output. Saving and retrieving drawing files can be done while on the Quickshow screen (see Section 18). 14. TRAILS, FILLS, AND JOINS A trail is a group of curves. Trails are useful because they can be filled with a gray shade ("colored"), and the points where the curves in a trail meet can be made to join in a neat manner (important for wide curves). (Trails are similar but not identical to the "paths" defined in the PostScript language.) The most common trails are continuously connected curves. If you draw a curve, then follow that by drawing another curve connected so that its first endpoint is the same endpoint as the first curve's second endpoint, (that is, you press "F1" for the first endpoint of the second curve without moving the cursor after you pressed "F3" to establish the first curve), you have drawn a trail of two curves. As long as you continue to connect the curves in this manner, they are all automatically in one trail. If you connect the second endpoint of the final curve in your trail to the first endpoint of the first curve, you have made a closed trail. Closed trails can be filled with a gray shade. (Actually, open trails can be filled too, but this is not usually desirable.) Boxes, squares, circles, and ovals are all 30 automatically made into closed trails. Most of the time while drawing in PictureThis, you do not have to be concerned about trails. They are automatically made for you as you draw curves. Every curve is placed in a trail, as noted above (some trails contain only one curve), and no curve is in more than one trail. However, if you want to fill an area that is enclosed by curves that were not continuously drawn or if you want to manipulate only part of an existing trail, you can still do so by defining a new trail (see Section 14.1). You can also define trails that are made of two or more disjoint subtrails. These are useful for doing some "fancy" filling, especially for making holes in filled areas (see Section 14.3.2). To define or modify existing trails, access the trail menu by pressing: F6 The state is changed to "TRAIL," and the trail menu appears. This menu allows you to define a new trail, or erase, fill, or change the line parameters for an existing trail. 14.1 DEFINING A TRAIL PictureThis allows you to define a trail out of any predrawn curves. To start this operation while in the "TRAIL" state, press: D The state changes to "DEFTRL," the cursor jumps to the nearest endpoint, and any curves with that endpoint are dashed (just as if you had pressed the "Del" key). You may then press "SPACE," "+," and "-" repeatedly until the cursor is on the endpoint where you want to begin your trail. Then press: ENTER A box with instructions ("Next curve: +, Space"/"Select curve: Enter"/"Next endpoint: Del"/"Done: D") appears on the left side of the screen, and one curve with the endpoint is dashed to distinguish it. If you want to start the trail with the dashed curve, press: ENTER Otherwise, by pressing "SPACE," "+," and "-" repeatedly, you can cause each of the curves with the endpoint to be dashed successively. When the curve with which you want to start the trail is dashed, press "ENTER." This curve is dashed-and- dotted to show that it has been chosen as part of your trail, and the cursor moves to the other endpoint of the curve, where you can again select any curve (except ones already selected for the trail) to be the next curve in the trail. 31 Continue with this process until the final curve which you want in the trail is selected. Then press: D Your trail is established. Alternatively, if your trail is to be made of disjoint subtrails (see Section 14.3.2 for why you would want to do this), at any endpoint, instead of selecting an associated curve, you can move the cursor to another endpoint to start a new subtrail by pressing "Del," followed by "SPACE," "+," and "-" repeatedly, and finally "ENTER" to select a new endpoint as usual. Then you can continue, as above, selecting curves for your subtrail. You can make as many subtrails as you want. When the entire trail is complete, press "D" to establish it. (Note: if in the process of defining the trail, you reach an endpoint for which all associated curves have already been chosen for the trail, you have a choice only of pressing "D" to establish the trail or "Del" to start another subtrail.) If at any time during the trail definition process you press "Esc," the selected curves are returned to normal, the state becomes "TRAIL," and the trail menu reappears. When your trail has been established, it remains "dashed- and-dotted" while two prompts appear allowing the specification of a fill percentage and changed line parameters for the newly defined trail. The first prompt asks for a gray fill percentage and is identical to the prompt described in Section 14.3.1. (Note that once your trail has been established by pressing "D," you cannot "Escape" back into the trail defining process. Pressing "Esc" while at the fill prompt just continues with the next prompt and leaves the defined trail with no fill.) The next prompt states: "Change parameters of ALL curves (Y/N)?" If you answer "Y," a line parameter menu identical to the one described in Section 14.4 will appear, and you will be able to change the line parameters of all curves in the trail to be identical and to set the join parameter for the trail. When these two prompts have been answered, the new trail will be returned to normal and the state will be returned to "FREE." What happens to the previously defined trails that contained curves now in the newly defined trail? PictureThis automatically takes care of this in one of two ways: a. If a curve was in a trail that had a fill, or was part of an object (see Section 16), the curve is automatically duplicated, so identical curves are in the old and new trails. (Remember, a curve cannot be in more than one trail at a time.) b. Otherwise, the curve is removed from its old trail. (If all curves are removed from a trail, it becomes undefined.) The process of defining a trail sounds very complicated in 32 words, but it is actually quite simple for the most common trails (simple closed trails), and not very difficult for even quite complex trails. PictureThis automatically does most of the work for you. Just try it and check your results with the Quickshow screen. Also, if you are careful to draw curves continuously, as described above, you will seldom have to overtly define a trail. 14.2 ERASING A TRAIL An entire trail can be erased, whether filled or not, while the trail menu appears, by pressing: E The state changes to "ERASE," the cursor jumps to the closest initial point of a trail, and the entire trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first endpoint selected for manually defined trails.) A box with instructions will appear on the left side of the screen ("Next: +, Space"/ "Previous: -"/"Select: Enter"). If the dashed trail is the one you want to erase, press: ENTER If you want to select a different trail, press "SPACE," "+," and "-" repeatedly until the trail you want to erase is dashed, then press "ENTER." If only one trail exists, it will automatically be selected, and the instruction box will not appear. (If you press "Esc" during this process, the trail menu will reappear, and the state will return to "TRAIL.") A prompt appears: "Erase selected trail? (Y/N)." If you want to erase the dashed trail, press "Y"; the trail is erased and the state returns to "FREE." Otherwise, press any other key; the trail menu reappears and the state returns to "TRAIL." 14.3 FILLING A TRAIL An already existing trail (either automatically or manually defined) can be filled with a gray shade. 14.3.1 SPECIFYING A FILL GRAY PERCENTAGE While in the "TRAIL" state, to fill an unfilled trail, or to change the gray percentage of (or "unfill") a previously filled trail, press: F The state changes to "FILL," the cursor jumps to the closest initial point of a trail, and that trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first 33 endpoint selected for manually defined trails.) A box with instructions will appear on the left side of the screen ("Next: +, Space"/ "Previous: -"/"Select: Enter"). If the dashed trail is the one you want to fill, press: ENTER If you want to select a different trail, press "SPACE", "+", and "-" repeatedly until the trail you want to fill is dashed, then press "ENTER." If only one trail exists, it will automatically be selected, and the instruction box will not appear. (If you press "Esc" during this process, the trail menu will reappear, and the state will return to "TRAIL.") A fill prompt appears. The first line of the prompt gives the current fill percentage, from 0% (white) to 100% (black). A fill percentage of -1% means that the trail is not filled. The second line requests that you enter a gray percentage. If you are satisfied with the current fill gray percentage, just press "ENTER" and it will not be changed. If you want to "unfill" the trail, enter a -1 at the prompt. Otherwise, enter a number between 0 (white) and 100 (black). Upon your valid entry, the trail is filled and the state returns to "FREE." (If you press "Esc" instead of entering a fill, the state will return to "TRAIL," and the trail menu will reappear.) The Quickshow screen shows approximate grays as 33 gradually darkening patterns. Actual grays on PostScript output devices vary considerably. You will have to experiment with the grays on the particular printer you are using to find the best ones for your drawings. 14.3.2 RESULTS OF FILLING A TRAIL PictureThis (and PostScript) fills are quite different than those of "paint" programs in which a fill "paints" the interior of a simple closed boundary. There are three main differences: a. PictureThis fills are "opaque." If one trail overlaps another trail, and the trail "in front" is filled, the portions of the second trail that are "behind" the first trail will not be visible at all on the Quickshow screen or on the PostScript output. Try this by drawing a circle and filling it with some shade of gray. Then draw a box that overlaps the circle and fill it with a different shade of gray. Now look at it on the Quickshow screen. Part of the circle is entirely covered by the box. You can actually see the circle draw and then see the box cover it. It is as if the box were cut out and pasted on the drawing. The order in which trails are "pasted" on the Quickshow screen (and the PostScript output) is initially determined by the order in which they are drawn or defined (the earliest are "pasted" on first), but the order can be easily changed (see Section 16.4). 34 b. PictureThis trails that form simple closed boundaries, such as boxes or circles, are filled exactly as you would expect: the interior is filled with the selected shade of gray. (This is the most useful type of trail to fill and should suffice for most purposes.) But trails are not at all limited to simple closed boundaries. A single trail can cross itself many times, and can have many disjoint subtrails. How does PictureThis determine which parts of a complex trail will be inside the trail, and thus filled? It uses the "non- zero winding number rule." This means that starting at any point, it (conceptually) draws a line from that point in any direction to infinity, examining each curve of the path the line crosses. Starting with a count of zero, it adds one each time a curve crosses the line from left to right and subtracts one each time a curve crosses the line from right to left. When it has completed crossing all the curves in the trail along the line, if the count is zero, the starting point is outside the trail and will not be colored gray; otherwise, the point is inside the trail and will be colored. What does that mean in practice? It means that the directions in which trails are drawn or defined is important for complex trails. However, you will rarely have to worry about the the direction of trails. It is fun to draw or define complex trails with many crossings and subpaths and then fill them and view them on the Quickshow screen. However, it is not very useful for "real" drawings most of the time. There is one exception though; you might occasionally want to create a "window" or "hole" through a trail, to let what is behind the trail show through. This is very simple. As an example, try this. Draw two boxes, one with its boundaries totally inside the other, like a window in a door. Now define a new trail consisting of two subtrails (the two boxes) as follows: Press "F6" to access the trail menu. Press "D" to define a trail. Press "+" until the cursor is on the lower left endpoint of the outer box, and then press "ENTER." Press "+" and "ENTER" or just "ENTER" to select the left side of the box. The left side of the box is dashed-and-dotted, indicating that it is part of the trail, and the cursor jumps to the top left corner of the outer box. Press "ENTER" three more times, selecting the top, right, and bottom sides of the outer box. The cursor should now be at the lower left corner of the outer box again, and the outer box should be all dashed-and-dotted. Now press "Del" followed by "+" repeatedly until the cursor is on the lower left corner of the inner box. Then press "ENTER." Now select the bottom of the inner box and press "ENTER." Press "ENTER" three more times to select the right, top, and left sides of the inner box. Notice that you defined the subtrail of the inner box in the OPPOSITE DIRECTION to the subtrail of the outer box. (That is what is important, not which endpoint you start with, or which direction you initially choose.) Now press "D" to establish the trail. At the fill prompt, enter some shade of gray and press any key except "Y" for the question about changing the parameters of all curves in the trail. Now press "Q" to see the Quickshow screen. Your screen 35 should show you a box with a box-shaped "window" in it. Anything behind the trail will show through the window. This procedure generalizes to much more complex shapes in the obvious way; just be sure the inner trail is defined in the opposite direction to the outer trail if you want a "window." (If the inner and outer trails are defined in the same direction, the window will be filled.) c. PictureThis can fill trails that are not closed. It does this by drawing a straight line of line weight -1 (a construction line) from the final endpoint of each subtrail to the first point of that subtrail, and then filling the resulting trail. Try it. Draw a trail of two curves on the screen (with the second endpoint of the second curve NOT the same as the first endpoint of the first curve) and then fill it. PictureThis will automatically connect the end of the trail with the beginning of the trail and fill the resulting trail. You'll probably find that this is rarely useful. 14.4 CHANGING THE LINE PARAMETERS OF A TRAIL PictureThis allows you to change the line parameters for ALL of the curves in a trail at one time. Trails can be made up of curves of different line weights, line gray percentages, and linecaps. (This is where trails differ from PostScript "paths.") However, it is usually (but not always) better for all the curves in a trail to have the same line parameters (see Section 14.4.3). To change the line parameters for all of the curves in a trail, while in the "TRAIL" state press: L The state changes to "TRLNS," the cursor jumps to the closest initial point of a trail, and the entire trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first endpoint selected for manually defined trails.) A box with instructions appears on the left side of the screen ("Next: +, Space"/ "Previous: -"/"Select: Enter"). If you want to change the line parameters of the dashed trail, press: ENTER If you want to select a different trail, press "SPACE," "+," and "-" repeatedly until the trail you want to change is dashed, then press "ENTER." If only one trail exists, it will automatically be selected and the instruction box will not appear. (If you press "Esc" during this process, the trail menu will reappear, and the state will return to "TRAIL.") A line parameter menu appears, similar but not identical to the line parameter menu for single curves (see Section 12.3). The top line of this menu shows the items that can be changed (Weight, Gray, and Linecap, as before, and a new item: Join) 36 and the word Keep. The second line of the menu displays the current values of these parameters for the selected trail. If any of these parameters have different values for different curves in the trail, the word "MIXED" will appear under that parameter. 14.4.1 CHANGING THE LINE WEIGHT, LINE GRAY, AND LINECAPS FOR ALL CURVES IN A TRAIL To change the line weight, line gray percentage, or linecaps for all the curves in a trail, press "W," "G," or "L," and proceed exactly as for a single curve (see Section 12.3). (Note: you can subsequently change the line parameters of any individual curve in the trail to any value.) 14.4.2 CHANGING THE JOIN FOR A TRAIL The word "Join" in the top line of the menu refers to the manner in which the curves in a trail are connected together where they join at endpoints. Like linecaps, linejoins are insignificant for thin lines, but important for thick lines. To change the linejoin of a trail, press "J." The join menu appears. The first line shows the current linejoin. The second line requests that you enter a new linejoin. The three possible linejoins are mitered, rounded, and beveled. For mitered joins, the outside edges of the curves are extended in straight lines until they meet, and filled in. For rounded joins, the curves are connected by a rounded end, formed by a circle that has a diameter equal to the line width. For beveled joins, the curves are finished with butt linecaps and filled in to form a bevel. If a mitered join is specified for a join where two curves meet at a small angle (anything less than approximately 11 degrees), the join is beveled to prevent the join from being too long. When a trail is drawn or defined, the join parameter for that trail is set to the current global linejoin. The initial setting for the global join in PictureThis is rounded, but this can be changed at any time (see Section 15). Boxes are always given mitered joins (square corners) initially, no matter what the global join value, but a box's join can be changed later. To set the join for a trail, press "M," "R," or "B" for mitered, rounded, or beveled linejoins, respectively. Pressing "Esc" will not change the current linejoin. In all of these cases, the line parameters menu will reappear. When you are satisfied with all the line parameters, press "K" for keep; the line parameters for all of the curves in the trail and the trail's join are changed, and the state returns to "FREE." (If you press "Esc", the parameters will not be changed, the state will return to "TRAIL," and the trail menu will reappear.) The best way to understand the different linejoins is to set the global line weight to some high value, say 100 points (see Section 15), then draw three similar trails having at least two curves that meet at an angle, set the 37 linejoin values differently for each of the trails, and view their joins on the Quickshow screen. Also try drawing a box and changing its linejoin value. 14.4.3 TRAILS MADE OF CURVES WITH DIFFERENT LINE PARAMETERS If a trail is made of curves all of which have the same line weight and line gray percentage, the joins at all endpoints will be set by the linejoin specified for the trail. If the trail is closed (or subtrails are closed), even the final join of the trail (or subtrail) where the final curve connects to the initial curve will be as specified. If the trail (or subtrail) is not closed, the linecaps at BOTH ends of the trail (or subtrail) will be whatever linecap is specified for the LAST curve of the trail (or subtrail). If a trail is made of curves of different line weights or different line gray percentages, each time there is a change in either or both parameters along the trail, PictureThis treats it as a the beginning of a new subtrail (even if the last curve is connected to the current one). That is, as long as the weight and gray are the same for each successive curve, the joins are the specified join, but if the next curve has a different weight and/or gray, the "subtrail" will end with a linecap that is the same as that of the last curve before the change (its first linecap will be the same, too). Then the next curve will start with a linecap. NO JOIN WILL BE MADE. If there are any changes in weight or gray along a closed trail, the final join will NOT be joined even if the last curve is the same line weight and gray as the first curve. If you are in doubt as to which linecaps and joins will appear on a particular trail, check it on the Quickshow screen, at large magnification if necessary. As you can see, it is generally easier and desirable to have trails with curves all of one line weight and gray, but there are times when you want to fill an area bounded by curves of different grays or line weights. This is perfectly legal, and, if you are careful, the places where two linecaps meet can look perfectly acceptable (see Section 26.4). 15. SETTING THE GLOBAL LINE PARAMETERS The global line parameters can be set while in the FREE state by pressing: L The state changes to "NEWLNS" and a line parameter menu identical to the one for changing the line parameters of a trail appears (see Section 14.4). By pressing "W," "G," "L," or "J," you can change the line weight, line gray percentage, linecaps, or linejoin, respectively, of all curves and trails that are drawn after the change is made. The entries for these global parameters are made in exactly the same way as those for individual curves and trails (see Sections 12.3 and 14.4). When "K" (for keep) is pressed, the global values are 38 changed and the state is returned to "FREE." (If "Esc" is pressed, no changes are made and the state is returned to "FREE.") 16. OBJECTS Objects are groups of trails and smaller objects. Objects can be "layered," that is, they can be put "in front of" or "behind" other objects and trails (see Section 16.4). They can be manipulated in many ways: moved, copied, scaled, rotated, flipped, and inclined (see Section 17). And they can be saved as clip art and retrieved for use in other drawings (see Sections 18.3 and 18.4). Objects and their manipulations offer the most significant advantage of PictureThis over a paint program. Instead of "painting" on a surface, with objects you can work with "scissors and glue" (quite easily removable glue!) and a "photocopying machine" that can (irregularly) scale and otherwise distort what it copies. This provides enormous flexibility! In almost all cases, trails that are not in objects can be treated as objects: they can be layered, manipulated, or saved as clip art. On the other hand, objects CANNOT be treated as trails: they cannot be filled or assigned single line parameters or joins. However, the trails that make up an object can have their fills and line parameters changed, can have their individual curves modified, and can even be erased, WITHOUT disassembling the object. As an example of this, consider a very simple drawing of a house. The drawing could be made of four trails: a filled box for the main part of the house, a filled triangle for the roof of the house, and two more filled boxes for a door and window. If you wanted to move the house to another part of the drawing, you could move each individual trail separately, but it would be much easier to group the trails into an object and move them as one. Even after the trails were grouped into an object, you could still change the gray fill percentage for the door without disturbing the rest of the object. No trail or object can be a part of more than one object. The components of a PictureThis drawing can be thought of as forming a tree. Individual curves are the smallest branches. Each curve is in one and only one trail (the next larger branches). Each trail may or may not be in an object (still larger branches). Individual objects may or may not be in larger objects (the largest branches). All trails and objects not in larger objects are in the drawing as a whole (the trunk), and they are in a specific order, ordered by the drawing sequence (or layering). Within each object, the component trails and smaller objects are also ordered by drawing sequence. The curves in each trail are also ordered by drawing sequence (the fills are drawn first, followed by the curves in the order they were drawn or defined). Objects are formed and manipulated through the object menu. To form an object or manipulate an existing object, press: 39 F7 The state will change to "OBJECT" and an object menu will appear. This menu allows you to "group" a new object together, "ungroup" an existing object into its component trails and smaller objects, erase an object, layer objects, and move, copy, scale, rotate, flip, and incline existing objects. 16.1 GROUPING AN OBJECT To group trails and objects into a new object, press: G The state changes to "GROUP," the cursor jumps to the closest initial point of a trail or object, and that entire trail or object is dashed. The initial point of an object is the initial point of the first drawn (rearmost) element of the object. If the first element drawn is a trail, the initial point of the object is the initial point of that trail (see Section 14.2). If the first element drawn is an object, the initial point is the initial point of that object. (An aside to mathematicians: yes, this is indeed a recursive definition.) It is important to note that AN OBJECT OR TRAIL CANNOT BE CHOSEN FOR ANY OPERATION UNLESS ITS INITIAL POINT IS ON THE SCREEN. An instruction box will appear on the left side of the screen ("Next: +, Space"/ "Select: Enter"/"Done: D"). If the dashed trail or object is one you want to include in your new object, press: ENTER The selected object is dashed-and-dotted and the cursor jumps to the next closest initial point of a trail/object. Otherwise, press "SPACE" and "+" repeatedly until the dashed trail or object is one you want to include. Continue in this manner, pressing "SPACE" and "+" to dash different trails/objects and "ENTER" to select trails/objects. When you have selected all of the trails and objects that you want in your new object, press: D All curves return to normal, and the state returns to "FREE." (If you select all available trails and objects, PictureThis automatically makes them all into a new object without your needing to press "D".) The new group of trails/objects can now be manipulated as an object. If you press "Esc" during this process, all dashed and dashed-and-dotted curves are returned to normal, the state returns to "OBJECT," and the object menu reappears. Note that PictureThis does NOT allow you to select trails or objects that are already in other objects. You can only select the "outermost" objects, since no trail or object can 40 be in more than one object. The new object appears in the drawing sequence where the "frontmost" of its elements previously appeared. In other words, if the drawing was layered correctly before the object was grouped, it will remain correctly layered (see Section 16.4). If some of the components of the new object were behind some other object and some were in front of it, they will all now be drawn in front of it, and the Quickshow screen will look different. If only one object or trail is chosen to be in a new object, PictureThis ignores the grouping operation because there is no advantage to grouping a single trail/object. There is also no error message given, since no harm has been done. This would only be noticeable if you grouped a single trail and then tried to ungroup it; it will not ungroup since it was never made into an object. (There is a way to effectively "ungroup" a single trail (see Section 16.2).) Of course, an object with only one element may occur if you group several elements into an object and then erase all but one element.) 16.2 UNGROUPING AN OBJECT At times you might want to "ungroup" or dissassemble an existing object into its component parts. You might want to scale or rotate one of its component parts (see Section 17) and then regroup them; or you might want to relayer its component parts (see Section 16.4). To ungroup an existing object, press: U The state changes to "UNGRP," the cursor jumps to the closest initial point of an object, and the object becomes dashed. An instruction box comes up on the left side of the screen ("Next: +, Space"/"Previous: -"/"Select: Enter"). Press "SPACE," "+," and "-" repeatedly until the object you wish to ungroup becomes dashed. Then press "ENTER." A prompt appears: "Ungroup selected object? (Y/N)." If you want to ungroup the selected object, press "Y." The object will be ungrouped, and the state will return to "FREE." You can now manipulate the component parts of the ungrouped object. If you press any other key, the state will return to "OBJECT," and the object menu will reappear. The ungrouped object's components are placed in the drawing sequence in place of the ungrouped object. The Quickshow screen appears the same before and after ungrouping. Notice that you cannot ungroup a single trail with this operation. Occasionally you may wish to move or otherwise manipulate part of a trail. You can do this by defining PART of the existing trail as a new trail and then manipulating that part (see Section 14.1). If the original trail is not filled and not in an object, the curves in the new trail will be erased from the original trail, and you will have effectively divided the trail into two trails that can be 41 manipulated separately. 16.3 ERASING AN OBJECT An outermost object (or trail) can be erased with all of its component parts, while the object menu appears, by pressing: E The state will change to "ERASE," the cursor will jump to the closest initial point of an object, and the entire object will be dashed. A box with instructions will appear on the left side of the screen ("Next: +, Space"/ "Previous: - "/"Select: Enter"). If the "dashed" object is the one you want to erase, press: ENTER If you wish to select a different object, press "SPACE," "+," and "-" repeatedly until the object you want to erase is dashed, then press "ENTER." If only one outermost object exists, it will automatically be selected and the instruction box will not appear. If you press "Esc" during this process, the object menu will reappear, and the state will return to "OBJECT." A prompt will appear: "Erase selected object? (Y/N)." If you want to erase the dashed object, press "Y"; the object will be erased and the state will return to "FREE." Otherwise, press any other key; the object menu will reappear and the state will return to "OBJECT." Note that with this process you can only erase outermost trails and objects. PictureThis will not allow you to erase a component of an object unless you ungroup it first. In contrast, the trail erase available through the trail menu (see Section 14.2) will allow you to erase any trail, whether it is in an object or not, and the curve erase (see Section 12.1) allows you to erase any curve that does not border a filled area). Erasing an object, trail, curve, or the entire drawing in PictureThis is the only operation that cannot be easily reversed. There is no "undo" in PictureThis, but it was designed to allow you to change anything back to a previous state. Before you erase anything, be certain that you want to erase it. If you are not absolutely certain, you can easily save the entire drawing (see Section 18.2) or a single object (see Section 18.4) before erasing. 16.4 LAYERING OBJECTS All the elements of a PictureThis drawing are drawn on the Quickshow screen and the PostScript output in a specific order. This order is defined by the drawing sequence of the outermost objects and the drawing sequences of each object's components. Since the elements are opaque, a layered effect 42 is created: objects are "behind", "in front of", or "in between" other objects. As you draw or define trails, they are placed at the front of the drawing. Unless you relayer your drawing, the first trail you drew will be drawn first (at the "rear"), followed by the next trail, etc. When trails are grouped together into an object, the object is placed in the layering where its "frontmost" component previously was; so if the Quickshow screen looked correct before the grouping, it will look the same after the grouping. Frequently, the order in which you drew the trails is not the order in which you wish them to appear. Fortunately, this is very easy to correct. To change the layering of objects (and trails not in objects), while in the "OBJECT" state, press: L The state changes to "LAYER," the cursor moves to the closest initial point of an outermost object (or trail) and that object is dashed. An instruction box appears on the left side of the screen ("Next: +, Space"/"Previous: -"/"Select: Enter"). Press "+," "SPACE," and "-" repeatedly until the object that you wish to layer is dashed, then press "ENTER." (If you press "Esc" during this operation, the state will return to "OBJECT," and the object menu will reappear.) Upon pressing "ENTER," a layering menu appears. It allows the choice of moving the selected object to the front or rear of the drawing, or ahead of or behind selected objects. If you press "F" or "R" (for front or rear), the selected object will be moved to the front or rear of the entire drawing, the object will be returned to normal, and the state will return to "FREE." If you press "A" or "B" (for ahead of or behind selected objects), the object you are layering becomes dotted instead of dashed, another object becomes dashed, and an instruction box appears on the left side of the screen ("Next: +, Space"/"Select: Enter"/"Done: D"). Press "SPACE" or "+" repeatedly until an object that you want the "dotted" object to be ahead of or behind is dashed; then press "ENTER" to select that object. The selected object will become dashed-and-dotted, and another object will become dashed. Continue selecting objects in this manner until all of the objects that you wish the dotted object to be ahead of or behind are dashed-and-dotted; then press "D" for done. All of the objects are returned to normal, their layering is as you specified, and the state returns to "FREE." (If you press "Esc" during the process of selecting dashed-and-dotted objects, the dashed-and-dotted objects will be returned to normal, but the dotted object will remain selected, and the layering menu will reappear. Another "Esc" will get you back to the object menu.) Check all layering with the Quickshow screen; since all elements are transparent on the drawing screen, layering can only be observed on the Quickshow screen. Note that layering can only be performed on the outermost 43 objects and trails. To layer the components of an object, it must first be ungrouped (see Section 16.2).