Back to index

tetex-bin  3.0
Classes | Defines | Typedefs | Enumerations | Functions | Variables
gd.h File Reference
#include <stdio.h>
#include "gd_io.h"
#include "gdfx.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gdImageStruct
struct  gdFont
struct  gdSource
struct  gdFTStringExtra
struct  gdPoint
struct  gdSink

Defines

#define GD_H   1
#define NONDLL   1
#define BGD_DECLARE(rt)   extern rt
#define BGD_EXPORT_DATA_PROT   extern
#define BGD_EXPORT_DATA_IMPL
#define DEFAULT_FONTPATH   "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1"
#define PATHSEPARATOR   ":"
#define gdMaxColors   256
#define gdAlphaMax   127
#define gdAlphaOpaque   0
#define gdAlphaTransparent   127
#define gdRedMax   255
#define gdGreenMax   255
#define gdBlueMax   255
#define gdTrueColorGetAlpha(c)   (((c) & 0x7F000000) >> 24)
#define gdTrueColorGetRed(c)   (((c) & 0xFF0000) >> 16)
#define gdTrueColorGetGreen(c)   (((c) & 0x00FF00) >> 8)
#define gdTrueColorGetBlue(c)   ((c) & 0x0000FF)
#define gdDashSize   4
#define gdStyled   (-2)
#define gdBrushed   (-3)
#define gdStyledBrushed   (-4)
#define gdTiled   (-5)
#define gdTransparent   (-6)
#define gdAntiAliased   (-7)
#define gdImageCreatePalette   gdImageCreate
#define gdFTEX_LINESPACE   1
#define gdFTEX_CHARMAP   2
#define gdFTEX_RESOLUTION   4
#define gdFTEX_DISABLE_KERNING   8
#define gdFTEX_XSHOW   16
#define gdFTEX_FONTPATHNAME   32
#define gdFTEX_FONTCONFIG   64
#define gdFTEX_RETURNFONTPATHNAME   128
#define gdFTEX_Unicode   0
#define gdFTEX_Shift_JIS   1
#define gdFTEX_Big5   2
#define gdTrueColor(r, g, b)
#define gdTrueColorAlpha(r, g, b, a)
#define gdArc   0
#define gdPie   gdArc
#define gdChord   1
#define gdNoFill   2
#define gdEdged   4
#define gdImageTrueColor(im)   ((im)->trueColor)
#define gdImageSX(im)   ((im)->sx)
#define gdImageSY(im)   ((im)->sy)
#define gdImageColorsTotal(im)   ((im)->colorsTotal)
#define gdImageRed(im, c)
#define gdImageGreen(im, c)
#define gdImageBlue(im, c)
#define gdImageAlpha(im, c)
#define gdImageGetTransparent(im)   ((im)->transparent)
#define gdImageGetInterlaced(im)   ((im)->interlace)
#define gdImagePalettePixel(im, x, y)   (im)->pixels[(y)][(x)]
#define gdImageTrueColorPixel(im, x, y)   (im)->tpixels[(y)][(x)]
#define GD2_CHUNKSIZE   128
#define GD2_CHUNKSIZE_MIN   64
#define GD2_CHUNKSIZE_MAX   4096
#define GD2_VERS   2
#define GD2_ID   "gd2"
#define GD2_FMT_RAW   1
#define GD2_FMT_COMPRESSED   2
#define GD_CMP_IMAGE   1 /* Actual image IS different */
#define GD_CMP_NUM_COLORS   2 /* Number of Colours in pallette differ */
#define GD_CMP_COLOR   4 /* Image colours differ */
#define GD_CMP_SIZE_X   8 /* Image width differs */
#define GD_CMP_SIZE_Y   16 /* Image heights differ */
#define GD_CMP_TRANSPARENT   32 /* Transparent colour */
#define GD_CMP_BACKGROUND   64 /* Background colour */
#define GD_CMP_INTERLACE   128 /* Interlaced setting */
#define GD_CMP_TRUECOLOR   256 /* Truecolor vs palette differs */
#define GD_RESOLUTION   96 /* pixels per inch */

Typedefs

