.\" @(#)PEXXCToNPCTransform2D.3 1.4 95/03/24 SMI; .so man3/pex.macs .TH PEXXCToNPCTransform2D 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXXCToNPCTransform2D - utility function .SH SYNTAX .HP int PEXXCToNPCTransform2D\^(\^PEXNPCSubVolume *\fInpc_sub_volume\fP, PEXDeviceCoord2D *\fIviewport\fP, unsigned int \fIwindow_height\fP, PEXMatrix3x3 \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: .TP .B PEXBadViewport (xmin >= xmax, or ymin >= ymax, or zmin > zmax) .TP .B PEXBadSubVolume (xmin >= xmax, or ymin >= ymax, or zmin > zmax) .SH DESCRIPTION .\" indexing .IX PEXXCToNPCTransform2D .LP This function computes the 2D transformation matrix to map a drawable point (XC) to NPC coordinates, using the specified NPC subvolume, DC viewport, and drawable height. The returned transformation matrix first transforms the x and y coordinates of drawable points to device coordinates (DC), then applies the 2D components of the viewport-to-subvolume transformation, producing 2D NPC points. .LP When specifying NPC and DC, the X, Y and Z limits must be as follows: .LP .RS xmin < xmax , ymin < ymax , zmin <= zmax .RE .SH ERRORS .LP None .SH SEE ALSO .LP .nf .BR PEXXCToNPCTransform (3) .fi