Keywords: gildas-prog

Next: Programming Up: GTV Programming Manual Previous: GTV Programming Manual Contents Index

# Concept

The GTVIRT is a fast low-level Graphic library, allowing to develop Graphic programs in a completely device independent way. The GTVIRT library involves the following concepts:

- the Plot Page
  The Plot Page is a virtual workspace on which all graphic items will be (virtually) drawn. The Plot Page units are ``virtual centimeters''. Actual drawing on a graphic device is usually done with an automatic scaling factor to match the Plot Page to the device. For hardcopy outputs, an exact matching between the Plot Page unit and centimeters is possible.
- Segments
  Graphic segments are the smallest separable entities in a drawing. Segments are named, and can be edited to change their aspects. Although segments are usually associated with a single, easily identified, part of the drawing (e.g. a curve, or a label, or a bitmap image), they can contain anything. The segmentation is not defined by the GTVIRT, but left to the calling program. Segments are named uniquely to help identifying them.
- Coordinate Systems Two coordinate systems are available within the GTVIRT: a Page coordinate system (whose units are centimeters), and a User coordinate system. Drawing can be done in any of these systems.
- Directories
  Directories are special graphic segments used to group in a logical way ensembles of segments. A complete directory tree can be specified in a drawing. As for the segments, the structure of the drawing is defined by the calling program, not by the GTVIRT library.

  Each directory has its own User coordinate system. This feature can be used to map several coordinate systems to different or similar regions of the Plot Page.

- Devices
  The GTVIRT is (completely ?) device independent. A drawing can be prepared and visualized separately. The GTVIRT allows display on a large variety of graphic devices.
- Metafiles
  Directories and directory trees of a Plot can be saved on a (binary) metafile, complete with all graphic segments and user coordinate systems. Metafiles can be imported as Sub-directories in any Plot.
- Hardcopy
  ``Hard''copy on paper-like Graphic devices such as pen plotters, laser printers, etc..., are completely transparent in the GTVIRT. ``Soft'' hardcopy on files in industry standard graphic languages such as PostScript or HPGL is possible too.
- Windows
  Windows are available on some devices. This includes X-Window terminals, and MS-Windows screen. Windows can be attached to any directory. Several windows can be attached to the same directory. A Window displays all the sub-directories depending on the directory to which it is attached.
- Plotting Depth
  Each segment can be understood as an opaque or transparent plot. The order in which opaque segments are plotted can be controlled by their plotting depth. This feature is important when plotting bitmaps or drawing colour filled curves.
- 8-bit images
  are supported on Windows graphic displays (X-Window or MS-Window or MAC).

The GTVIRT normally operates in a buffered mode. All drawings command a written into an internal metacode, and only transmitted to the plotting device when required by the calling program. In addition, for applications which require an unbuffered plot, an immediate mode is available.

Next: Programming Up: GTV Programming Manual Previous: GTV Programming Manual Contents Index