lib/libetmeta.a
include/etmeta.a
In TeraScan, drawing vector graphics is a two-step process:
Generate a vector graphics metafile.
Render the metafile in the appropriate window.
There are two types of metafiles, ET metafiles and XY metafiles. ET metafiles are created relative to the earth transform of a given dataset and are intended for use as image overlays. Coastlines and latitude/longitude grids are typical examples of ET metafiles.
Vector coordinates are stored in ET metafiles NOT as image coordinates, but rather as earth transform coordinates, i.e., either map projection (y,x) coordinates in kilometers or sensor scan 1-relative (line,sample) coordinates.
a[0] * et y + a[2] * et x + b[0] = image line
a[1] * et y + a[3] * et x + b[1] = image samp
The conversion from earth transform coordinates and image coordinates is defined by the earth transform's affine mapping. (See etx).
Using the earth transform coordinates instead of image coordinates makes ET metafiles invariant to image sub-sectioning, sub-sampling, and rotation. Functions that transform a dataset's dimensions always update the dataset's earth transform affine map to reflect the changes.
XY metafiles are used to create XY plots. The plotting area is defined to be the unit square [0,1]x[0,1]; vector coordinates other than axis drawing and annotation metafiles should fall in this range.
Metafiles are implemented as one-dimensional dataset variables containing a stream of metafile primitive codes and their integer, real, and text values. Integer and real values are stored using 4 bytes each. Primitive codes are always aligned on 4-byte boundaries.
Both ET and XY metafiles are generated using the routines in lib/libetmeta.a. The primitives supported by these routines are defined in include/etmeta.h and are listed here:
Points are either earth transform (y,x) coordinates, or unit square (x,y) coordinates.
The maximum length of text data is 255 characters, not including a \ terminator.
Codes for coded primitives are also defined in include/etmeta.h:
+-----------+ TEXT_ALIGN_BELOW | | | | +===========+ TEXT_ALIGN_TOP | | | xxx | TEXT_ALIGN_CAP | x | | x x | TEXT_ALIGN_HALF | x | | x x | +-xxx----x--+ TEXT_ALIGN_BASE | x x | | xx | +===========+ TEXT_ALIGN_BOTTOM | | | | | | | | | | | | +-----------+ TEXT_ALIGN_ABOVE
lib/libetmeta.a, include/etmeta.h
Marker and text height are real-valued for historical reasons. Text and marker size used to change with window size; this is no longer the case.
Applications using variable height text (e.g., contouring) draw text as a series of polylines.
XY metafiles will be replaced by an industry standard metafile (i.e., CGM) as soon as practical. Currently, only the xvu application generates XY metafiles.
Last Update: $Date: 1999/05/10 21:16:35 $