[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

Chapter 13. Utility Subroutines

The subroutines in this category provide convenient mechanisms for modifying data or performing calculations.

Some subroutines perform transformations on matrixes; others let your application alter the viewing characteristics in the Viewing Coordinate (VC) system. In addition, the Pack Data Record utility provides a convenient mechanism for the construction of data records used by input device initialization subroutines.

The Convert Data utility allows you to convert data to a form known by a target application when two or more application processes are communicating.

GPCCV - Convert Coordinate Values

GPCCV (wsid, ctype, ptype, number, ilist, errind, olist)

Purpose

Use GPCCV to convert coordinate values in a window system from one coordinate system to another. Only workstations which use the facilities of a window system (e.g., X-Windows) support this procedure.

This subroutine converts Normalized Projection Coordinates (NPC), Device Coordinates (DC) or Window Units (WU).

The conversion type (ctype) parameter specifies the type of conversion to be performed. The point type (ptype) parameter specifies the organization of the input values, either as an array of two-dimentional points (1=POINT_2D ) or as an array of three-dimensional points (2=POINT_3D ) The number parameter specifies the number of two-dimensional or three-dimensional points in the input list (ilist) parameter to convert. The array of the output list (olist) is the same size as the ilist

This subroutine is assigned escape identifier 1015.

Note:

This subroutine is an escape subroutine, and therefore, may not be available on all workstations. Use the Inquire List of Available Escape Subroutines (GPQES) to determine if this subroutine is supported by a specified workstation.

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

ctype -- specified by user, fullword integer

Conversion type (1=NPC_TO_WU, 2=WU_TO_NPC, 3=DC_TO_WU, 4=WU_TO_DC )

ptype -- specified by user, fullword integer

Point type (1=POINT_2D, 2=POINT_3D )

number -- specified by user, fullword integer

Number of two-dimensional or three-dimensional points to be converted (>=0)

ilist -- specified by user, array of short floating-point numbers

Input list of coordinate values. Depending on the value of the ptype parameter, this parameter is treated as an array of two-dimensional or three-dimensional points.

errind -- returned by the graPHIGS API, fullword integer

Error indicator. If the error indicator is zero, the request has been completed. Otherwise, one of the following errors exists:
25
SPECIFIED WORKSTATION DOES NOT EXIST
35
WORKSTATION HAS ONLY INPUT CAPABILITIES
527
ESCAPE FUNCTION NOT AVAILABLE
539
REQUESTED NUMBER < ZERO
624
CONVERSION TYPE IS INVALID
625
POINT TYPE IS INVALID

olist -- returned by the graPHIGS API, array of short floating-point numbers

Output list of converted coordinate values. This list is the same size as ilist

Error Codes

None

Related Subroutines

GPDCMM
Set Device Coordinate Mapping Method
GPGWIN
Get Window

RCP code

201336855 (X'0C002817')


[ Previous | Next | Contents | Glossary | Home | Search ]