


      WGRAF(3X)                  (Bull-SPS9)                  WGRAF(3X)



      NAME
           wgraf - graphics library for Bull-SPS9 Tek4014 windows

      SYNTAX
           #include <sys/graf.h>

           int DrawInit (windowForm)
           struct Form *windowForm;

           DrawLine (x0, y0, x1, y1)
           int x0, y0, x1, y1;

           WriteScreen ()

           ClearScreen ()

           ClearBitmap ()

           SetPenColor (newColor)
           int newColor;

           int GetPenColor ()

           SetPenWidth (width)
           int width;

           int GetPenWidth ()

      DESCRIPTION
           The wgraf library provides a simple interface for drawing
           lines in a window on the Bull-SPS9 Monochrome Display.  The
           calling process' control window must be in Tektronix 40148tm
9           mode; these functions generate the appropriate Tektronix
           4014 compatible graphics character sequences.  Some of the
           functions interface directly to the display management
           software and allow control over several graphical attributes
           of the window.

           The coordinate system used for specifying lines has 4096
           points in the X direction, and 3120 points in the Y
           direction, with the origin in the lower left corner.  This
           corresponds to the visible area on a Tektronix 4014 graphics
           terminal, which is then scaled to the actual size of the
           window measured in Bull-SPS9 display device coordinates.

           DrawInit must be called once before the other functions.  A
           new file descriptor is opened using the name /dev/tty, which
           is used by the other functions to interact with the window.
           The actual size of the window is returned in the structure
           pointed to by windowForm.  The width and height of the
           window are measured in Bull-SPS9 display device coordinates,
           and the bits field is set to 0.  A non-zero value returned



      Page 1                                         (73 A2 02MTA REV1)






      WGRAF(3X)                  (Bull-SPS9)                  WGRAF(3X)



           by DrawInit indicates an error, such as using a control
           terminal that is not a window on the Bull-SPS9 display.

           DrawLine is used to draw a line from the point specified as
           x0,y0 to the point specified as x1,y1.  The line is clipped
           to the Tektronix 4014 visible display area coordinate
           system, and the proper character sequence for graphics mode
           output is generated.  The output is buffered by DrawLine,
           and not actually written until either the buffer fills, or
           one of the other functions described below is called.

           WriteScreen flushes the graphics output buffer to the
           window, and causes the display management software to update
           the display screen.

           ClearScreen sends the ESC FF sequence, which causes the
           window to be cleared and the graphics cursor placed at the
           home position.

           ClearBitmap clears the bitmap for the window, but does not
           cause the screen image to be updated.  This allows a new
           image to be generated in the bitmap for the window while the
           previous image is still being displayed on the screen.

           SetPenColor sets the color to be used for line-drawing in
           the window according to newColor.  The color value
           determines whether black or white pixels are used to draw
           all lines for the window on the Bull-SPS9 monochrome
           display.  The values Black (the default) and White are
           defined in the include file, while any other value will
           cause subsequent lines to be drawn using pixels which are
           the complement of the current window background.  The color
           is a window attribute, and remains in effect until
           explicitly changed by this function.  GetPenColor returns
           the current line-drawing color, where the values may be
           Black, White, or -1 to indicate complementing.

           SetPenWidth sets the width in pixels of lines drawn in the
           window according to width.  The default value is one, but
           any value greater than zero may be specified, and will be
           used for all subsequent lines drawn in the window.  The line
           width is a window attribute, and remains in effect until
           explicitly changed by this function.  GetPenWidth returns
           the current line width.

      FILES
           /usr/lib/libwgraf.a

      SEE ALSO
           Bull-SPS9 Multi-Window Display Management Guide
           settek(1), graf(3X), windows(3X), disp(7), mouse(7)




      Page 2                                         (73 A2 02MTA REV1)






      WGRAF(3X)                  (Bull-SPS9)                  WGRAF(3X)























































      Page 3                                         (73 A2 02MTA REV1)






