[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPINSK - Initialize Stroke

GPINSK (wsid, device, view, npoint, width, pointlist, echo, area, buflen, editpos, datalen, data)

Purpose

Use GPINSK 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.

For all prompt/echo types, the input buffer size is compared to the maximum input buffer size for stroke devices on that workstation. If the requested buffer size is greater, the maximum buffer size for stroke devices is substituted in the stored record. If the initial stroke is longer than the buffer size, an error is issued.

When a stroke measure process begins, it acquires a buffer of the current input buffer size. The initial stroke pointlist is copied into this buffer, and the editing position is placed at the initial buffer editing position. The replacement of points begins at this initial position. The x, y, z and time intervals (where possible) of the data record control the frequency and density of stroke points.

Note:

The stroke device must be in Request mode.

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

device -- specified by user, fullword integer

Stroke device number (>=1)

view -- specified by user, fullword integer

Initial view index (>=0)

npoint -- specified by user, fullword integer

Number of points in initial stroke (>=0)

width -- specified by user, fullword integer

Number of fullwords between subsequent x values in the initial pointlist (>=3)

pointlist -- specified by user, array of short floating-point numbers (WC)

Coordinates of initial stroke points specified as a list of three-dimensional points.

echo -- specified by user, fullword integer

Prompt/echo type (>=1)

area -- specified by user, 6 short floating-point numbers (DC)

Echo area (Xmin, Xmax, Ymin, Ymax, Zmin, Zmax)

buflen -- specified by user, fullword integer

Stroke input buffer size (>=0) This value is specified as the maximum number of points the user may enter into the stroke input buffer.

editpos -- specified by user, fullword integer

Editing position within the initial stroke buffer (1<=editpos<= npoint +1)

datalen -- specified by user, fullword integer

Data record length, in bytes (>=0)

Note:

The data record length parameter must equal zero (datalen=0) if no data record is required for the given prompt/echo type. For prompt/echo types which require a data record, the specified data record length must be greater than, or equal to, 12.

data -- specified by user, variable data

Stroke data record.

Prompt/echo Types

Type One

displays the current stroke using a workstation-dependent technique. Stroke echo Type One requires the following data record:
                  ----------------------------
               0  |            0             | Number of integers
                  |--------------------------|
               4  |            4             | Number of reals
                  |--------------------------|
               8  |            0             | Number of strings
            ----- |--------------------------|
            | 12  |        x interval (WC)   |
            |     |--------------------------|
            | 16  |        y interval (WC)   |
   reals    |     |--------------------------|
            | 20  |        z interval (WC)   |
            |     |--------------------------|
            | 24  | time interval (>=0)      |
            ----- ---------------------------- 

Type Three

displays a marker at each point of the current stroke. The marker representation is selected by a marker index entry, which is stored in the stroke data record.

Stroke echo Type Three requires the following data record:

              -----------------------------
           0  |         1 or 7            | Number of integers
              |---------------------------|
           4  |         4 or 5            | Number of reals
              |---------------------------|
           8  |           0               | Number of strings
         ---- |---------------------------|
         | 12 |  attribute control flag   | 0=NO ATTRIBUTES SPECIFIED
         |    |                           | 1=ATTRIBUTES SPECIFIED
         |    |---------------------------|----
         | 16 |    marker type ASF *      |   |
         |    |---------------------------|   |   1=BUNDLED
 integers| 20 |marker size scale fact ASF*|   |   2=INDIVIDUAL
         |    |---------------------------|   |
         | 24 |polymarker color indx ASF* |   |
         |    |---------------------------|----
         | 28 |     polymarker index*     |<-----Bundle table
         |    |---------------------------|----  index
         | 32 |    marker type index*     |   |
         |    |---------------------------|   |---
         | 36 |  polymarker color index*  |   |  |
       ------ |---------------------------|----  |
       |  40  |        x interval (WC)    |      | Individual
       |      |---------------------------|      | attribute
  reals|  44  |        y interval (WC)    |      | settings
       |      |---------------------------|      |
       |  48  |        z interval (WC)    |      |
       |      |---------------------------|      |
       |  52  |time interval (>=0)        |      |
       |      |---------------------------|----  |
       |  56  | marker size scale factor* |   |---
       ------ ----------------------------- ---  
 
       * Polymarker Attributes
         only present if attribute control flag=1

Type Four

displays a line joining successive points in the current stroke. A polyline index entry in the stroke data record selects the line representation used.

Stroke echo Type Four requires the following data record:

               ------------------------------
             0 |         1 or 7             | Number of integers
               |----------------------------|
             4 |         4 or 5             | Number of reals
               |----------------------------|
             8 |           0                | Number of strings
          ---- |----------------------------|
          | 12 |  attribute control flag    | 0=NO ATTRIBUTES SPECIFIED
          |    |                            | 1=ATTRIBUTES SPECIFIED
          |    |----------------------------|----
          | 16 |       linetype ASF *       |   |
          |    |----------------------------|   |   1=BUNDLED
  integers| 20 |linewidth scale factor ASF* |   |   2=INDIVIDUAL
          |    |----------------------------|   |
          | 24 | polyline color index ASF*  |   |
          |    |----------------------------|----
          | 28 |      polyline index*       |<---- Bundle table
          |    |----------------------------|----  index
          | 32 |      linetype index*       |   |
          |    |----------------------------|   |---
          | 36 |  polyline color index*     |   |  |
        ------ |----------------------------|----  |
        |   40 |        x interval (WC)     |      | Individual
        |      |----------------------------|      | attribute
   reals|   44 |        y interval (WC)     |      | settings
        |      |----------------------------|      |
        |   48 |        z interval (WC)     |      |
        |      |----------------------------|      |
        |   52 |time interval (>=0)         |      |
        |      |----------------------------|----  |
        |   56 |linewidth size scale factor*|   |---
        ------ ------------------------------ ---  
 
        * Polyline Attributes
          only present if attribute control flag=1

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
59
VIEW INDEX VALUE < ZERO
140
DEVICE NUMBER < ONE OR DEVICE NOT AVAILABLE
141
INPUT DEVICE NOT IN CORRECT MODE
144
PROMPT/ECHO TYPE NOT AVAILABLE ON WORKSTATION
145
ECHO AREA BOUNDARY VALUE IN ERROR
146
FIELD IN INPUT DEVICE DATA RECORD IN ERROR
323
VIEW INDEX EXCEEDS VIEW TABLE CAPACITY
324
PROMPT/ECHO TYPE < ONE
325
NUMBER OF POINTS IN INITIAL STROKE < ZERO
501
DATA RECORD WAS NOT SPECIFIED BUT IS REQUIRED
502
FIELD IN DATA RECORD NOT SUPPORTED ON WORKSTATION
506
NUMBER OF INITIAL VALUES < ZERO
509
DATA LENGTH VALUE < ZERO OR REQUIRED LENGTH
513
NUMBER OF INITIAL VALUES EXCEEDS DEVICE MAXIMUM
557
WIDTH PARAMETER < MINIMUM ALLOWED
577
BUFFER LENGTH IS < ZERO
578
BUFFER LENGTH EXCEEDS DEVICE MAXIMUM
579
INITIAL POSITION IS < ONE OR > NUMBER OF INITIAL VALUES PLUS ONE
580
INITIAL POSITION EXCEEDS BUFFER SIZE

Related Subroutines

GPQDS
Inquire Maximum Display Surface Size
GPQDSK
Inquire Default Stroke Device Data
GPQLI
Inquire List of Logical Input Devices
GPQSK
Inquire Stroke Device State
GPSKMO
Set Stroke Mode

RCP code

201335298 (X'0C002202')


[ Previous | Next | Contents | Glossary | Home | Search ]