preq_stroke3(3g) — Subroutines
Name
preq_stroke3 − Prompts for input using the stroke-class logical input device specified.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void preq_stroke3 (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint dev_num, /∗ (I) Stroke device number ∗/
Pin_status ∗status, /∗ (O) Initial status ∗/
Pint ∗view_ind, /∗ (O) View index ∗/
Ppoint_list3 ∗stroke /∗ (O) Points in the stroke ∗/
)
Data Structures
typedef enum {
PIN_STATUS_NONE, /∗ user performed a break action ∗/
PIN_STATUS_OK, /∗ user entered a stroke ∗/
PIN_STATUS_NO_IN /∗ not used by this function ∗/
} Pin_status;
typedef struct {
Pint num_points; /∗ number of Ppoint3s in the list ∗/
Ppoint3 ∗points; /∗ list of points ∗/
} Ppoint_list3;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
Pfloat z; /∗ z coordinate ∗/
} Ppoint3;
Description
preq_stroke3 prompts you for input using the stroke-class logical input device specified by the device number and the workstation identifier. If the input status is PIN_STATUS_OK, this function returns the world coordinate points and the view index of the view transformation Digital PHIGS uses to translate the normalized projection coordinate points to the world coordinate points. See Getting Started with DEC PHIGS for more information about view indexes.
Digital PHIGS uses the current workstation transformation to translate the device coordinate points to normalized projection coordinate points.
If you generate a stroke that contains more points than the number of components in the stroke buffer, you will lose the additional input. To establish a stroke buffer size, call the pinit_stroke3 function.
The application allocates the memory for the point list returned by this function. You specify the maximum size of the returned stroke point list with the function pinit_stroke3. To determine the maximum size of a character string supported by Digital PHIGS, call pinq_def_stroke_data3.
See Also
pget_stroke3
pinit_stroke3
preq_stroke
psample_stroke3
pset_stroke_mode
pset_view_tran_in_pri