Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ text(3G) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

append_text(3G)

character_height(3G)

text_alignment(3G)

text_color(3G)

text_font_index(3G)

text_line_path(3G)

text_line_space(3G)

text_orientation(3G)

text_path(3G)

text_precision(3G)

text_switching_mode(3G)

text(3G)

NAME

text2d, text3d, dctext, inttext2d − output a string of characters. 

SYNOPSIS

C Syntax:

void text2d ( fildes, x, y, string, xform, more );
int fildes, xform, more;
float x, y;
char *string;

void text3d ( fildes, x, y, z, string, xform, more );
int fildes, xform, more;
float x, y, z;
char *string;

void dctext ( fildes, dcx, dcy, string );
int fildes, dcx, dcy;
char *string;

void inttext2d ( fildes, x, y, string, xform );
int fildes, x, y, xform;
char *string;

FORTRAN77 Syntax:

subroutine text2d ( fildes, x, y, string, xform, more )
integer*4 fildes, xform, more
real x, y
character*(*) string

subroutine text3d ( fildes, x, y, z, string, xform, more )
integer*4 fildes, xform, more
real x, y, z
character*(*) string

subroutine dctext ( fildes, dcx, dcy, string )
integer*4 fildes, dcx, dcy
character*(*) string

subroutine inttext2d ( fildes, x, y, string, xform )
integer*4 fildes, x, y, xform
character*(*) string

Pascal Syntax:

procedure text2d ( fildes:integer; x, y:real; string:string255; xform, more:integer );

procedure text3d ( fildes:integer; x, y, z:real; string:string255; xform, more:integer );

procedure dctext ( fildes, dcx, dcy: integer; string:string255 );

procedure inttext2d ( fildes, x, y:integer; string:string255; xform:integer );

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

x, y, z Starting coordinate for the string in current units. 

dcx, dcy Starting coordinate for the string in device units. 

string ASCII string of characters terminated with a null character. 

xform Enumerated value specifying the type of transformation to perform on the font coordinates:

VDC_TEXT = VDC
WORLD_COORDINATE_TEXT = world coordinate
TOS_TEXT = top of matrix stack
ANNOTATION_TEXT = world coordinate and VDC

more Set to TRUE (1) if more characters are to be buffered with the current text and FALSE (0) if no buffering is needed. 

Discussion

text2d, text3d, and inttext2d primitives draw characters starting at the virtual device coordinate current position or at the specified (x, y) or (x, y, z) coordinate.  In text2d and text3d, if more is non-zero, characters are buffered, awaiting more text before text alignment and drawing are performed.  With text2d and text3d, if more is zero, alignment and drawing are done immediately.  For inttext2d and dctext, drawing is performed immediately.  Xform specifies the type of transformation to be applied to the font coordinates. 

If xform equals VDC_TEXT (0), the current font transformation (character_height, intcharacter_height, intcharacter_width, character_width, etc.) is preconcatenated with the VDC-to-DC transformation and used as the font-to-DC transformation. 

If xform equals WORLD_COORDINATE_TEXT(1), the current font transformation is pre-concatenated with the transformation matrix on top of the matrix stack and used as the font-to-DC transformation. 

If xform equals TOS_TEXT(2), the top of the matrix stack is used as the font-to-DC transformation matrix. 

If xform equals ANNOTATION_TEXT(3), the current transformation is set to a coordinate system with its origin at the x, y[, z] coordinate specified (in modeling units) and with scaling set to VDCs.  The current font transformation is pre-concatenated with this transformation matrix and used as the font to device coordinate transformation.  This ensures that text in a 3-D coordinate system is readable because it is parallel to the screen (X-Y plane).  This is independent of the modeling transformation in effect.  Three-dimensional text orientation may override this screen parallelism if any of its vectors are not parallel to the screen. 

The dctext procedure draws characters starting at the device coordinates specified and only with character path right.  All control characters are ignored except for space (octal 40). Only fonts 1 and 2 work correctly with dctext; Starbase may not be able to draw complete characters in other fonts. 

Only the DC character attributes (dccharacter_height and dccharacter_width) are used in drawing DC text. 

The inttext2d procedure draws characters starting at the coordinates specified with the default text alignment for the specified path.  All control characters are ignored except the space character (octal 40).  Only fonts 1 and 2 work correctly with inttext2d; Starbase does not support all stroke operations for the integer interface. 

The character attributes intcharacter_height, intcharacter_width, inttext_orientation2d, and intinquire_text_extent2d affect only inttext2d. 

Procedures text_alignment, text_line_path, and text_line_space do not affect inttext2d. 

Integer operations are only available when using the INT_XFORM gopen mode.  When in INT_XFORM mode, floating point operations are not available for that fildes.  Floating point operations are the default, or can be specified with FLOAT_XFORM mode.  For a list of integer operations, floating point operations and common operations see the starbase(3G) manual page. 

SEE ALSO

append_text(3G), character_height(3G), text_alignment(3G), text_color(3G), text_font_index(3G), text_line_path(3G), text_line_space(3G), text_orientation(3G), text_path(3G), text_precision(3G), text_switching_mode(3G).  Starbase Graphics Techniques. 

Hewlett-Packard Company  —  November 03, 1994

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