1. General Information

This is a patch for gimp version 1.0.4 that exposes the functionality
of the gradient editor to script-fu. Thus, one can write scripts that
create and modify gradients.

The modified functions all have the "gimp-gradients" prefix and you can
find information about them in GIMP's DB browser.

2. Copyrights

All the files in this patch except rainbow-strips.scm are distributed
under the GNU GPL (see the file COPYING for details).
rainbow-strips.scm is under the public domain. (I really hate the GPL,
but I have to use it for the rest of the patch, because it is based on
gimp's code.)



3. Installation

Unpack the patch with the following command:

# tar -xzvf gradient-fu.tar.gz

I'll assume it was installed under /usr/Download/gradient-fu/. If not
replace this directory with its real path when running the following
commands.

Cd to the gimp 1.0.4 directory. E.g:

# cd /usr/Download/gimp-1.0.4/

Apply the patch "gfu1.patch" by invoking the following command:

# patch < /usr/Download/gradient-fu/gfu1.patch

Copy the file gradient.c in the gradient-fu directory on top of GIMP's
gradient.c:

# cp /usr/Download/gradient-fu/gradient.c ./app/gradient.c

(There's also a patch for gradient.c here, but I recommend not to use
it, because I really changed a lot of the code.)

Now, recompile the Gimp.



4. Example script

rainbow-strips.scm is an example script that uses the routines in this
patch. After you compiled and installed the modified gimp, you can put
it in your ~/.gimp/scripts directory and run it from the
"Xtns -> Script-Fu -> Shlomif -> Rainbow Strips" menu item. 


Have fun!

	Shlomi Fish