MAPPING_MODE(3G)
NAME
mapping_mode − define vdc extent mapping to viewport as isotropic or anisotropic
SYNOPSIS
C Syntax:
void mapping_mode(fildes,distort);
int fildes,distort;
FORTRAN77 Syntax:
subroutine mapping_mode(fildes,distort)
integer*4 fildes,distort
Pascal Syntax:
procedure mapping_mode(fildes,distort:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened.
distort If TRUE (1), distorted mapping from virtual device coordinates to device coordinates is performed.
If FALSE (0), the mapping is not distorted.
Discussion
When mapping mode is distorted (anisotropic), the viewport occupies the full physical region of interest (set by set_p1_p2), with no space left unused in the region. This is referred to as a 2-point scaling or "rubbering" and does not preserve aspect ratio. The numbers corresponding to vdc_extent span the entire physical region of interest.
When mapping mode is not distorted (isotropic), the viewport is calculated as the largest rectangle within the physical region of interest that preserves the aspect ratio of the vdc_extent. Unless this matches the aspect ratio of the physical region of interest, some "white space" will be left unused outside the physical region of interest. By default, this white space is distributed equally on the two sides of the viewport unless modified by the vdc_justification procedure.
This procedure updates the current vdc-to-device units transformation matrix. If no matrices have been placed on the matrix stack and no viewing transformations have been defined, the new vdc matrix becomes the current viewing transformation. Otherwise, no other transformation matrices are affected.
To ensure correct handling of text size and tracking relationships, mapping_mode should be called prior to setting text size and tracking. This procedure also may change the number of passes required for hidden surface removal, so hidden surface removal should be disabled while setting the mapping mode.
DEFAULTS
Isotropic
SEE ALSO
hidden_surface(3G), vdc_extent(3G), vdc_justification(3G), set_p1_p2(3G).
Hewlett-Packard Company — May 11, 2021