typedef struct gdImageStruct gdImage
typedef gdImagegdImagePtr
typedef gdFontgdFontPtr
typedef struct gdSourcegdSourcePtr
typedef struct gdFTStringExtragdFTStringExtraPtr
typedef struct gdPointgdPointPtr
typedef struct gdSinkgdSinkPtr

Enumerations

enum  { gdDisposalUnknown, gdDisposalNone, gdDisposalRestoreBackground, gdDisposalRestorePrevious }

Functions

 BGD_DECLARE (int) gdAlphaBlend(int dest
 BGD_DECLARE (gdImagePtr) gdImageCreate(int sx
 BGD_DECLARE (void) gdImageDestroy(gdImagePtr im)
 BGD_DECLARE (char *) gdImageStringTTF(gdImage *im
 BGD_DECLARE (void *) gdImageWBMPPtr(gdImagePtr im
 BGD_DECLARE (gdIOCtx *) gdNewFileCtx(FILE *)

Variables

int src
int sy
voiddata
int srcx
int int srcy
int int int w
int int int int h
int x
int int y
int int int color
int x1
int int y1
int int int x2
int int int int y2
intx1P
int inty1P
int int intx2P
int int int inty2P
gdFontPtr f
gdFontPtr int int int c
gdFontPtr int int unsigned char * s
intbrect
int int fg
int int char * fontlist
int int char double ptsize
int int char double double angle
int int char double double int
int char * 
string
int int char double double int
int char gdFTStringExtraPtr 
strex
gdPointPtr p
gdPointPtr int n
int r
int int g
int int int b
int int int int a
int ditherFlag
int int colorsWanted
FILEout
FILE int level
intsize
FILE int quality
FILEoutFile
FILE int GlobalCM
FILE int int Loops
FILE int LocalCM
FILE int int LeftOfs
FILE int int int TopOfs
FILE int int int int Delay
FILE int int int int int Disposal
FILE int int int int int gdImagePtr previm
FILE int cs
FILE int int fmt
int cx
int int cy
int int int int int int e
int int int int int int int int style
int int int border
gdImagePtr int dstX
gdImagePtr int int dstY
gdImagePtr int int int srcX
gdImagePtr int int int int srcY
gdImagePtr int int int int int
int int 
pct
gdImagePtr int int int int int dstW
gdImagePtr int int int int int int dstH
gdImagePtr int int int int int
int int 
srcW
gdImagePtr int int int int int
int int int 
srcH
gdImagePtr double double int
int int 
srcWidth
gdImagePtr double double int
int int int 
srcHeight
gdImagePtr brush
gdImagePtr tile
int int dont_blend
int int noOfPixels
int thickness
int interlaceArg
int alphaBlendingArg
int saveAlphaArg
void int freeFlag
gdImagePtr im2

Class Documentation

struct gdImageStruct

Definition at line 128 of file gd.h.

Collaboration diagram for gdImageStruct:
Class Members
int AA
int AA_color
int AA_dont_blend
int alpha
int alphaBlendingFlag
int blue
struct gdImageStruct * brush
int brushColorMap
int colorsTotal
int cx1
int cx2
int cy1
int cy2
int green
int interlace
int open
unsigned char ** pixels
int polyAllocated
int * polyInts
int red
int saveAlphaFlag
int * style
int styleLength
int stylePos
int sx
int sy
int thick
struct gdImageStruct * tile
int tileColorMap
int ** tpixels
int transparent
int trueColor
struct gdFont

Definition at line 211 of file gd.h.

Class Members
char * data
int h
int nchars
int offset
int w
struct gdFTStringExtra

Definition at line 388 of file gd.h.

Class Members
int charmap
int flags
char * fontpath
int hdpi
double linespacing
int vdpi
char * xshow
struct gdPoint

Definition at line 455 of file gd.h.

Class Members
int x
int y

Define Documentation

#define BGD_DECLARE (   rt)    extern rt

Definition at line 27 of file gd.h.

Definition at line 41 of file gd.h.

#define BGD_EXPORT_DATA_PROT   extern

Definition at line 40 of file gd.h.

#define DEFAULT_FONTPATH   "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type1"

Definition at line 62 of file gd.h.

#define GD2_CHUNKSIZE   128

Definition at line 758 of file gd.h.

#define GD2_CHUNKSIZE_MAX   4096

Definition at line 760 of file gd.h.

#define GD2_CHUNKSIZE_MIN   64

Definition at line 759 of file gd.h.

#define GD2_FMT_COMPRESSED   2

Definition at line 766 of file gd.h.

#define GD2_FMT_RAW   1

Definition at line 765 of file gd.h.

#define GD2_ID   "gd2"

Definition at line 763 of file gd.h.

#define GD2_VERS   2

Definition at line 762 of file gd.h.

#define GD_CMP_BACKGROUND   64 /* Background colour */

Definition at line 777 of file gd.h.

#define GD_CMP_COLOR   4 /* Image colours differ */

Definition at line 773 of file gd.h.

#define GD_CMP_IMAGE   1 /* Actual image IS different */

Definition at line 771 of file gd.h.

#define GD_CMP_INTERLACE   128 /* Interlaced setting */

Definition at line 778 of file gd.h.

#define GD_CMP_NUM_COLORS   2 /* Number of Colours in pallette differ */

Definition at line 772 of file gd.h.

#define GD_CMP_SIZE_X   8 /* Image width differs */

Definition at line 774 of file gd.h.

#define GD_CMP_SIZE_Y   16 /* Image heights differ */

Definition at line 775 of file gd.h.

#define GD_CMP_TRANSPARENT   32 /* Transparent colour */

Definition at line 776 of file gd.h.

#define GD_CMP_TRUECOLOR   256 /* Truecolor vs palette differs */

Definition at line 779 of file gd.h.

#define GD_H   1

Definition at line 6 of file gd.h.

#define GD_RESOLUTION   96 /* pixels per inch */

Definition at line 782 of file gd.h.

#define gdAlphaMax   127

Definition at line 110 of file gd.h.

#define gdAlphaOpaque   0

Definition at line 111 of file gd.h.

#define gdAlphaTransparent   127

Definition at line 112 of file gd.h.

#define gdAntiAliased   (-7)

Definition at line 246 of file gd.h.

#define gdArc   0

Definition at line 638 of file gd.h.

#define gdBlueMax   255

Definition at line 115 of file gd.h.

#define gdBrushed   (-3)

Definition at line 238 of file gd.h.

#define gdChord   1

Definition at line 640 of file gd.h.

#define gdDashSize   4

Definition at line 233 of file gd.h.

#define gdEdged   4

Definition at line 642 of file gd.h.

#define gdFTEX_Big5   2

Definition at line 448 of file gd.h.

#define gdFTEX_CHARMAP   2

Definition at line 420 of file gd.h.

#define gdFTEX_DISABLE_KERNING   8

Definition at line 422 of file gd.h.

#define gdFTEX_FONTCONFIG   64

Definition at line 431 of file gd.h.

#define gdFTEX_FONTPATHNAME   32

Definition at line 427 of file gd.h.

#define gdFTEX_LINESPACE   1

Definition at line 419 of file gd.h.

#define gdFTEX_RESOLUTION   4

Definition at line 421 of file gd.h.

#define gdFTEX_RETURNFONTPATHNAME   128

Definition at line 436 of file gd.h.

#define gdFTEX_Shift_JIS   1

Definition at line 447 of file gd.h.

#define gdFTEX_Unicode   0

Definition at line 446 of file gd.h.

#define gdFTEX_XSHOW   16

Definition at line 423 of file gd.h.

#define gdGreenMax   255

Definition at line 114 of file gd.h.

#define gdImageAlpha (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetAlpha(c) : \
       (im)->alpha[(c)])

Definition at line 723 of file gd.h.

#define gdImageBlue (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetBlue(c) : \
       (im)->blue[(c)])

Definition at line 721 of file gd.h.

#define gdImageColorsTotal (   im)    ((im)->colorsTotal)

Definition at line 716 of file gd.h.

#define gdImageCreatePalette   gdImageCreate

Definition at line 254 of file gd.h.

#define gdImageGetInterlaced (   im)    ((im)->interlace)

Definition at line 726 of file gd.h.

#define gdImageGetTransparent (   im)    ((im)->transparent)

Definition at line 725 of file gd.h.

#define gdImageGreen (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetGreen(c) : \
       (im)->green[(c)])

Definition at line 719 of file gd.h.

#define gdImagePalettePixel (   im,
  x,
  y 
)    (im)->pixels[(y)][(x)]

