Feature-complete Tcl interface to GD graphics drawing library
M4 C Makefile Shell Tcl
Switch branches/tags
Nothing to show
Clone or download
resuna Merge pull request #3 from flightaware/pkg-config
Provide a gdlib-config wrapper around pkg-config if gdlib-config doesn't exist but pkg-config can be found.
Latest commit 355f1df Jul 16, 2018
Failed to load latest commit information.
doc * Add new rewrite_color method to GD objects that will rewrite one Apr 1, 2013
generic Add a "delete" method to the created GD objects. The result is the sa… Apr 2, 2013
mapserver-patches * generic/tclgdio.c: Use Tcl's ckalloc and ckfree instead of GD's Dec 18, 2005
playpen Add a little demo to draw a grid and fill in the grid box at 0,0. Apr 5, 2013
tclconfig Upgrade to Tcl Extension Architecture (TEA) 3.9. Sep 15, 2010
tests Update a couple of tests and add nine new ones. Nov 17, 2010
win Import of Karl's new BSD-licensed obj-command-style nearly feature-co… Oct 30, 2005
.gitignore Update docs to show version 1.1. Regenerate tclgd.pdf. Generate Jan 19, 2011
ChangeLog Update ChangeLog Jun 21, 2016
LICENSE Add a "delete" method to the created GD objects. The result is the sa… Apr 2, 2013
Makefile.in Remove autom4te.cache upon make distclean. May 1, 2009
README Update README Jun 21, 2016
README.Debian Remove tcl version dependency for debian based systems. Jun 28, 2018
README.FreeBSD stick 'autoreconf' in there Apr 23, 2018
README.MacOSX Spruce up README files. In particular, get the version right in README. Jan 19, 2011
aclocal.m4 Import of Karl's new BSD-licensed obj-command-style nearly feature-co… Oct 30, 2005
configure.in Use local gdlib-config if not found. Fix gdlib-includes to work prope… Jun 28, 2018
gdlib-config Use local gdlib-config if not found. Fix gdlib-includes to work prope… Jun 28, 2018
license.terms Update license to FA. Feb 15, 2011
pkgIndex.tcl.in Start at the docs. Fix pkgIndex.tcl.in to have the right package name… Nov 9, 2005


This is tcl.gd, a new Tcl interface to GD that is significantly more feature-
complete with gd 2 than Gdtclft.

Version 1.2

This package is a freely available open source package under the "Berkeley"
license, same as Tcl.  You can do virtually anything you like with it, such as 
modifying it, redistributing it, and selling it either in whole or in part.  
See the file "license.terms" for complete information.

Gdtcl was written by Karl Lehenbauer.


package require tclgd


Please see the tclgd manpage in the doc directory.


A number of simple examples of the use of tcl.gd can be found in the playpen




You can attach an existing gd handle to a tcl.gd image manipulation command
using tclgd_newGDObjectAttach.  This provides a way to grab a GD image created
by some library that you've linked your application with and manipulate it
from Tcl using tcl.gd.  Please see the tclgd_newGDObjectAttach manpage
for details.


Included with tcl.gd is a patch to Mapserver's mapscript Tcl extension to
use the aforementioned capability for integrating tcl.gd with C 
aplications that use gd to provide a tcl.gd capability for mapscript.

Consult the README file in the mapserver-patches subdirectory for details
on how to install the mapserver patch to add this capability to mapserver.


Makefile.in	Makefile template.  The configure script uses this file to
		produce the final Makefile.

README		This file

aclocal.m4	Generated file.  Do not edit.  Autoconf uses this as input
		when generating the final configure script.  See "tcl.m4"

configure	Generated file.  Do not edit.  This must be regenerated
		anytime configure.in or tclconfig/tcl.m4 changes.

configure.in	Configure script template.  Autoconf uses this file as input
		to produce the final configure script.

generic/tclgd.c		Interface between Tcl and GD
generic/tclgd.h		include file
generic/tclgdio.c	Channel interface to allow GD-oriented I/O to Tcl
generic/tclgdtcl.c	Init routines.

tclconfig/	This directory contains various template files that build
		the configure script.  They should not need modification.

	install-sh	Program used for copying binaries and script files
			to their install locations.

	tcl.m4		Collection of Tcl autoconf macros.  Included by
			aclocal.m4 to define SC_* macros.


Building under most UNIX systems is easy, just run the configure script
and then run make. 

	$ cd tcl.gd
	$ ./configure
	$ make
	$ make install


tcl.gd has not been built under Windows at this time.

The recommended method to build extensions under Windows is to use the
Msys + Mingw build process. This provides a Unix-style build while
generating native Windows binaries. Using the Msys + Mingw build tools
means that you can use the same configure script as per the Unix build
to create a Makefile.

If you have VC++, then you may wish to use the files in the win
subdirectory and build the extension using just VC++. 

Instructions for using the VC++ makefile are written in the first part of 
the Makefile.vc file.


The tweezers install like so:

          /       \
        lib       bin
         |         |
   PACKAGEx.y   (dependent .dll files on Windows)
  pkgIndex.tcl (.so|.dll files)

The main .so|.dll library file gets installed in the versioned PACKAGE
directory, which is OK on all platforms because it will be directly
referenced with by 'load' in the pkgIndex.tcl file.  Dependent DLL files on
Windows must go in the bin directory (or other directory on the user's
PATH) in order for them to be found.