
 File: README
 Authors: S. Mann,
          K.R. Sloan
 Last Modified: 6 April 1990
 Purpose: lead you by the hand...

*
* For questions, bug reports/fixes, etc.  please contact:
*
*              Kenneth Sloan <sloan@uab.cis.edu>
*

Please read ../wff.tex for an overview of the .wff package!

DisplayWFF.c and Display2.c are sample programs.  With just a little
modification, they can serve as the basis for you first program to display
.wff images on your local display devices.

How to Modify DisplayWFF.c/Display2.c to Output to Your Graphics Device.

In the files DisplayWFF.c and Display2.c, there are several places 
marked with the comments "CHANGE FROM HERE" ... "TO HERE".
All lines in between will start with /* # */, where # is a 
number from 1-7.  The number corresponds to the number below.

Currently, the program will print the WWF file on the screen in hex.

The following changes must be made to make it write to a frame buffer:

1. Includes
	Include any files you need to use your graphics device.

2. Data Structure
	You will need to change the structure 'DSL' to be of the
	format your graphics device expects.

3. Conversion
	WFF files support various pixel formats.  Four of them
        are illustrated in these programs.   
	The first format is RGB.  This is likely to be the format
        you will need most often.
	Modify this code so that the 'x'th element
	of the array contains the color information your monitor
	expects.

4. Display
	This is where a line is actually displayed on the monitor.
	Modify this code so that it makes the calls needed to
	write to your monitor.

5. This flag determines whether or not the header of the wff file
	is to be printed.  If you don't want it printed, change
	it to be 0.  If you do want it printed, leave it set to 1.
        For extra credit, make it a run-time switch...

6. Initialize
	Make the calls to initialize your graphics device here.

7. Close
	Make the calls to close your graphics device here.

Now you can display .wff RGB images.  While you enjoy the pretty
pictures, go back and re-read ../wff.tex.  come back later and make
Display faster, more elegant, add features ...


