Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

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

text − 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;

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;

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);

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

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

Text primitives draw characters starting at the Virtual Device Coordinate current position or at the specified (x,y) or (x,y,z) coordinate.  If more is non-zero, characters are buffered, awaiting more text before text alignment and drawing are performed. If more is zero, alignment and drawing are done immediately.  xform specifies the type of transformation to be applied to the font coordinates. 

If xform equals VDC_TEXT (zero), the current font transformation (character_height, character_width, etc.) is pre-concatenated with the vdc to device coordinate transformation and used as the font-to-Device Coordinate transformation.

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

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

The Device Coordinate text procedure draws characters starting at the Device Coordinate 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, the other fonts may or may not draw the entire character.

Only the Device-Coordinate character attributes (dccharacter_height and dccharacter_width) are used in drawing Device-Coordinate text.

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),

Hewlett-Packard Company  —  May 11, 2021

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