pget_stroke(3g) — Subroutines
Name
pget_stroke − Returns the 2D coordinates of the points in a stroke.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pget_stroke (
Pint ∗view_ind, /∗ (O) View index ∗/
Ppoint_list ∗stroke /∗ (O) Stroke information ∗/
)
Data Structures
typedef struct {
Pint num_points; /∗ number of Ppoints in the list ∗/
Ppoint ∗points; /∗ list of points ∗/
} Ppoint_list;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
} Ppoint;
Description
pget_stroke obtains information contained in the current event report entry. If the report contains input generated by anything other than a stroke-class input device, a call to this function generates an error. (See the pawait_event function for more information about input classes and the current event report.)
The pget_stroke 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. This function ignores the z-coordinate components and returns a two-dimensional result.
Digital PHIGS uses the current workstation transformation to translate the device coordinate points to normalized projection coordinate points. See Getting Started with DEC PHIGS for more information on view indexes.
The application allocates the memory for the point list returned by this function. You specify the maximum size of the stroke point list in the call to pinit_stroke. To determine the maximum size of a stroke point list supported by Digital PHIGS, call pinq_def_stroke_data.
See Also
pawait_event
pflush_events
pget_stroke3
pinit_stroke
preq_stroke
psample_stroke
pset_stroke_mode
pset_view_tran_in_pri