vdc_extent(3G)
NAME
intvdc_extent, vdc_extent − define logical region of interest (window) for subsequent output primitives
SYNOPSIS
C Syntax:
void intvdc_extent(fildes,xmin,ymin,xmax,ymax);
int fildes,xmin,ymin,xmax,ymax;
void vdc_extent(fildes,xmin,ymin,zmin,xmax,ymax,zmax);
int fildes;
float xmin,ymin,zmin,xmax,ymax,zmax;
FORTRAN77 Syntax:
subroutine intvdc_extent(fildes,xmin,ymin,xmax,ymax)
integer*4 fildes,xmin,ymin,xmax,ymax
subroutine vdc_extent(fildes,xmin,ymin,zmin,xmax,ymax,zmax)
integer*4 fildes
real xmin,ymin,zmin,xmax,ymax,zmax
Pascal Syntax:
procedure intvdc_extent(fildes,xmin,ymin,xmax,ymax:integer);
procedure vdc_extent(fildes:integer;xmin,ymin,zmin,xmax,ymax,zmax:real);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when the I/O path to a graphic device is opened.
xmin,ymin,zmin,xmax,ymax,zmax
Define, respectively, the lower-left front and upper-right back corners of the virtual device coordinate extent.
Discussion
Vdc_extent defines a logical Cartesian coordinate system for use in transforming virtual device coordinates to physical device coordinates.
This coordinate system establishes the sense and orientation of the virtual device coordinate extent. Sense and orientation are defined by the directions of the positive x and y axes and whether the positive y-axis is 90 degrees clockwise or 90 degrees counter-clockwise from the positive x-axis. The coordinate system also establishes the direction of positive and negative angles. Positive angles are measured in the direction from positive x-axis to positive y-axis.
The meanings of up, down, right, left, front, and back are also defined (left-handed coordinate system):
Up Positive y-axis
Down Negative y-axis
Right Positive x-axis
Left Negative x-axis
Back Positive z-axis
Front Negative z-axis
Specifying values outside the VDC extent area is permitted, but it is intended that the visible portion of the image be contained within the extent area. For example, when portraying part of the surface of a sphere, the center of the sphere could be outside the extent area. The extent area is intended to provide a frame for the region of interest in a picture.
The actual clipping bounds must always be a subset of the VDC system. This means that Starbase may truncate the clipping bounds if necessary.
Based on the current settings of other coordinate system parameters, the VDC extent uses as much of the physical region of interest as possible without distorting the image or eliminating any part of the image within the range of the extent. See set_p1_p2, mapping_mode, and vdc_justification for ways to modify this mapping.
When outputting to a graphics device, if the current extent values match the device units, no transformation occurs, making the output process more efficient.
This procedure updates the current VDC-to-DC transformation matrix. If no matrices have been placed on the matrix stack and no viewing transformations have been defined, the new device transformation matrix becomes the current viewing transformation. No other transformation matrices are affected.
Changes to the VDC extent may not alter previously set values such as text size or tracking relationships. Therefore, the VDC extent should be set before setting related values. Vdc_extent and intvdc_extent resets view_port or intview_port to the entire VDC extent.
Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes. Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase(3G) manual page.
Beware:
The vdc_extent function (beginning at HP-UX Release 5.18 and subsequently) changes the clip_rectangle and clip_depth values to be the same as the bounds of vdc_extent. In other words, clip_rectangle is set to be xmin to xmax in the x direction and ymin to ymax in the y direction and clip_depth is set to be zmin to zmax. This is a change from previous behavior where clip_rectangle and clip_depth were not changed by vdc_extent.
DEFAULTS
Floating point:
(xmin,ymin,zmin,xmax,ymax,zmax) = (0.0,0.0,0.0,1.0,1.0,1.0)
Integer:
(xmin,ymin,xmax,ymax) = (0,0,32767,32767)
SEE ALSO
clip_rectangle(3G), mapping_mode(3G), set_p1_p2(3G), vdc_justification(3G).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992