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

Chapter 2. Output Primitives

These subroutines address the specification and creation of output primitives, which are structure elements. Many have both two- and three-dimensional forms and are displayed when the structure elements defining them are encountered during structure traversal. To use primitive subroutines, the structure state must be Structure Open (STOP).

For all two-dimensional output primitive subroutines, the z coordinate is assumed to equal zero by default.

If a specified workstation does not support a requested output primitive in a structure, then the graPHIGS API updates only the element number in the graPHIGS traversal state list.

Note:

When the application inserts an element into the open structure following the element pointer, the pointer updates to that element.

ANNOTATION TEXT RELATIVE (PHOP,*,STOP,*)

Purpose

Use Annotation Text Relative to insert a two-dimensional Annotation Text Relative 2 structure element into the open structure following the element pointer or replace the element pointed at by the element pointer with an Annotation Text Relative 2 structure element, depending on the current edit mode.

During structure traversal, this element annotates the specified reference point according to the annotation style in the traversal state list. The specified annotation offset determines the position of the annotation string. The annotation string defines the origin of a local text coordinate system relative to a specified reference point after transformation to Normalized Projection Coordinates (NPC). The text plane is always parallel to the x., y plane (z=transformed location) 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 graPHIGS API 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 to NPC during structure traversal, then no representation for this primitive is displayed. If the graPHIGS API does not clip the reference point, then the graPHIGS API clips the displayed representation according to the rules for the corresponding primitive type (e.g., text, polyline, etc.).

The graPHIGS API treats control characters in a character string as undefined characters and displays the default for the character set. This default for the character set is the default character in the graPHIGS API character set file. For U.S. English, this is the hyphen character (EBCDIC X'60', ASCII X'2D').

If the annotation style attribute entry in the PHIGS traversal state list is set to LEAD LINE, then after transformation the graPHIGS API draws a single line segment from the specified reference point to the origin of the local text coordinate system using the polyline attributes in the PHIGS traversal state list.

Language Bindings

C


panno_text_rel (ref_pt, offset, char_string)

Input Parameters

const Ppoint *ref_pt
Reference point in MC.

const Pvec *offset
Annotation offset in NPC. Determines the position of the annotation character string.

const char *char_string
Annotation character string to be displayed.

FORTRAN

PATR (rpx, rpy, apx, apy, chars)

Input Parameters

real rpx
x coordinate of the reference location, in MC, that is to be annotated.

real rpy
y coordinate of the reference location, in MC, that is to be annotated.

real apx
x component of the annotation offset in NPC. Determines the position of the annotation character string (x component).

real apy
y component of the annotation offset in NPC. Determines the position of the annotation character string (y component).

character*(*) chars
Annotation character string to be displayed.

FORTRAN Subset

PATRS (rpx, rpy, apx, apy, lstr, chars)

Input Parameters

real rpx
x coordinate of the reference location, in MC, that is to be annotated.

real rpy
y coordinate of the reference location, in MC, that is to be annotated.

real apx
xcomponent of the annotation offset in NPC. Determines the position of the annotation character string (xcomponent).

real apy
ycomponent of the annotation offset in NPC. Determines the position of the annotation character string (ycomponent).

integer lstr
Length of string in characters.

character*80 chars
Annotation character string to be displayed.

Errors

5
Function Requires State (PHOP,*,STOP,*)

Related Subroutines

  • Set Annotation Style


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