Definition at line 733 of file gd.h.

#define gdImageRed (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetRed(c) : \
       (im)->red[(c)])

Definition at line 717 of file gd.h.

#define gdImageSX (   im)    ((im)->sx)

Definition at line 714 of file gd.h.

#define gdImageSY (   im)    ((im)->sy)

Definition at line 715 of file gd.h.

#define gdImageTrueColor (   im)    ((im)->trueColor)

Definition at line 712 of file gd.h.

#define gdImageTrueColorPixel (   im,
  x,
  y 
)    (im)->tpixels[(y)][(x)]

Definition at line 734 of file gd.h.

#define gdMaxColors   256

Definition at line 87 of file gd.h.

#define gdNoFill   2

Definition at line 641 of file gd.h.

#define gdPie   gdArc

Definition at line 639 of file gd.h.

#define gdRedMax   255

Definition at line 113 of file gd.h.

#define gdStyled   (-2)

Definition at line 237 of file gd.h.

#define gdStyledBrushed   (-4)

Definition at line 239 of file gd.h.

#define gdTiled   (-5)

Definition at line 240 of file gd.h.

#define gdTransparent   (-6)

Definition at line 244 of file gd.h.

#define gdTrueColor (   r,
  g,
  b 
)
Value:
(((r) << 16) + \
       ((g) << 8) + \
       (b))

