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



Use Sample Locator to immediately retrieve the current measure of the specified locator device.

The measure consists of a locator position in World Coordinates (WC) and the index of the view table entry which has a matrix that the graPHIGS API used to convert the location from Device Coordinates (DC) to World Coordinates.

This subroutine returns the locator input from the view with the highest input priority under the cursor. View zero is the highest priority view unless modified by your application.


This function returns a two-dimensional result. The graPHIGS API discards the z coordinate of the locator position. The x and y values of the locator position are identical to those returned by the Sample Locator 3 subroutine for the same operator action.

Language Bindings


psample_loc (ws_id, loc_num, view_ind, loc_pos)

Input Parameters

Pint ws_id
Workstation identifier.

Pint loc_num
Locator device number (>=1).

Output Parameters

Pint *view_ind
View index (>=0).

Ppoint *loc_pos
Locator position in WC.


PSMLC (wkid, lcdnr, viewi, lpx, lpy)

Input Parameters

integer wkid
Workstation identifier.

integer lcdnr
Locator device number (>=1).

Output Parameters

integer viewi
View index (>=0).

real lpx
x coordinate of locator position in WC.

real lpy
y coordinate of locator position in WC.


Function Requires State (PHOP,WSOP,*,*)
Specified Workstation Is Not Open
Specified Workstation Is Not Of Category Input Or Outin
Specified Device Not Available On Workstation
Function Requires Input Device To Be In Sample Mode

Related Subroutines

  • Inquire Number Of Available Logical Input Devices

  • Set Locator Mode

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