Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gsxtat(3g) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fonts

gsxtxt

vrm2rtfont



GSXTAT(3g,L)                AIX Technical Reference                GSXTAT(3g,L)



-------------------------------------------------------------------------------
gsxtat



PURPOSE

Sets the text attributes for annotated text using the rtfont format.

C SYNTAX

int gsxtat_ (foreground, background, logop, font, clipbox)

int *foreground, *background, *logop, *font, *clipbox;

FORTRAN SYNTAX

INTEGER function gsxtat (foreground, background, logop, font, clipbox)

INTEGER foreground, background, logop, font, clipbox

PASCAL SYNTAX

FUNCTION gsxtat_ (

VAR foreground, background, logop, : INTEGER;
VAR font: ARRAY [1..k] of INTEGER;
VAR clipbox: ARRAY [1..l] of INTEGER;
): INTEGER [PUBLIC];

DESCRIPTION

The gsxtat subroutine defines the attributes to be used when drawing text with
a font in the rtfont format.

Parameters

foreground        Defines an entry in the color map to use for the foreground
                  color (bits set to 1) in the font raster for each character.
                  A value of -1 indicates no change for this attribute.

background        Defines an entry in the color map to use for the background
                  color (bits set to 0) in the font raster for each character.
                  A value of -1 indicates no change for this attribute.

logop             Indicates the logical operation to perform between the font
                  raster and the display destination.

                  In the following table, please note:






Processed November 7, 1990       GSXTAT(3g,L)                                 1





GSXTAT(3g,L)                AIX Technical Reference                GSXTAT(3g,L)



                    o The source pixels represent bits of data from the font
                      raster to be merged in some way with the corresponding
                      bits of data in the destination rectangle.

                    o The first three columns of the table specify the
                      operations you can perform, and the Code column contains
                      the corresponding value you should specify for the logop
                      parameter.

                    o A ~ (tilde) represents the logical INVERSE.

                  Type of    Logical         Type of
                  Source     Operation       Destination          Code

                                              Destination clear    0
                                              Set Destination     15
                             No operation     Destination          5
                                             ~Destination         10
                   Source    REPLACE          Destination          3
                   Source    AND              Destination          1
                   Source    AND             ~Destination          2
                   Source    Exclusive-or     Destination          6
                   Source    OR               Destination          7
                   Source    OR              ~Destination         11
                  ~Source    REPLACE          Destination         12
                  ~Source    AND              Destination          4
                  ~Source    AND             ~Destination          8
                  ~Source    Exclusive-or     Destination          9
                  ~Source    OR               Destination         13
                  ~Source    OR              ~Destination         14

                  A value of -1 for this parameter indicates no change in the
                  current logical operation.

font              Points to a data area that contains the font header and
                  raster definitions for all characters defined in the font.
                  The calling process is responsible for either mapping the
                  font file or copying it into a memory area in order to obtain
                  a pointer to the data area.

                  Setting the value of this pointer to 0 indicates no change to
                  the current font file.

                  The GSL supports only a subset of the different forms that
                  the rtfont format allows. Specifically, the GSL supports any
                  combination of the following font formats:

                    o fixed width and height

                    o variable width and/or height

                    o halfword alignment or fullword alignment



Processed November 7, 1990       GSXTAT(3g,L)                                 2





GSXTAT(3g,L)                AIX Technical Reference                GSXTAT(3g,L)




                    o glyphs in raster format only

                    o index character array width of 4 bytes

                    o all individual glyph character bounds for variable width
                      and height fonts, except negative left or right bearings.

                  For more information on valid formats for rtfont files, see
                  "fonts" and the rtfont.h header file.

                  The GSL does not support any formats for rtfont files other
                  than those listed above.  If the font file specified is not
                  in a supported format, then the GSL returns the GS_FFMT
                  return code.