Definition at line 491 of file gd.h.

#define gdTrueColorAlpha (   r,
  g,
  b,
  a 
)
Value:
(((a) << 24) + \
       ((r) << 16) + \
       ((g) << 8) + \
       (b))

Definition at line 499 of file gd.h.

#define gdTrueColorGetAlpha (   c)    (((c) & 0x7F000000) >> 24)

Definition at line 116 of file gd.h.

#define gdTrueColorGetBlue (   c)    ((c) & 0x0000FF)

Definition at line 119 of file gd.h.

#define gdTrueColorGetGreen (   c)    (((c) & 0x00FF00) >> 8)

Definition at line 118 of file gd.h.

#define gdTrueColorGetRed (   c)    (((c) & 0xFF0000) >> 16)

Definition at line 117 of file gd.h.

#define NONDLL   1

Definition at line 23 of file gd.h.

#define PATHSEPARATOR   ":"

Definition at line 65 of file gd.h.


Typedef Documentation

typedef gdFont* gdFontPtr

Definition at line 228 of file gd.h.

typedef struct gdImageStruct gdImage
typedef gdImage* gdImagePtr

Definition at line 209 of file gd.h.

typedef struct gdPoint * gdPointPtr
typedef struct gdSink * gdSinkPtr
typedef struct gdSource * gdSourcePtr

Enumeration Type Documentation

anonymous enum
Enumerator:
gdDisposalUnknown 
gdDisposalNone 
gdDisposalRestoreBackground 
gdDisposalRestorePrevious 

Definition at line 577 of file gd.h.


Function Documentation

BGD_DECLARE ( char *  )

Definition at line 83 of file gdft.c.

{
  return "libgd was not built with FreeType font support\n";
}
BGD_DECLARE ( void )

Definition at line 145 of file gd_gif_out.c.

