Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

TEXT 3(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

TEXT 3 − create structure element specifying 3D text primitive

SYNOPSIS

C Syntax

void
ptext3 ( text_pt, dir, text )
Ppoint3∗text_pt;text point
Pvec3dir[2];direction vectors
char∗text;text string

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

The TEXT 3 subroutine puts a structure element containing the full specification of a three-dimensional TEXT 3 primitive into the currently open structure. 

The TEXT 3 primitive is a character string. The location and orientation of the string in the display is controlled by the text point and direction vectors subroutine parameters, specified in Modelling Coordinates (MC).  Other aspects of the text display, such as the font, colour, spacing, height, and alignment, are controlled by the current values of the primitive attributes listed below. 

If the current edit mode is INSERT, the structure element created by the TEXT 3 subroutine is inserted into the open structure after the element pointed to by the current element pointer. If the current edit mode is REPLACE, the TEXT 3 element replaces the element in the structure pointed to by the element pointer.  In either case, the element pointer is updated to point to the new TEXT 3 element. 

C Input Parameters

text_pt
A pointer to a Ppoint3 structure that specifies the x, y, and z coordinates that locate the text string.  The Ppoint3 structure is defined in phigs.h as follows:

typedef struct  {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

dirAn array of two Pvec3 structures containing direction vectors.  The Pvec3 structure is defined in phigs.h as follows:

typedef struct  {
Pfloatdelta_x;/∗ x magnitude ∗/
Pfloatdelta_y;/∗ y magnitude ∗/
Pfloatdelta_z;/∗ z magnitude ∗/
} Pvec3;

textA pointer to the character string to be written into the display. 

Execution

When the structure is traversed, the TEXT 3 element draws the specified character string on the plane in the MC system defined by text point and the two direction vectors.  These parameters define a Text Local Coordinate (TLC) system in the MC system. The text point parameter defines the origin of this TLC system, the first direction vector defines the positive x axis, and the second direction vector defines the positive y axis.  Only the directions, not the lengths, of these vectors are relevant. 

The precise position of the text is defined in relation to this plane by the current values of the text primitive attributes CHARACTER UP VECTOR, TEXT PATH, and TEXT ALIGNMENT. The text primitive is subject to the current transformations in the transformation pipeline from the MC system to the workstation display. 

Other aspects of the appearance of the text are controlled by the attributes TEXT FONT, TEXT PRECISION, CHARACTER HEIGHT, CHARACTER WIDTH, CHARACTER EXPANSION FACTOR, CHARACTER SPACING, and TEXT COLOUR INDEX. 

Attributes Applied

The attributes listed below are used to display the TEXT 3 primitive when the structure is traversed. The Aspect Source Flags (ASFs) tell where to access the output display attributes.  These attributes can come directly from the traversal state list, or they can be accessed indirectly, using the appropriate index in the traversal state list and the corresponding bundled representation in the PHIGS workstation state list. 

text fonttext font ASF
text precisiontext precision ASF
character expansion factorcharacter expansion factor ASF
character spacingcharacter spacing ASF
text colourtext colour index ASF
character height
character up vector
text path
text alignment
text index
depth cue index
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

INQUIRE TEXT FACILITIES (3P)
INQUIRE TEXT EXTENT (3P)
TEXT (3P)

September 02, 1992

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