Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pinit_stroke(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pinit_stroke(3g)  —  Subroutines

Name

pinit_stroke − Sets the stroke device to application-specific values. 

Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function

Syntax

void pinit_stroke (
  Pint                 wsid,        /∗ (I) Workstation identifier ∗/
  Pint                 dev_num,     /∗ (I) Stroke device number ∗/
  Pint                 view_ind,    /∗ (I) Initial view index ∗/
  const Ppoint_list   ∗init,        /∗ (I) Points in the initial stroke, in
                                           world coordinates ∗/
  Pint                 pet,         /∗ (I) Prompt and echo type ∗/
  const Plimit        ∗echo_area,   /∗ (I) Echo area, in device
                                           coordinates ∗/
  const Pstroke_data  ∗record       /∗ (I) Data record ∗/
)

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;
typedef struct {
    Pfloat    x_min;    /∗ x minimum ∗/
    Pfloat    x_max;    /∗ x maximum ∗/
    Pfloat    y_min;    /∗ y minimum ∗/
    Pfloat    y_max;    /∗ y maximum ∗/
} Plimit;
typedef struct { /∗ stroke data record ∗/
    Pint    in_buf_size;    /∗ input buffer size ∗/
    Pint    init_pos;       /∗ initial editing position ∗/
    Pfloat  x_interval;     /∗ x interval ∗/
    Pfloat  y_interval;     /∗ y interval ∗/
    Pfloat  time_interval;  /∗ time interval ∗/
    union Pstroke_pets {
        struct Pstroke_pet_r1 {
            Pint     impl_dep;
        } pet_r1;
        struct Pstroke_pet_r2 {
            Pint     impl_dep;
        } pet_r2;
        struct Pstroke_pet_r3 {
            Pmarker_attrs   marker_attrs;   /∗ marker attributes ∗/
        } pet_r3;
    } pets;
} Pstroke_data;
    typedef struct {
        Pasf            type_asf;       /∗ marker type asf ∗/
        Pasf            size_asf;       /∗ marker style asf ∗/
        Pasf            colr_ind_asf;   /∗ marker color index asf ∗/
        Pint            ind;            /∗ marker index ∗/
        Pmarker_bundle  bundle;         /∗ marker bundle ∗/
    } Pmarker_attrs;
        typedef enum {
            PASF_BUNDLED,    /∗ bundled attributes ∗/
            PASF_INDIV       /∗ individual attributes ∗/
        } Pasf;
        typedef struct {
            Pint      type;       /∗ marker type ∗/
            Pfloat    size;       /∗ marker size scale factor ∗/
            Pint      colr_ind;   /∗ color index ∗/
        } Pmarker_bundle;

Constants

Data Structure Constants        Constant           Description
---------------------------------------------------------------------------
Marker types                    PMARKER_DOT        Dot marker
                                PMARKER_PLUS       Plus marker
                                PMARKER_ASTERISK   Asterisk marker
                                PMARKER_CIRCLE     Circle marker
                                PMARKER_CROSS      Diagonal cross marker
---------------------------------------------------------------------------

Description

pinit_stroke sets the stroke device to application-specific values.  You specify the coordinates of the initial stroke (in world coordinate values) and the initial view index of the view transformation Digital PHIGS uses to translate the device coordinate points to normalized projection coordinate points.  The z-components of a previously specified stroke remain unchanged. 

This function accepts the echo area in a 4-component list of x- and y-coordinates, in device coordinates.  The order of the list components is XMIN < XMAX, YMIN < YMAX.  The z-components of a previously specified echo volume remain unchanged. 

When an application calls pinit_stroke, the workstation surface cannot contain the stroke device’s prompt.  To remove an existing prompt from the surface, call the pset_stroke_mode function and place the device in request mode. 

The size and contents of the data record depend on the prompt and echo type you specify.  If the size or contents of the data record does not match the requirements of your chosen prompt and echo type, Digital PHIGS generates an error. 

See Stroke-Class PET for information on stroke-class prompt and echo types. 

See Also

pget_stroke
pinit_stroke3
pinq_def_stroke_data
pinq_stroke_st
preq_stroke
psample_stroke
pset_stroke_mode
pset_view_tran_in_pri

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026