clipbox           Specifies an array of integers that correspond to a
                  rectangular area on the display screen.  When the gsxtxt
                  subroutine is used to draw text, any full or partial
                  characters that fall outside this area are clipped.  The
                  elements of the area to clip are as follows:

                  first element            Reserved. This value should always
                                           be 1.

                  second element           Specifies the x coordinate of the
                                           lower left corner of the clip box,
                                           in pixels.

                  third element            Specifies the y coordinate of the
                                           lower left corner of the clip box,
                                           in pixels.

                  fourth element           Specifies the height of the clip
                                           box, in pixels.

                  fifth element            Specifies the width of the clip box,
                                           in pixels.

                  The bottom and left edges of the clip box are inclusive,
                  while the top and right edges are exclusive.

                  This parameter is a pointer to the clip box array, which is
                  not copied into any GSL data structure, allowing the calling
                  process to modify the elements of the array without calling
                  the gsxtat subroutine.  If the values for the clip box are
                  changed between calls to the gsxtxt subroutine, the new clip
                  box is used for all text drawing until another change is
                  made.

                  Setting the value of this pointer to 0 indicates no change.




Processed November 7, 1990       GSXTAT(3g,L)                                 3





GSXTAT(3g,L)                AIX Technical Reference                GSXTAT(3g,L)



Warning:  Since the GSL subroutines that use the rtfont format are designed for
high-performance text drawing, no verification is made of the validity of the
clip box.  It is the responsibility of the calling process to ensure that the
entire clip box resides inside the physical size of the display.  Using a clip
box that is not entirely within the screen will produce unpredictable results.

When the GSL is installed from diskette, an attempt is made to convert the 14
supplied VRM format fonts into rtfont format.  The vrm2rtfont command
(described in the AIX Operating System Commands Reference) is used on the 14
VRM fonts in the /usr/lpp/gsl/fonts directory, and the resulting rtfonts are
stored in the /usr/lpp/fonts directory.  The following list shows the rtfont
format files stored in /usr/lpp/fonts:

+--------------+----------+-----------+
|Width x Height|          |           |
|       (in    | Style    | Filename  |
|   pixels)    |          |           |
+--------------+----------+-----------+
|   4 x   8    | Normal   | Rom6.500  |
+--------------+----------+-----------+
|   6 x   9    | Normal   | Rom7.500  |
+--------------+----------+-----------+
|    6 x 11    | Normal   | Rom8.500  |
+--------------+----------+-----------+
|    7 x 15    | Normal   | Rom11.500 |
+--------------+----------+-----------+
|    7 x 22    | Normal   | Rom16.500 |
+--------------+----------+-----------+
|    8 x 14    | Normal   | Rom10.500 |
+--------------+----------+-----------+
|    9 x 20    | Normal   | Rom14.500 |
+--------------+----------+-----------+
|    9 x 20    | Italic   | Itl14.500 |
+--------------+----------+-----------+
|    9 x 20    | Bold     | Bld14.500 |
+--------------+----------+-----------+
|    9 x 20    | Ergonomic| Erg14.500 |
+--------------+----------+-----------+
|   11 x 23    | Normal   | Rom17.500 |
+--------------+----------+-----------+
|   11 x 23    | Bold     | Bld17.500 |
+--------------+----------+-----------+
|   12 x 30    | Normal   | Rom22.500 |
+--------------+----------+-----------+
|   18 x 40    | Normal   | Rom29.500 |
+--------------+----------+-----------+

All of these fonts have fixed width and height and are halfword aligned.

For Pascal, the application must declare the arrays passed as being fixed
length and declare the routine as accepting arrays of that length.  The k and l
in the routine declaration must be constants.



Processed November 7, 1990       GSXTAT(3g,L)                                 4





GSXTAT(3g,L)                AIX Technical Reference                GSXTAT(3g,L)




RETURN VALUE

GS_SUCC  Successful.
GS_FFMT  Invalid font format.
GS_LONS  Invalid logical operation.

FILE

/usr/include/rtfont.h

RELATED INFORMATION

In this book:  "fonts" and "gsxtxt."

The vrm2rtfont command in AIX Operating System Commands Reference.







































Processed November 7, 1990       GSXTAT(3g,L)                                 5



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