.\" @(#)PEXNPCToXCTransform.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXNPCToXCTransform 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXNPCToXCTransform - utility function .SH SYNTAX .HP int PEXNPCToXCTransform\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix \fItransform_return\fP\^) .SH PARAMETERS .IP \fInpc_sub_volume\fP 1i A pointer to an NPC subvolume, typically that of a renderer resource. .IP \fIviewport\fP 1i An array of two device coordinate points defining a viewport, typically that of a renderer resource. The first point in the array is the lower-left corner of the viewport; the second point is the upper-right. .IP \fIwindow_height\fP 1i The height of the drawable. .IP \fItransform_return\fP 1i The returned transformation. .SH RETURNS .LP Zero if successful; otherwise, one of the following: .LP .RS .nf .B PEXBadViewport - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) .B PEXBadSubVolume - (xmin >= xmax, or ymin >= ymax, or zmin > zmax) .RE .fi .SH DESCRIPTION .\" indexing .IX PEXNPCToXCTransform .IX "Coordinates" "PEXNPCToXCTransform" .IX "Utility Functions" PEXNPCToXCTransform .LP This function computes the transformation matrix to map an NPC point to a drawable coordinate (XC), using the specified NPC subvolume, DC viewport, and drawable height. The returned transformation matrix first applies the subvolume-to-viewport transformation, then transforms the x and y coordinates of the resulting points to drawable coordinates, leaving the z coordinate in DC. .LP When specifying NPC and DC, the X, Y and Z limits must be as follows: .IP xmin < xmax , ymin < ymax , zmin <= zmax .SH ERRORS None .SH SEE ALSO .LP .nf .BR PEXNPCToXCTransform2D (3) .fi