Parent Topic: IWORKS

Graphic Editing

The Graphic Editing panel contains functions for modifying graphic planes. Tracing, creating shapes, flood filling areas and annotation are available. It is also possible to set line styles, font styles, and font sizes.

The Graphic Editing panel can be invoked by selecting the ``Graphic'' option from the ``Edit'' pulldown menu in ImageWorks.

The top area of the Graphic Editing panel contains a list of graphic planes available to draw in. One of these is selected at all times, and only the selected plane(s) will be affected by drawing actions. Selecting a graphic plane will enable it (make it visible) if it is not already visible.

The Operation area of the Graphic Editing panel contains a button for each major operation that can be done. At any one time only one of these buttons may be depressed, indicating the current operation mode. Descriptions of each of the operation modes follows in the subtopics Shapes, Lines, Cut, Copy, Paste, Flood Fill, and Annotation.

The Style Modifiers area of the Graphic Editing panel contains additional modifiers for the graphic operation.

The first option indicates whether the graphic operations should result in the clearing or setting of areas of the graphic plane. Clearing can be thought of as erasing. When clear is off, you will be drawing into the graphic plane; when it is on, you will be erasing data in the graphic plane. Remember that operations performed in a graphic plane do not affect any image planes. The Default is ``off''. If clear is off, the graphic plane's bits will be set to 1 by graphic operations; if clear is on, the graphic plane's bits will be set to 0.

The next option is the line width. All shapes and lines drawn are affected by the line width set here. This is even true of solid shapes.

The last options are those dealing with the annotation font style and size. These are discussed in the Annotation subtopic.

Shapes

The Circle, Solid Circle, Box, and Solid Box operations are considered shape operations, and they all operate similarly.

When one of the shape operations is active, it is possible to drag out a copy of the shape, seeing the outline as the drag takes place. When the drag is released, the shape is burned into the selected graphic plane. The Escape key may be used to cancel an action during a drag.

Specifically, one depresses the left mouse button in the Main Image Window, drags the mouse while holding down the button, and releases when the shape has been dragged out to the desired size.

Lines

The Trace, Line, PolyLine, Polygon, and Trace&Close operations are all considered to be line operations, and they operate similarly.

Each of the line operations creates one or more line segments which are affected by the line width option under Style Modifiers. In each case the line operations are controlled by depressing the left mouse button, dragging and releasing. The Escape key may be used to cancel an action during a drag.

The Line operation creates a new disconnected line segment for each Drag sequence. The PolyLine operation creates a new line segment connected to the last for each Drag sequence. The Polygon operation acts the same as the PolyLine operation, but closes the polyline to form a polygon when you terminate polygon mode.

Trace mode creates a series of short line segments as the cursor is dragged around with the left mouse button depressed. Trace & Close mode is similar to Trace mode, except that it closes the traced polygon when the left mouse button is released.

Cut, Copy, and Paste

The Cut, Copy, and Paste functions allow the user to cut or copy rectangles of a graphic plane to a hidden clipboard. Later this stored rectangle may be pasted into another location in the same or a different graphic plane.

The Cut and Copy functions work identically with the exception that Cutting a block of graphics will blank out the selected rectangle, while Copying does not affect the selected area. After Cut or Copy mode has been selected on the Graphic Editing Panel, a rectangle is dragged out with the left mouse button depressed and the cut/copy takes place when the mouse button is released. The Escape key may be used to cancel an action during a drag.

The Paste function writes the contents of the graphic clipboard to the currently specified graphic plane. Note, however, that the pasted graphic is added without obliterating the existing graphics. The saved graphic is not destroyed and may be pasted multiple times. After selecting Paste on the Graphic Editing Panel, the paste box may be dragged around in the image window while the left mouse button is depressed. When the mouse button is released the saved graphic data is added to the target region.

Note that the contents of the graphic clipboard are persistent when the selected graphic plane is changed. This means that a region can be Cut or Copied from one graphic plane and Pasted into another.

The Clear mode buttons have no effect on the Cut, Copy, and Paste functions.

Flood Fill

The Flood Fill operation allows for the filling of outlined areas in a graphic plane. The fill operation is triggered by a left or right mouse click in the main image window of ImageWorks. The fill operation is affected by the Clear mode buttons.

The fill operation is bounded by any ``eight connected'' line. That is, the fill operation will not expand diagonally (therefore the fill will not pass through diagonal holes).

The Trace & Close, and Polygon operations are specially designed to create areas guaranteed to contain fill operations.

The flood fill mode will be terminated after a left mouse click, but will persist after a right click.

Annotate

The Annotate operation is used to place text of a selected font, style, and size at a desired location in a graphic plane. Annotation is affected by the Clear mode Style Modifier. If the Clear mode is on, the text will be burned out of the graphic plane.

The fonts offered are loaded from Metafont `gf' files located in /pci/etc, or (on X/Motif systems) from the X Server. It is theoretically possible for the user to add Metafont `gf' files to the /pci/etc/fonts.lst file if they obtain additional gf fonts from other sources.

On X/Motif systems it is possible to select one additional font by its name in a user's X initialization file (i.e. .Xdefaults). The resource to be set is `annotationFont'. If the following line is placed in the X initialization (i.e. .Xdefaults) file, the named system font (in this case *screen-bold*-14-*) should appear on the list of fonts available within the Graphic Editing panel of ImageWorks:

 *annotationFont: *screen-bold*-14-*
When the Annotate operation is active, and keyboard focus is in the main image window of ImageWorks, all keystrokes will be added to a string placed at the current cursor position. Either the backspace, or the delete key should delete the last character from the string.

Dragging the image cursor with the left mouse button should result in the string being dragged as well. Dragging with the right mouse button will rotate and scale the text, pivoting around a point half way along the text string.

The string is actually burned into, or out of, the graphic plane when the <Enter> key is hit, or annotation mode is exited. Hitting enter will also result in the image cursor moving down by the height of a line of text. This is to allow for the convenient entering of multiple lines of text.


Parent Topic: IWORKS
About PCI Help Gateway