GET STROKE 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
GET STROKE 3 − retrieve the STROKE event in the PHIGS current event report
SYNOPSIS
C Syntax
void
pget_stroke3 ( view_ind, stroke )
Pint∗view_ind;OUT view index
Ppoint_list3∗stroke;OUT stroke
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
GET STROKE 3 retrieves the current event report from the PHIGS state list when the event report contains a STROKE event.
A STROKE event consists of a list of World Coordinate (WC) points and a view_index. The points correspond to positions on the workstation selected by the operator. The view_index is the index of the view used to transform those positions to World Coordinates.
C Output Parameters
view_ind
PHIGS sets the variable pointed to by view_ind to the index of the view representation used to transform the NPC stroke positions to WC points.
strokePHIGS copies the number and list of stroke points selected by the operator to the variable pointed to by stroke. Ppoint_list3 is defined in phigs.h as follows:
typedef struct {
Pintnum_points;/∗ number of Ppoint3s in the list ∗/
Ppoint3∗points;/∗ list of points ∗/
} Ppoint_list3;
num_points is the number of points in points.
points is the array of Ppoint3 structures specifying the points in WC. This array must be allocated by the calling program and the array pointer assigned to this field before calling this function. The array must be at least as large as the buffer of the STROKE device that generated the event. This buffer size is set when the device is initialized. Ppoint3 is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;
Execution
GET STROKE 3 retrieves the STROKE event from the current event report in the PHIGS state list.
When an input device in EVENT mode is triggered by the operator, an event report is added to the input event queue. The event report contains the identity and current measure of the triggering device. AWAIT EVENT moves the measure of the oldest event in the input queue to the current event report in the PHIGS state list. If the event was a STROKE event, GET STROKE 3 or GET STROKE is used to retrieve the event from the current event report. The STROKE positions are computed by mapping the DC workstation positions selected by the operator to WC points. The workstation transform is used to transform the DC positions to NPC positions prior to transforming them to WC. See INITIALIZE LOCATOR 3 and SET VIEW TRANSFORMATION INPUT PRIORITY for a description of how PHIGS determines the view representation to use to map the NPC positions to WC.
See INITIALIZE STROKE 3 for a description of the available STROKE devices and how their measure values are determined.
ERRORS
003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)
259Ignoring function, the input device class of the current input report does not match the class being requested
SEE ALSO
INITIALIZE STROKE 3 (3P)
AWAIT EVENT (3P)
SET VIEW TRANSFORMATION INPUT PRIORITY (3P)
GET STROKE (3P)
September 02, 1992