Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inq_pick_pa(3G) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pick_from_segment(3G)

set_traversal_depth(3G)

inq_pick_path(3G)

NAME

inq_pick_path, inq_pick_path_depth − return the path to a picked primitive

SYNOPSIS

C Syntax:

void inq_pick_path_depth(fildes, depth)
int fildes, *depth;

void inq_pick_path(fildes, path)
int fildes, path[];

FORTRAN77 Syntax:

subroutine inq_pick_path_depth(fildes, depth)
integer*4 fildes, depth

subroutine inq_pick_path(fildes, path)
integer*4 fildes, path(*)

Pascal Syntax:

procedure inq_pick_path_depth(fildes:integer;var depth:integer);

procedure inq_pick_path(fildes:integer;
var path:array[lo..hi:integer] of integer);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

Output Parameters

depth Depth of the pick path. 

path Path to the picked primitive. 

Discussion

Inq_pick_path and inq_pick_path_depth return information about the path to the primitive last picked from the display list of the specified graphics device by pick_from_segment(3G). Inq_pick_path returns the path to the primitive while inq_pick_path_depth returns the depth of the pick path to the primitive.  This path uniquely identifies the location of the picked primitive within the specified segment network. 

Path is an array of depth branches that describes the path to the picked primitive.  A branch occurs when a reference to a segment is encountered in the segment network.  Each branch is identified by a triple (C syntax):

path[i] Segment name for path branch. 

path[i+1] Closest preceding display list label within that segment. 

path[i+2] Offset from the label to the branch point.  The branch point is a segment-referencing element (call_segment, execute_segment, cond_call_segment or cond_execute_segment) or the picked primitive if this is the last branch in the path.

Where i equals 0, 3, 6, ...,  corresponding to branches 1, 2, 3, ... . 

The first triple in the path array (path[0], path[1], path[2]) is the first branch of the path. The last triple (path[3*depth - 3], path[3*depth - 2], path[3*depth - 1]) is the location of the picked primitive. 

Note that path must be large enough to contain at least 3 * depth integers.  The maximum depth possible is one greater than the maximum traversal depth set by set_traversal_depth(3G).

ERRORS

1 Graphics device is not initialized for this operation. 

LANGUAGE DEPENDENCIES

FORTRAN77 arrays, by default, start with indexes of 1 rather than zero. Consequently, i must take on values of 1, 4, 7, ...  The last branch in the path is path[3*depth - 2], path[3*depth - 1], path[3*depth]. 
 
The starting value of i for Pascal depends on the lower bound used to declare the path array. The index is incremented by 3 starting at the lower bound for each consecutive branch. 

SEE ALSO

pick_from_segment(3G), set_traversal_depth(3G). 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

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