next up previous
Up: EMME/2 NEWS 16 June 1994 Previous: Enhanced Macro Programming Language

 

Annotation Filling

An important new feature has been added regarding annotations. While annotation vectors are being drawn, they can now be preserved in a keep buffer. The region defined by the vectors contained in this buffer can then later be redrawn or filled by hatch lines using arbitrary hatch angle, hatch width, line pattern and coloring.

This is achieved by means of the following two new annotation commands:

Keep command:
Both in interactive mode and in the annotation files this command is called with the letter ``k'' followed by ``0'', ``1'' or ``2''. The command ``k1'' starts recording the vectors drawn subsequently in the initially empty keep buffer. The command ``k0'' is used to stop the recording of vectors. Finally, the command ``k2'' can be used after a command ``k0'' to continue recording by appending the vectors to the contents already contained in the keep buffer. The size of the keep buffer allows storing of up to 500 vectors at any time.

Fill command:
This command causes the region (or regions) defined by the current contents of the keep buffer to be filled in the given direction and hatch width, using the current color and line pattern specifications. Interactively, the fill command is specified by the letter ``f'' followed by either an ``h'' for horizontal, a ``v'' for vertical hatching, or a blank for hatching in arbitrary direction. The distance in which the graphic cursor is moved between the two key strokes is used to define the hatch width. In annotation files, the fill command is represented by ``f dx dy'', where dx and dy are the perpendicular offset between two hatch lines, in units of the current coordinate system. As a special case, a fill command with a zero hatch vector (or interactively ``f0'') will cause the vectors currently contained in the keep buffer to be redrawn using the current color and line pattern.

Of course, even before this development, it was already possible to fill regions in annotations by explicitly coding the hatch vectors into the annotation files. Compared to this ``brute force'' technique (which was used e.g. in the POLYZONE and GRTOOL applications described in earlier issues of EMME/2 NEWS), the use of the keep and fill commands offers many advantages, such as:

The plot below shows an example in which annotation filling is used for the representation of the water surfaces.

stockholm area plot



next up previous
Up: EMME/2 NEWS 16 June 1994 Previous: Enhanced Macro Programming Language


Heinz Spiess, EMME/2 Support Center, Thu Jun 6 14:58:10 MET DST 1996