pinit_stroke3(3g) — Subroutines
Name
pinit_stroke3 − Sets the stroke device to application-specific values.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinit_stroke3 (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint dev_num, /∗ (I) Stroke device number ∗/
Pint view_ind, /∗ (I) Initial view index ∗/
const Ppoint_list3 ∗init, /∗ (I) Points in the initial stroke, in
world coordinates ∗/
Pint pet, /∗ (I) Prompt and echo type ∗/
const Plimit3 ∗echo_vol, /∗ (I) Echo volume, in device
coordinates ∗/
const Pstroke_data3 ∗record /∗ (I) Data record ∗/
)
Data Structures
typedef struct {
Pint num_points; /∗ number of Ppoint3s in the list ∗/
Ppoint3 ∗points; /∗ list of points ∗/
} Ppoint_list3;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
Pfloat z; /∗ z coordinate ∗/
} Ppoint3;
typedef struct {
Pfloat x_min; /∗ x minimum ∗/
Pfloat x_max; /∗ x maximum ∗/
Pfloat y_min; /∗ y minimum ∗/
Pfloat y_max; /∗ y maximum ∗/
Pfloat z_min; /∗ z minimum ∗/
Pfloat z_max; /∗ z maximum ∗/
} Plimit3;
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 z_interval; /∗ z interval ∗/
Pfloat time_interval; /∗ time interval ∗/
union Pstroke3_pets {
struct Pstroke3_pet_r1 {
Pint impl_dep;
} pet_r1;
struct Pstroke3_pet_r2 {
Pint impl_dep;
} pet_r2;
struct Pstroke3_pet_r3 {
Pmarker_attrs marker_attrs; /∗ marker attributes ∗/
} pet_r3;
} pets;
} Pstroke_data3;
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_stroke3 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.
This function accepts the echo volume in a 6-component list of x-, y-, and z-coordinates, in device coordinates. The order of the list components is XMIN < XMAX, YMIN < YMAX, ZMIN < ZMAX.
When an application calls pinit_stroke3, 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_stroke3
pinit_stroke
pinq_def_stroke_data3
pinq_stroke_st3
preq_stroke
psample_stroke
pset_stroke_mode
pset_view_tran_in_pri