Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ preq_stroke(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

preq_stroke(3g)  —  Subroutines

Name

preq_stroke − Prompts for input using the stroke-class logical input device specified. 

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

Syntax

void preq_stroke (
  Pint           wsid,      /∗ (I) Workstation identifier ∗/
  Pint           dev_num,   /∗ (I) Stroke device number ∗/
  Pin_status    ∗status,    /∗ (O) Initial status ∗/
  Pint          ∗view_ind,  /∗ (O) View index ∗/
  Ppoint_list   ∗stroke     /∗ (O) Points in the stroke ∗/
)

Data Structures

typedef enum {
    PIN_STATUS_NONE,    /∗ user performed a break action ∗/
    PIN_STATUS_OK,      /∗ user entered a stroke ∗/
    PIN_STATUS_NO_IN    /∗ not used by this function ∗/
} Pin_status;
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;

Description

preq_stroke prompts you for input using the stroke-class logical input device specified by the device number and the workstation identifier.  If the input status is PIN_STATUS_OK, this function returns the world coordinate points and the view index of the view transformation Digital PHIGS uses to translate the normalized projection coordinate points to the world coordinate points. See Getting Started with DEC PHIGS for more information about view indexes. 

Digital PHIGS uses the current workstation transformation to translate the device coordinate points to normalized projection coordinate points.  If you generate a stroke that contains more points than the number of components in the stroke buffer, you will lose the additional input.  To establish a stroke buffer size, call the pinit_stroke function. 

This function ignores the z-coordinate components and returns a two-dimensional result. 

The application allocates the memory for the point list returned by this function.  You specify the maximum size of the returned stroke point list with the function pinit_stroke.  To determine the maximum size of a character string supported by Digital PHIGS, call pinq_def_stroke_data. 

See Also

pget_stroke
pinit_stroke
preq_stroke3
psample_stroke
pset_stroke_mode
pset_view_tran_in_pri

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