Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gstext(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

gstext

Purpose

     Writes annotated text.

C Syntax

     int gstext_ (x, y, number, text)

     int *x, *y, *number;
     char *text;

FORTRAN Syntax

     INTEGER function gstext (x, y, number, text)

     INTEGER x, y, number
     CHARACTER*n text

Pascal Syntax

     FUNCTION gstext_ (

     VAR x, y, number: INTEGER;
     VAR text: ARRAY [1..k| of CHAR
     ): INTEGER [PUBLIC|;

Description

     The  gstext subroutine  writes the  number of  characters
     indicated by  the parameters,  starting at  the specified
     baseline position  and according  to the  relevant attri-
     butes.  This subroutine is to be used only with annotated
     text.

     The relevant attributes are:

     o   Color map
     o   Plane mask
     o   Font
     o   Code page
     o   Baseline direction
     o   Text color index.

     Parameters

     x, y              Define   the   baseline  position   for
                       writing the text.

     number            Indicates the number  of bytes to write
                       from the text string.

     text              Contains the ASCII  codes for the char-
                       acters to write, as an array.

     The graphics  written to the frame  buffer are determined
     by the 8-bit  ASCII codes in the input data  and the code
     page attribute.   The ASCII control codes  in between are
     ignored  except  the  following:   1F,  1E,  1D,  and  1C
     (hexadecimal).  These  control codes  cause a shift  to a
     predefined code  page for the next  ASCII character only.
     The code page definitions are:

     1F      Bottom half of code page 1
     1E      Top half of code page 1
     1D      Bottom half of code page 2
     1C      Top half of code page 2.

     For  any  ASCII value  between  0  and 31  (decimal),  no
     graphic is written.   For any other ASCII  value and code
     page combination that does not result in a valid graphic,
     a dash is written.

     For Pascal, the application must declare the array passed
     as  being  fixed  length   and  declare  the  routine  as
     accepting an array  of that length; the k  in the routine
     declaration must be a constant.

Return Value

     GS_SUCC   Successful.
     GS_CORD   Invalid coordinate.
     GS_FBUF   Frame buffer overflow.
     GS_INAC   Virtual terminal inactive.

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