Purpose
Use Initialize Stroke to initialize the specified stroke device.
The Initialize Stroke subroutine stores the initial stroke, initial view index, prompt/echo type, echo area and stroke data record in the workstation state list for the specified device. The z coordinates of the echo volume remain unchanged.
For all prompt and echo types, the first entry of the stroke data record is the input buffer size, which is an integer in the range (1..n). The graPHIGS API compares this against the available input buffer size for the specified stroke device. If the requested buffer size is greater, then the graPHIGS API records the available size in the workstation state list instead of the specified input buffer size. If the initial stroke is longer than the buffer size, then the graPHIGS API issues an error.
When a stroke measure process begins, it acquires a buffer of the current input buffer size. The graPHIGS API copies the initial stroke pointlist into this buffer, and places the editing position at the initial buffer editing position. The replacement of points begins at this initial position. The x, y, and time intervals (where possible) of the data record control the frequency and density of stroke points.
This function supports the following prompt/echo types:
Note:
The stroke device must be in Request mode.
Language Bindings
pinit_stroke (ws_id, stroke_num, init_view_ind, init_stroke, pet, echo_area, stroke_data) |
PINSK (wkid, skdnr, iviewi, n, ipx, ipy, pet, xmin, xmax, ymin, ymax, ldr, datrec) |
The pprec parameters used to build the stroke input data record for pet= 1 are as follows: (IL=2, IA=input buffer size, editing position, RL=3, RA=x interval, y interval, time interval in seconds, SL=0, LSTR=(), STR=()).
The pprec parameters used to build the stroke input data record for pet=3 are as follows: (IL=9, IA=input buffer size, editing position, unused, marker type ASF, marker size scale factor ASF, polymarker color index ASF, polymarker index, marker type, polymarker color index, RL=4, RA=x interval, y interval, time interval in seconds, marker size scale factor, SL=0, LSTR=(), STR=()).
The pprec parameters used to build the stroke input data record for pet=4 are as follows: (IL=9, IA=input buffer size, editing position, unused, line type ASF, line width scale factor ASF, polyline color index ASF, polyline index, line type, polyline color index, RL=4, RA=x interval, y interval, time interval in seconds, line width scale factor, SL=0, LSTR=(), STR=()).
Errors
Related Subroutines