Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gps(5) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat.h

stat

toc

gps

Purpose

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

Description

     A GPS is a graphic primitive string that 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 is com-
     posed  of as  many as  five  types of  graphical data  or
     primitives:

     comment    A comment 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.  Succes-
                sive  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 charac-
                ters 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.

                [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 coordi-
                nates having  values within a  Cartesian plane
                or  universe of  65,536  points  on each  axis
                (-32,767 to +32,768).

                sw is the style command word.  The first eight
                bits hold an integer  value for color informa-
                tion.  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 coordi-
                nates having  values within a  Cartesian plane
                or  universe of  65,536  points  on each  axis
                (-32,767 to +32,768).

                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:

                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 uni-
                verse of  65,536 points  per axis  (-32,767 to
                +32,768).

                fw is  a font  command word.  The  first eight
                bits contain an integer value for color infor-
                mation.   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 abso-
                lute  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 uni-
                verse of  65,536 points on each  axis (-32,767
                to +32,768).  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."

     The stat  and toc commands  in AIX Operating  System Com-
     mands Reference.

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