Keywords: greg

Next: GREG1 Language Internal Help Up: Plot Architecture and Multi-Window Previous: The CLEAR command Contents Index

### Plotting Depth

Another feature which is essential with the bitmap and area filling capabilities is the depth of the graphic segment. Because bitmaps or filled areas are opaque, it is important to know in which order they should be displayed. GREG uses the depth attribute of the graphic segment to do so. Depths range between 1 and 40. Depth 1 is the top layer: graphic segments at depth 1 are in front of any graphic segment at other depths. Depths 40 to 2 are plotted in this order. This means that segment at depth 40 are behind any other segment, segments at depth 39 are behind segments at depth 38, etc...Whenever segments have the same depth, they are drawn in their chronological (creation time) order.

To save unecessary refresh of the drawing, the depth attribute is not used when a segment is created: the segment appears on top of the existing ones at this time. The depth attributes becomes effective after a `ZOOM` action, a redraw (e.g. window resized), or for hardcopies. GREG incorporates a default handling of depths when segment are created in the following way:

- Normal (vector) segments are created with depth = 1
- Bitmaps are created with depth = 2
- Filled areas are created with depth = 1

This allow bitmap images to be plotted in the background, with all standard graphic overlaid on top of them without user intervention.

This behaviour is often sufficient. When not, the user can modify the depth of any graphic segment using the command `CHANGE DEPTH`. See the internal help for details.

Next: GREG1 Language Internal Help Up: Plot Architecture and Multi-Window Previous: The CLEAR command Contents Index