{
  void *rv;
  gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
  gdImageGifAnimBeginCtx(im, out, GlobalCM, Loops);
  rv = gdDPExtractData (out, size);
  out->gd_free (out);
  return rv;

Definition at line 78 of file gd_io_dp.c.

{
  dpIOCtx *ctx;
  dynamicPtr *dp;

  ctx = (dpIOCtx *) gdMalloc (sizeof (dpIOCtx));
  if (ctx == NULL)
    {
      return NULL;
    }

  dp = newDynamic (initialSize, data, freeOKFlag);
  if (!dp)
    {
      gdFree (ctx);
      return NULL;
    };

  ctx->dp = dp;

  ctx->ctx.getC = dynamicGetchar;
  ctx->ctx.putC = dynamicPutchar;

  ctx->ctx.getBuf = dynamicGetbuf;
  ctx->ctx.putBuf = dynamicPutbuf;

  ctx->ctx.seek = dynamicSeek;
  ctx->ctx.tell = dynamicTell;

  ctx->ctx.gd_free = gdFreeDynamicCtx;

  return (gdIOCtx *) ctx;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 469 of file gd.h.

Definition at line 704 of file gd.h.

gdImagePtr double double int int int int int angle

Definition at line 376 of file gd.h.

Definition at line 467 of file gd.h.

Definition at line 650 of file gd.h.

Definition at line 376 of file gd.h.

Definition at line 694 of file gd.h.

int c

Definition at line 347 of file gd.h.

Definition at line 323 of file gd.h.

Definition at line 526 of file gd.h.

Definition at line 609 of file gd.h.

Definition at line 624 of file gd.h.

Definition at line 624 of file gd.h.

Definition at line 266 of file gd.h.

Definition at line 585 of file gd.h.

Definition at line 585 of file gd.h.

Definition at line 526 of file gd.h.

Definition at line 697 of file gd.h.

Definition at line 664 of file gd.h.

Definition at line 664 of file gd.h.

gdImagePtr double dstX

Definition at line 653 of file gd.h.

gdImagePtr double double dstY

Definition at line 653 of file gd.h.

Definition at line 644 of file gd.h.

Definition at line 347 of file gd.h.

Definition at line 376 of file gd.h.

Definition at line 609 of file gd.h.

int int char * fontlist

Definition at line 376 of file gd.h.

Definition at line 754 of file gd.h.

Definition at line 467 of file gd.h.

Definition at line 584 of file gd.h.

Definition at line 302 of file gd.h.

Definition at line 769 of file gd.h.

Definition at line 703 of file gd.h.

Definition at line 585 of file gd.h.

Definition at line 553 of file gd.h.

Definition at line 585 of file gd.h.

Definition at line 584 of file gd.h.

Definition at line 461 of file gd.h.

Definition at line 698 of file gd.h.

Definition at line 544 of file gd.h.

Definition at line 584 of file gd.h.

Definition at line 461 of file gd.h.

Definition at line 655 of file gd.h.

Definition at line 585 of file gd.h.

int int char double ptsize

Definition at line 376 of file gd.h.

Definition at line 568 of file gd.h.

int r

Definition at line 467 of file gd.h.

Definition at line 351 of file gd.h.

Definition at line 705 of file gd.h.

Definition at line 564 of file gd.h.

Definition at line 126 of file gd.h.

Definition at line 664 of file gd.h.

gdImagePtr double double int int int int srcHeight

Definition at line 689 of file gd.h.

Definition at line 664 of file gd.h.

gdImagePtr double double int int int srcWidth

Definition at line 689 of file gd.h.

Definition at line 302 of file gd.h.

gdImagePtr double double int srcX

Definition at line 653 of file gd.h.

Definition at line 302 of file gd.h.

gdImagePtr double double int int srcY

Definition at line 653 of file gd.h.

int int char double double int int char gdFTStringExtraPtr strex

Definition at line 450 of file gd.h.

int int char double double int int char* string

Definition at line 376 of file gd.h.

Definition at line 644 of file gd.h.

Definition at line 251 of file gd.h.

Definition at line 701 of file gd.h.

Definition at line 695 of file gd.h.

Definition at line 585 of file gd.h.

Definition at line 302 of file gd.h.

int x

Definition at line 323 of file gd.h.

Definition at line 331 of file gd.h.

int* x1P

Definition at line 345 of file gd.h.

Definition at line 331 of file gd.h.

Definition at line 345 of file gd.h.

Definition at line 323 of file gd.h.

Definition at line 331 of file gd.h.

Definition at line 345 of file gd.h.

Definition at line 331 of file gd.h.

Definition at line 345 of file gd.h.