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

GPCHUP - Set Character Up Vector

GPCHUP (up)

Purpose

Use GPCHUP to insert a Set Character Up Vector structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Set Character Up Vector structure element depending on the current edit mode.

During structure traversal, this structure element sets the current character up vector in the graPHIGS API traversal state list to the specified value. The base vector entries reset to the vector that is obtained by rotating the up vector 90 degrees clockwise.

The character up vector specifies the direction of the font coordinate y-axis within the text reference coordinate system. The character base vector specifies the direction of the font coordinate x-axis within the text reference coordinate system.

At structure traversal time, this structure element specifies the y-axis direction of the text coordinate system for characters in a text string that the graPHIGS API uses to render all subsequent geometric text primitives. The character up vector is a two-dimensional vector on the text plane specified by the text primitive. When rendering text primitives, the graPHIGS API uses the character up value along with a default character base vector set at right angles.

This attribute sets the same traversal state as the Set Character Up and Base Vector (GPCHUB) subroutine. The traversal default value for character up vector is 0.0, 1.0 and the traversal default value for character base vectors is 1.0, 0.0.

If the character up vector is invalid, then the up vector value defaults to 0.0, 1.0 and the base vector value defaults to 1.0, 0.0.

The graPHIGS API normalizes the specified vector. If the application later inquires the content of this structure element, then the graPHIGS API returns the normalized vector, not the original vector specified by this subroutine.

Parameters

up -- specified by user, 2 short floating-point numbers

Character up vector. (Magnitude must be >0)

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
79
CHARACTER UP VECTOR HAS LENGTH ZERO

Related Subroutines

GPCHUB
Set Character Up and Base Vectors
GPTXPR
Set Text Precision

RCP code

201328653 (X'0C00080D')


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