[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 5 Graphics Objects

# 3. Lines, Polylines, and Polygons

With the line option, you can create polygons, polylines (a series of connected lines), and plain, ordinary lines.

Recall from the last chapter that when you choose an object to create from the Create menu, the mouse's pointer becomes a box with a dot in the middle of it. As you move the mouse, an outline of dashes appears that signifies the object's current size and position. The outline is always rectangular, and the actual object never appears until you set the object by left-clicking the mouse. For most objects this is not a problem because most objects are rectangular, except for lines, ovals, and arcs, which are not. Yet, even for these objects, you can still get a pretty good idea of a line's final appearance from the size and shape of the rectangular outline.

When you create a line, EDD draws the outline from the mouse's pointer, located on one corner of the outline, to the opposite corner of the outline. The size and shape of the outline will determine the angle and length of the line. Figure 5-4 shows an outline that will result in a diagonal line.

Line Creation

Since the line option is designed to draw polygons as well as lines, whenever you left-click to set the line you have just drawn, EDD sets that line and begins another line at the first line's end, where the mouse's pointer is. You can then draw a second line that is connected to the first line, and then by left-clicking that line, you can set it and begin a third line, and so on. To set a line without beginning another one, double-click the left mouse button.

#### To draw a diagonal line:

1. Choose line from the Create menu.

2. Move the mouse to shape the outline of the box, and thus the line. Remember that EDD draws the line from one corner of the box to the other, so as long as the outline forms a rectangular box, the outline will be a diagonal line whose length and angle depend on the size and shape of the box.

3. Double left-click the mouse to set the line without beginning another one.

#### To draw a straight line:

1. Choose line from the Create menu.

2. Move the mouse so that the outline becomes so narrow that it forms a line. Depending on how you do this, the outline may be solid, composed of dots or dashes, or totally invisible. Why this occurs is due to how the dashes of the outline affect each other when both edges of the outline occupy one vertical or horizontal line. Sometimes they cancel each other out totally, sometimes partially, and sometimes they combine to create a solid line. Whichever way, a straight line will result.

3. Double left-click to set the line without beginning another one.

#### To draw a polygon:

1. Choose line from the Create menu.

2. Draw the first edge of the polygon.

3. Left-click the mouse once to set that edge and start the next edge of the polygon.

4. When you have finished all the edges, thereby closing the shape, double left-click the mouse to set the last line without beginning a new one.

Anytime you draw more than one line when the fill style is set to solid, even if the result is not a completed, enclosed polygon, EDD will fill in a shape as if you had drawn a completed polygon. It assumes a line between the first and last line drawn and fills in the shape. If you do not want this to occur, set the 'fill style' property in the polygon's property sheet to outline, instead of solid.

If either the 'default edge style' attribute in the Display Attribute window or the 'edge style' property in the object's property sheet is set to dash, the line or lines you create will consist of dashes instead of being solid, that is, if the fill style of the object is outline and not solid.

Other than that, what applies to the rest of the objects in the graphics subclass applies to lines and polygons. See General Characteristics and Properties in this chapter for information on how to configure the other properties in the property sheet.

To draw a diagonal line:
To draw a straight line:
To draw a polygon:

EDD/DM User's Manual, 2.4 - 27 MARCH 1997
[Next] [Previous] [Up] [Top] [Contents] [Index]

| LANL | Lansce | UC | DOE |

L O S   A L A M O S   N A T I O N A L    L A B O R A T O R Y
Operated by the University of California for the US Department of Energy