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

INITIALIZE STROKE (PHOP,WSOP,*,*)

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:

  • Type One displays the current stroke using a workstation-dependent technique.

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

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

    Note:

    The stroke device must be in Request mode.

    Language Bindings

  • C

    pinit_stroke (ws_id, stroke_num, init_view_ind, init_stroke, pet, echo_area, stroke_data)

    Input Parameters

    Pint ws_id
    Workstation identifier.

    Pint stroke_num
    Stroke device number (>=1).

    Pint init_view_ind
    Initial view index (>=0).

    const Ppoint_list *init_stroke
    Initial stroke in WC.

    Pint pet
    Prompt and echo type.

    const Plimit *echo_area
    Echo area in DC.

    const Pstroke_data *stroke_data
    Data record.

    FORTRAN

    PINSK (wkid, skdnr, iviewi, n, ipx, ipy, pet, xmin, xmax, ymin, ymax, ldr, datrec)

    Input Parameters

    integer wkid
    Workstation identifier.

    integer skdnr
    Stroke device number (>=1).

    integer iviewi
    Initial view index (>=0).

    integer n
    Number of coordinates of initial stroke.

    real ipx(*)
    x coordinates of initial stroke in WC. The actual arguments are dimensioned by at least max(1,n).

    real ipy(*)
    y coordinates of initial stroke in WC. The actual arguments are dimensioned by at least max(1,n).

    integer pet
    Prompt and echo type.

    real xmin
    Minimum x coordinate determining echo area in DC.

    real xmax
    Maximum x coordinate determining echo area in DC.

    real ymin
    Minimum y coordinate determining echo area in DC.

    real ymax
    Maximum y coordinate determining echo area in DC.

    integer ldr
    Dimension of the data record array.

    character*80 datrec(ldr)
    Data record.

    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

    3
    Function Requires State (PHOP,WSOP,*,*)
    54
    Specified Workstation Is Not Open
    61
    Specified Workstation Is Not Of Category Input Or Outin
    250
    Specified Device Not Available On Workstation
    251
    Function Requires Input Device To Be In Request Mode
    254
    Invalid Echo Area/Volume: XMIN>=XMAX, YMIN>=YMAX OR ZMIN>ZMAX
    255
    Echo Area/Volume Boundary Point(s) Outside Device Range
    253
    Prompt/Echo Type Not Available On Specified Workstation
    260
    Input Device Data Record Field Is In Error
    261
    Initial Value Is Invalid
    262
    Number Of Points In Initial Stroke > Buffer Size
    114
    View Index Value < ZERO

    Related Subroutines

  • Inquire Stroke Device State 3

  • Inquire Default Stroke Device Data 3

  • Inquire Display Space Size

  • Inquire Number Of Available Logical Input Devices

  • Pack Data Record

  • Set Stroke Mode


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