From: Alberto Riva
Subject: ANNOUNCE: gif drawing functions in Lisp
Date: 
Message-ID: <ALB.95Jun12155843@ipvaim.unipv.it>
Announcing:

###### Gd-Lisp version 1.0 ######

### What is Gd-Lisp

Gd-lisp is a Lucid Common Lisp interface to the 'gd' graphics library
(written by Thomas Boutell, ·······@netcom.com). The gd 1.1.1 package
provides a set of functions to draw points, lines, polygons, strings
and other graphical objects, and to save the resulting image as a GIF
file. Quoting from the original README file, "it was created to allow
graphs, charts and the like to be generated on the fly for use on the
World Wide Web, but is useful for any application in which custom
.GIFs are useful."

Gd-lisp offers the same functionalities as a set of Lisp functions and
variables. In general, there is a one-to-one correspondence between C
and Lisp functions, with the few exceptions listed below. The names of
the Lisp functions were edited according to standard Lisp usage (eg.,
gdImageGif -> gd-Image-Gif). 

### How it was written

Most of the translation work was done by Lucid Lisp itself, using the
TRANSLATE-C-FILE function. Only very few adjustments were necessary:

o The MAKE-POINT-ARRAY function was added to create the array of
  gd-Points needed by GD-IMAGE-POLYGON and GD-IMAGE-FILLED-POLYGON
  (see demo program for details).

o The MAKE-STYLE-ARRAY function was added to create the array of
  integers needed by GD-IMAGE-SET-STYLE (see demo program for
  details).

o The functions GD-IMAGE-GIF, GD-IMAGE-GD, GD-IMAGE-CREATE-FROM-GIF,
  GD-IMAGE-CREATE-FROM-GD, and GD-IMAGE-CREATE-FROM-XBM were changed
  to take filenames instead of FILE pointers as their first argument.

o The function GD-IMAGE-FD was added to write a GIF image over a
  stream connected to a file descriptor.

o The string drawing functions GD-IMAGE-CHAR, GD-IMAGE-CHAR-UP,
  GD-IMAGE-CHAR, GD-IMAGE-CHAR-UP, should take one of the two global
  variables *GD-FONT-LARGE* and *GD-FONT-SMALL*, that point to the
  respective C font structs.

### Getting Gd-Lisp

Gd-Lisp 1.0 is available by anonymous ftp from ipvaim.unipv.it
(193.204.34.6) as ftp://ipvaim.unipv.it/pub/code/gd-lisp.tgz

The package contains:

gd.lisp			- Lisp source file
gd.o			- .o file loaded by gd.lisp
gdfonts.o		- .o file loaded by gd.lisp
gdfontl.o		- .o file loaded by gd.lisp
writegif.o		- .o file loaded by gd.lisp
writegif.c              - source file for writegif.o
gd-manual.txt		- index of functions with argument list and documentation
gddemo.lisp		- Lisp version of the demo program gddemo.c
demoin.gif		- GIF image used by the demo program.

To use gd, simply follow the instructions that appear at the top of
the gd.lisp source file. Loading the file gd.lisp will in turn load
the four .o files (that must be in the same directory). (use-package
:gd) will make accessible all the functions and variables described in
gd-manual.txt.

The .o files were produced on a Sun SparcStation using the gcc
compiler. I have not included the sources for the three .o files that
are part of the original gd package; if you need to recompile them for
a different platform, you can find them at the address given below.

### Documentation

In addition to gd-manual.txt, you can find info on gd at

  http://ipvaimed9.unipv.it/misc/gd.html

If you are interested in the C version of gd,

  http://siva.cshl.org/gd/gd.html

provides much more detailed information, that for the most part is
applicable also to the lisp version.

### Credits

Gd-lisp was written by Alberto Riva; gd was written by Thomas Boutell.
Please report bugs on the Lisp side to Alberto Riva (···@ipvaim.unipv.it), 
and bugs on the C side to Thomas Boutell (·······@netcom.com).

Gd 1.1.1 is copyright 1994, Quest Protein Database Center, Cold Spring
Harbor Labs.  The Quest Protein Database Center is, Quest Protein Database Center, Cold Spring
Harbor Labs.  The Quest Protein Database Center is funded under Grant
P41-RR02188 by the National Institutes of Health.



				   Alberto Riva

				   ···@ipvaim.unipv.it
				   Department of Computer and Systems Science
				   University of Pavia, Italy

				   http://ipvaimed9.unipv.it/