fpc/packages/libgd
Tomas Hajny f2ed4e2843 * add missing description for libgd
git-svn-id: trunk@29226 -
2014-12-08 22:57:55 +00:00
..
examples * mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used. 2014-02-07 12:37:17 +00:00
src AROS: enable some basic set of Packages to build with AROS 2014-08-18 13:01:46 +00:00
fpmake.pp * add missing description for libgd 2014-12-08 22:57:55 +00:00
Makefile AROS: regenerated Makefiles to support i386-aros 2014-08-17 23:16:47 +00:00
Makefile.fpc * always use forward slashes in path to fpmake similarly to paths to other tools in Makefiles 2014-02-01 00:11:09 +00:00
Makefile.fpc.fpcmake * More packages switched to fpmake building 2012-01-03 14:29:12 +00:00
README.txt * added .txt extensions to all README, TODO and COPYING files 2009-02-28 17:34:08 +00:00

This is the interface unit for the gd library, version 1.8.4.
The gd library is a library to produce graphics files (jpeg,png and wbmp)
available from http://www.boutell.com/gd/.

The gd unit is a straight translation of the library headers.
It has some additional calls which make it more pascal like:

{overloaded pascal functions}
function fopen(a,b:string):pFile;
procedure gdImageChar(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; c:char; color:longint);
procedure gdImageCharUp(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; c:char; color:longint); 
procedure gdImageString(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; s:string;  color:longint); 
procedure gdImageStringUp(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; s:string; color:longint); 
procedure gdImageString16(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; s:string; color:longint); 
procedure gdImageStringUp16(im:gdImagePtr; f:gdFontPtr; x:longint; y:longint; s:string; color:longint); 
{$ifdef hasttf}
function  gdImageStringTTF(im:PgdImage; brect:Plongint; fg:longint; fontlist:string; ptsize:double; angle:double; x:longint; y:longint; astring:string): string;
function  gdImageStringFT(im:PgdImage; brect:Plongint; fg:longint; fontlist:string; ptsize:double; angle:double; x:longint; y:longint; astring:string):string;
{$endif}

These functions will work with both ansistrings and shortstrings; The unit
can be compiled in both the {$H+} as the {$H-} state.

The hasttf define should be defined for libraries which have TTF2 lib 
support compiled in.

The gdtest example is adapted from the example of the gd unit by Mike Bradbery.
It shows how to use the pascal-like functions in the gd unit instead of the
raw C like functions which use pchars.

usage:
 gdtest chart.png

the gdtestcgi example shows how to output an image to standard output,
this can be used for CGI scripts.

Michael.