1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
.\"
.\" $XConsortium: p070,v 5.1 91/02/16 09:37:57 rws Exp $
.\"
.\"
$XMCOPY
.\" Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
.\"
.\" All Rights Reserved
.\"
.\" Permission to use, copy, modify, and distribute this software and its
.\" documentation for any purpose and without fee is hereby granted,
.\" provided that the above copyright notice appear in all copies and that
.\" both that copyright notice and this permission notice appear in
.\" supporting documentation, and that the names of Sun Microsystems,
.\" and the X Consortium not be used in advertising or publicity
.\" pertaining to distribution of the software without specific, written
.\" prior permission.
.\"
.\" SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\" EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\" USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.TH "GET STROKE" 3P "29 February 1991"
.SH NAME
GET STROKE \- retrieve the \s-2\&2D\s+2 components of the
\s-2STROKE\s+2
event in the \s-2PHIGS\s+2 current event report
.IX "Stroke Input Devices" "GET STROKE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pget_stroke ( view_ind, stroke )
Pint *view_ind; \fI\s-2OUT\s+2 view index\fP
Ppoint_list *stroke; \fI\s-2OUT\s+2 stroke\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2GET STROKE\s+2 retrieves the current event report from the \s-2PHIGS\s+2
state list when the event report contains a \s-2STROKE\s+2 event.
Only the \s-2\&2D\s+2 components of the event are returned.
.LP
A \s-2STROKE\s+2 event consists of a list of World Coordinate
(\s-2WC\s+2) 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.
.SS C Output Parameters
.IP \fIview_ind\fP
\s-2PHIGS\s+2 sets the variable pointed to by \fIview_ind\fP to
the index of the view representation used to transform
the \s-2NPC\s+2 stroke positions to \s-2WC\s+2 points.
.IP \fIstroke\fP
\s-2PHIGS\s+2 copies the number and list of stroke points selected by
the operator to the variable pointed to by \fIstroke\fP.
Ppoint_list is defined in phigs.h as follows:
.sp .4
.ta .5i +\w'Ppoint 'u +\w'num_points; 'u
.nf
typedef struct {
.sp .2
Pint num_points; /* Number of points in the list */
Ppoint *points; /* List of points */
} Ppoint_list;
.sp
.fi
.IP
\fInum_points\fP is the number of points in \fIpoints\fP.
.IP
\fIpoints\fP is the array of \s-2\&2D\s+2 \s-2WC\s+2 points.
\fBThis array must be allocated by the calling program
and the array pointer assigned to this field before calling this
function.\fP
The array must be at least as large as the buffer of the
\s-2STROKE\s+2 device that generated the event.
This buffer size is set when the device is initialized.
Ppoint is defined in phigs.h as follows:
.sp .4
.ta .5i +\w'Pfloat 'u +\w'x; 'u
.nf
typedef struct {
.sp .2
Pfloat x; /* x coordinate */
Pfloat y; /* y coordinate */
.sp .2
} Ppoint;
.fi
.SS Execution
\s-2GET STROKE\s+2 retrieves the \s-2\&2D\s+2 components of the
\s-2STROKE\s+2
event from the current event report in the
\s-2PHIGS\s+2 state list.
The \fIx\fP and \fIy\fP components are returned. The \fIz\fP
component is discarded.
.LP
When an input device in \s-2EVENT\s+2 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.
\s-2AWAIT EVENT\s+2 moves the measure of the oldest event in the input queue
to the current event report in the \s-2PHIGS\s+2 state list.
If the event was a \s-2STROKE\s+2 event,
\s-2GET STROKE 3\s+2 or \s-2GET STROKE\s+2 is used to
retrieve the \s-22D\s+2 components of the event from the current event report.
The \s-2STROKE\s+2 positions are computed by mapping the \s-2DC\s+2
workstation positions selected by the operator to \s-2WC\s+2 points.
The workstation transform is used to transform the \s-2DC\s+2
positions to \s-2NPC\s+2 positions prior to transforming them to
\s-2WC\s+2.
See \s-2INITIALIZE LOCATOR\s+2 and
\s-2SET VIEW TRANSFORMATION INPUT PRIORITY\s+2 for a
description of how \s-2PHIGS\s+2 determines the view representation to use
to map the \s-2NPC\s+2 positions to \s-2WC\s+2.
.LP
See \s-2INITIALIZE STROKE\s+2 for a description of the available
\s-2STROKE\s+2 devices and how their measure values are determined.
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP, WSOP, *, *\s+2)
.IP 259
Ignoring function, the input device class of the current input report
does not match the class being requested
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INITIALIZE STROKE (3P)"
.SM "AWAIT EVENT (3P)"
.SM "SET VIEW TRANSFORMATION INPUT PRIORITY (3P)"
.SM "GET STROKE 3 (3P)"
.fi
|