In compact coordinate system, a drawing area is defined as rectangle area called envelope. There are two types of envelopes, global envelope and local envelope. The global envelope is a base area in which the drawing is contained. There is only one global envelope. A local envelope is a square area completely or partially within the global envelope. There is no specific global envelope size specified in the data format. The physical display size is decided at rendering time.
The aspect ratio and orientation are defined in the data header and should be maintained when the drawing is displayed.
Aspect ratios include 1:1, 4:3, 16:9 up to 1024: 729 (height:width), in both portrait and landscape orientation. Aspect ratio for Characters Size WVG elements only has landscape orientation.
In Compact Coordinate System, coordinates are restricted to certain positions which are the cross points of a grid. The grid is defined in the WVG data header, set by a group of parameters. The grid lines along with x axis or y axis may be unevenly distributed.
The global grid can be described using a curve shown above.
There are one peak and two valleys in the curve. The definition of the curve is:
-
peak position: the central position of a peak;
-
peak value: a value equal or larger than 1,0;
-
peak width: a value less than 1,0.
All valleys should have the same value.
The total area enclosed by the curve and the x-axis from 0,0 to 1,0 is always equating to 1,0.
The curve can be uniquely defined by peak position, peak value and peak width. Once the parameters are determined, other values such as valley value can be calculated. Once a curve is given, grid line positions can be calculated according to the following function:
Where Xk is the position of the kth grid line, where n is total number of grid lines. d(x) is the curve function described in the present document.
In standard WVG, the curve parameters are preset as follows.
Variable parameters:
-
number of grid lines: 15, 31, 63 or 127;
-
peak value: 1,0, 1,5, 2,0 and 2,5;
-
peak position: 13 options from 0,0 (0/12), 0,083333 (1/12), 0,166667 (2/12) to 1,0 (12/12);
-
peak width: 0,3, 0,4, 0.5 and 0,6.
When a portion of a peak exceeds the global envelope only the part within the global envelope is valid.
For Character Size WVG or glyph, the parameters are set as follows.
Predefined parameters:
Variable parameters:
-
number of grid lines: 7, 15, 31 or 63;
-
peak value: 1,0 or 1,5;
-
peak position: 0,3333 (1/3), 0,5, 0,6667 (2/3).
When using relative coordinates in Compact Coordinate System (refer to
clause G.1.3.3), some elements may be specified with specific resolution, which is independent of the global resolution. There are 8 predefined resolutions available for
"re-definition resolution", there are 1/27, 1/38, 1/48, 1/64, 1/85, 1/128 and 1/160 of the length of the shorter global envelope edge. Re-definition of resolution only applies to elements in global scope.
The Flat Coordinate System is a 16 bit signed coordinate system with the top left coordinate of the screen being defined as (x=0,y=0) and the bottom right coordinate being described as (x=2^15, y = 2^15). Note that this expresses the dynamic range of the coordinate system, however it does not mean that all drawings are of this size.
Coordinate values may be represented using two methods: absolute coordinate and relative coordinate.
Absolute Coordinate:
an absolute coordinate is a pair of x and y coordinate number. In WVG Compact Coordinate System, absolute coordinate values are the coordinate grid line numbers and are always positive.
Relative Coordinate:
the relative coordinate is used only in lines and transform. If the start point is defined by an absolute coordinate, subsequent points can be described by relative coordinates, which are relative grid units from the previous point. A relative coordinate is signed, and it may be positive or negative. A relative coordinate may be used in both global and local coordinate systems. A relative coordinate may exceed the scope of the local envelope that defines the start point of the line.