Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gps(5) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat.h



GPS(5,F)                    AIX Technical Reference                    GPS(5,F)



-------------------------------------------------------------------------------
gps



PURPOSE

Used as the format for storing graphics file data as graphic primitive strings.

DESCRIPTION

A graphic primitive string (GPS) is used to store graphical data in a
particular format.  The plot and vtoc commands produce GPS output files.
Several commands edit and display GPS files on various devices.  A GPS file is
composed of as many as five types of graphical data or primitives:

comment   A comment primitive is an integer string included within a GPS file
          that does not cause anything to be displayed.  All GPS files begin
          with a comment of zero length.

lines     A lines primitive has a variable number of points from which zero or
          more connected line segments are produced.  The first point given
          produces a move to that location, relocating the graphics cursor
          without drawing.  Successive points produce line segments from the
          previous point.

arc       An arc primitive has a variable number of points to which a curve is
          fit.  The first point produces a move to that point.  If only two
          points are given, a line connecting the points is the result.  If
          three points are given, a circular arc through the points is drawn.
          If more than three points are given, splines are fitted to connect
          the points.

text      The text primitive draws characters beginning at a given point, with
          the first character centered on that point.

hardware  The hardware primitive draws hardware characters or gives control
          commands to a hardware device.  A single point locates the beginning
          location of the hardware string.

Graphic primitive strings are given as 16-bit units called command words.  The
first command word determines the primitive type and sets the length of the
string. Subsequent command words contain information in multiples of four bits
of data.  The following are the types of GPS and their parameters:

comment   cw [string]

          cw is the control word.  The first four bits identify the comment
          primitive and have the value 0xF.  The following bits give the
          command word count for the primitive.





Processed November 7, 1990         GPS(5,F)                                   1





GPS(5,F)                    AIX Technical Reference                    GPS(5,F)



          [string] is a string of characters terminated by a null character.
          If the string does not end on a command word boundary, another null
          character is added to align the string with the command word
          boundary.

lines     cw points sw

          cw is the control word.  The first four bits identify the lines
          primitive and have the value 0x0.  The remaining bits give the
          command word count for the primitive.

          points is one or more pairs of integer coordinates having values
          within a Cartesian plane or universe of 65,536 points on each axis
          (-32,768 to +32,767).

          sw is the style command word.  The first eight bits hold an integer
          value for color information.  The next four bits contain an integer
          value for weight to indicate line thickness:

          0   Narrow
          1   Bold
          2   Medium.

          The last four bits of sw specify an integer value giving line style
          information:

          0   Solid
          1   Dotted
          2   Dot-dashed
          3   Dashed
          4   Long dashed.

arc       cw points sw

          cw is the control word.  The first four bits identify the arc
          primitive and have the value 0x3.  The next twelve bits contain the
          command word count for the primitive.

          points is one or more pairs of integer coordinates having values
          within a Cartesian plane or universe of 65,536 points on each axis
          (-32,768 to +32,767).

          sw is the style command word.  The first eight bits are an integer
          value for color.  The next four bits contain an integer value for
          weight to indicate line thickness:

          0   Narrow
          1   Bold
          2   Medium.

          The last four bits contain an integer value setting line style:




Processed November 7, 1990         GPS(5,F)                                   2





GPS(5,F)                    AIX Technical Reference                    GPS(5,F)



          0   Solid
          1   Dotted
          2   Dot-dashed
          3   Dashed
          4   Long dashed.

text      cw point fw so [string]

          cw is the control word.  The first four bits identify the text
          primitive and have the value 0x2.  The remaining twelve bits contain
          the command word count for the primitive.

          point is a pair of integer coordinates that are a value within a
          Cartesian plane or universe of 65,536 points per axis (-32,768 to
          +32,767).

          fw is a font command word.  The first eight bits contain an integer
          value for color information.  The next eight bits contain an integer
          value for font information, with four bits giving the weight
          (density) value for the font, and four bits giving the style
          (typeface) value for the font.

          so is a size/orientation command word.  Eight bits specify textsize
          as an integer value to indicate the size of characters drawn.
          textsize represents character height in absolute universe units.  The
          actual character height is five times the textsize value.  The next
          eight bits are a signed integer value for textangle, and express the
          angle and direction of rotation of the character string around the
          beginning point.  textangle is expressed in degrees from the positive
          x axis.  The textangle value is 256/360 of its absolute value.

hardware  cw point [string]

          cw is the control word.  The first four bits identify the hardware
          primitive and have the value 0x4.  The next twelve bits indicate the
          command word count for the primitive.

          point is a pair of integer coordinates that are values within a
          Cartesian plane or universe of 65,536 points on each axis (-32,768 to
          +32,767).  This point is the starting point for the string, which is
          a string of hardware characters or control commands to a hardware
          device.

RELATED INFORMATION

In this book:  "stat.h."









Processed November 7, 1990         GPS(5,F)                                   3



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