[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPANR3 - Annotation Text Relative 3

GPANR3 (refpt, textvec, length, text)

Purpose

Use GPANR3 to insert an Annotation Text Relative 3 structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with an Annotation Text Relative 3 structure element depending on the current edit mode.

When you create this structure element, the current Text Character Set value in the graPHIGS API State List is bound to this character string.

During structure traversal, this element annotates the specified reference point according to the annotation style in the traversal state list. The annotation string is positioned according to textvec which defines the origin of a local text coordinate system relative to refpt after transformation to NPC. The text plane is always parallel to the x, y plane in NPC. If the resulting text position is outside the usable NPC space [0,1][0,1][0,1], then the graPHIGS API may clip part or all of the string.

The application positions and renders the text string in the local coordinate system according to the annotation text attributes in the traversal state list. If the graPHIGS API clips the specified reference point (refpt) to NPC during structure traversal, then no representation for this primitive is displayed. If the graPHIGS API does not clip the reference point (refpt), then the graPHIGS API clips the displayed representation according to the rules for the corresponding primitive type (e.g., text, polyline, etc.).

If the style (style) parameter on the Set Annotation Style (GPAS) subroutine is set to 2=LEAD_LINE , then after transformation, the graPHIGS API draws a single line segment from the reference point (refpt) to the origin of the local text coordinate system using the polyline attributes in the traversal state list.

Parameters

refpt -- specified by user, 3 short floating-point numbers (MC)

x, y, and z coordinates of the reference location that is to be annotated.

textvec -- specified by user, 3 short floating-point numbers (NPC)

x, y, and z components of a vector which defines the location to position the origin of the local text coordinate system relative to refpt after transformation to NPC.

length -- specified by user, fullword integer

Length of text string in bytes (>=0)

text -- specified by user, variable length character string

Text string to be displayed.

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
108
NUMBER OF CHARACTERS IN TEXT STRING < ZERO

Related Subroutines

GPAS
Set Annotation Style

RCP code

201328153 (X'0C000619')


[ Previous | Next | Contents | Glossary | Home | Search ]