PSint Doc/running_PSint file (07/03/90)
                        Fabien LELAQUAIS (1990)
                        lelaquaf@apo.esiee.fr
                        `Forgive my poor english'
------------------------------------------------------------------------

  PSint has been written so that it can be ported to almost any kind
of display device.
  To allow any implementation, I've left the device-dependant stuff
outside the main program. This is done in a separate specific file,
that should be linked with other modules.
  Have a look at the Makefile to get it right.

 This module must define 12 different routines (as shown in `rest.c'
file) :

 * All coordinates are in device coordinate system *
  
  > int
    init_device_stuff()
        Initializes your device drivers...
        Return non-zero on error.

  > void
    free_device_stuff()
        Free your device drivers resources.
  > void *
    ps__CreateWindow(int size_x, int size_y)
        CreateWindow creates and displays a new window, and returns a
     descriptor.

  > void
    ps__KillWindow(void *window)
        KillWindow erases and frees the window, as returned by CreateWindow

  > void *
    ps__CreateCache(int size_x, int size_y)
        CreateCache returns a descriptor for a one-plane bitmap, used in
      font cache.
        The returned pointer will become the `bitmap' field of a cache
      character associated structure. All graphics operation should now 
      be done in that bitmap, until CloseCache is called. A global
      variable, `currentcache' points to the current character cache
      structure, which can be used...

  > void
    ps__CloseCache()
        CloseCache is called when the rendering of a character supposed to
      be put in cache is done.
        It can be a empty routine.

  > void
    ps__KillCache(void *bitmap)
        KillWindow erases and frees the bitmap, as returned by CreateCache

  > void
    ps__DoCache(ps__cache *c, ps__coord where)
        DoCache will display the given character cache bitmap at given
      coordinates. All bits '1' in the bitmap must be printed in the
      current color.

  > void
    ps__Erase()
        Erase clears the current output device (window or bitmap if
      `currentcache' is not NULL).

  > void
    ps__DoTrapeze(int upper_left,
                  int lower_left,
                  int upper_right,
                  int lower_right,
                  int x_left,
                  int x_right)
        DoTrapeze renders a vertical trapezoid at given coordinates, with
      the current color.

  > void
    ps__DoLine(ps__coord p0, ps__coord p1)
        DoLine drawns a one-pixel wide line between those two points.

  > void
    ps__WritePixels(int x, int y, int length, unsigned char *buf)
        WritePixels transfers a buffer of one-byte pixels to the
      output device, given the x and y starting coordinates, and
      the whole buffer length.
        If `buf' is NULL, then it's a one-pixel wide vertical
      line that you have to draw, with the current color, from
      (x, y) up to (x, y+length).
        If both `buf' and `length' are NULL, then this is the
      end of an image transfer. This information may be useful,
      especially for plotting devices.

 -------------------------------------------------------------------------

  `rest.c' shows an exemple of NULL-doiing interface.
