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

GPTXPR - Set Text Precision

GPTXPR (prec)

Purpose

Use GPTXPR to insert a Set Text Precision structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Set Text Precision structure element depending on the current edit mode.

The text precision specifies which attributes apply to annotation and geometric text primitives and the manner in which the graPHIGS API uses them. At structure traversal time, the graPHIGS API uses this precision when the text precision aspect source flag is set to 2=INDIVIDUAL

The traversal default for text precision is 1=STRING_PREC

If the workstation does not support the specified text precision, then the graPHIGS API uses the highest available precision in the font instead.

Parameters

prec -- specified by user, fullword integer

Text precision (1=STRING_PREC, 2=CHAR_PREC, 3=STROKE_PREC )

The following figure describes the attributes and precision for geometric text:

                                         Geometric Text Attributes
 
                                                                                    CHARACTER
                 CHARACTER                                  CHARACTER                UP AND    CHARACTER
          TEXT   EXPANSION   CHARACTER           CHARACTER    UP     TEXT    TEXT     BASE    POSITIONING
          FONT     FACTOR     SPACING   COLOR*    HEIGHT    VECTOR   PATH  ALIGNMENT VECTORS     MODE
          --------------------------------------------------------------------------------------------
 P        |                                                                                          |
 r STRING |Y **      N         N         Y         Y         N        N       N        N        Y ***|
 e        |                                                                                          |
 c        |                                                                                          |
 i   CHAR |Y **      Y         Y         Y         Y         Y        Y       Y        Y        Y ***|
 s        |                                                                                          |
 i        |                                                                                          |
 o STROKE |Y **      Y         Y         Y         Y         Y        Y       Y        Y        Y ***|
 n        --------------------------------------------------------------------------------------------
                *   Color refers to both Set Text Color Direct and Set Text Color Index.
 

Note:

The following keywords are used above to designate which attributes will be processed for a particular precision:

Y

The attribute is applied for this precision.

N

The attribute is not applied for this precision.

**

The requested font will be applied if it is available on the requested workstation and if it was activated using the Activate Font (GPACFO) subroutine. Otherwise, the workstation will default to an alternate font.

***

The character positioning mode will be applied if the font has the requested character information. The following figure describes the attributes and precision for annotation text:
                                                   Annotation Text Attributes
 
 
                                                       ANNOTATION
                    CHARACTER                            HEIGHT   ANNOTATION                                    CHARACTER
            TEXT    EXPANSION    CHARACTER               SCALE       UP     ANNOTATION  ANNOTATION  ANNOTATION POSITIONING
            FONT      FACTOR      SPACING     COLOR*     FACTOR    VECTOR      PATH     ALIGNMENT     HEIGHT       MODE
           --------------------------------------------------------------------------------------------------------------
 P         |                                                                                                            |
 r  STRING | Y 4        N            N          Y         Y 1        N          N           N          Y 1        Y 5   |
 e         |                                                                                                            |
 c         |                                                                                                            |
 i    CHAR | Y 4        Y 1          Y 2        Y         Y 1        Y 2        Y 2         Y 2        Y 1        Y 5   |
 s         |                                                                                                            |
 i         |                                                                                                            |
 o  STROKE | Y 4        Y 3          Y 3        Y         Y 3        Y 3        Y 3         Y 3        Y 3        Y 5   |
 n         --------------------------------------------------------------------------------------------------------------
                       *  Color refers to both Set Text Color Direct and Set Text Color Index.
 

Note:

The following keywords are used above to designate which attributes will be processed for a particular precision:

Y

The attribute is applied for this precision.

N

The attribute is not applied for this precision. The following numbers are used above to describe how precisely an attribute will be applied.

1

The attribute is applied a closely as possible for the entire text string.

2

Whether these attributes are applied is workstation dependent. See The graPHIGS Programming Interface: Technical Reference for more information.

3

The attribute is applied on a stroke-by-stroke basis, that is, exactly.

4

The requested font will be applied if the font is available in the requested workstation; otherwise, the workstation will default to an alternate font.

5

The character positioning mode will be applied if the font has the requested character information.

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
305
TEXT PRECISION VALUE IS INVALID

Related Subroutines

GPAAL
Set Annotation Alignment
GPAPT
Set Annotation Path
GPASF
Attribute Source Flag Setting
GPAUP
Set Annotation Up Vector
GPCHSP
Set Character Spacing
GPCHUB
Set Character Up and Base Vectors
GPCHUP
Set Character Up Vector
GPQGFC
Inquire Geometric Font Characteristics
GPQPTR
Inquire Predefined Text Representation
GPQXAF
Inquire Extended Annotation Font Characteristics
GPQXTR
Inquire Extended Text Representation
GPTXAL
Set Text Alignment
GPTXPT
Set Text Path
GPXTXR
Set Extended Text Representation

RCP code

201328648 (X'0C000808')


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