PEXMapWCToDC(3) — Subroutines
Name
PEXMapWCToDC - Map World Coordinate Points to Device Coordinate Points
Synopsis
Status PEXMapWCToDC(Display ∗display, PEXWorkstation workstation, unsigned long wc_count, PEXCoord ∗wc_points, unsigned int view_index, unsigned long ∗dc_count_return, PEXDeviceCoord ∗∗dc_points_return)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
workstationThe resource identifier of the workstation.
wc_countThe number of world coordinate points.
wc_pointsAn array of world coordinate points.
view_indexThe view index to use in transforming the world coordinate points.
dc_count_return
Returns the number of device coordinate points.
dc_points_return
Returns an array of device coordinate points.
Returns
Zero if unsuccessful, non-zero otherwise.
Description
This function maps the world coordinate points to device coordinate points using the specified workstation and view index. The points are transformed to device coordinates by passing them through the view transform associated with the view index. Points that are clipped will not be returned, so the number of points returned may be less than the number sent.
PEXlib allocates memory for the return value. XFree should be called to deallocate the memory.
Data Structures
typedef XID PEXWorkstation;
typedef struct {
short x;
short y;
float z;
} PEXDeviceCoord;
typedef struct {
float x;
float y;
float z;
} PEXCoord;
Errors
BadPEXWorkstation
The specified workstation resource identifier is invalid.
See Also
PEXMapDCToWC, PEXSetWorkstationViewPriority