Anonymous avatar Anonymous committed 2b63833

- sync to 2.0.24

Comments (0)

Files changed (4)

 AC_PREREQ(2.54)
 
 #HEY! Change BOTH the vesion number and the GDLIB_REVISION setting!
-AC_INIT([GD], [2.0.23], [gd@boutell.com])
+AC_INIT([GD], [2.0.24], [gd@boutell.com])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=23
+GDLIB_REVISION=24
 GDLIBNAME=gd
 
 AC_SUBST(GDLIB_MAJOR)

src/fontsizetest.c

-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 static void gdImageAntiAliasedApply (gdImagePtr im, int x, int y);
 int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
 
-gdImagePtr
-gdImageCreate (int sx, int sy)
+BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
 {
   int i;
   gdImagePtr im;
   return im;
 }
 
-gdImagePtr
-gdImageCreateTrueColor (int sx, int sy)
+BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy)
 {
   int i;
   gdImagePtr im;
   return im;
 }
 
-void
-gdImageDestroy (gdImagePtr im)
+BGD_DECLARE(void) gdImageDestroy (gdImagePtr im)
 {
   int i;
   if (im->pixels)
   gdFree (im);
 }
 
-int
-gdImageColorClosest (gdImagePtr im, int r, int g, int b)
+BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b)
 {
   return gdImageColorClosestAlpha (im, r, g, b, gdAlphaOpaque);
 }
 
-int
-gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
+BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
 {
   int i;
   long rd, gd, bd, ad;
 }
 #endif
 
-int
-gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
+BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
 {
   int i;
   /* long rd, gd, bd; */
   return ct;
 }
 
-int
-gdImageColorExact (gdImagePtr im, int r, int g, int b)
+BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b)
 {
   return gdImageColorExactAlpha (im, r, g, b, gdAlphaOpaque);
 }
 
-int
-gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
+BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
 {
   int i;
   if (im->trueColor)
   return -1;
 }
 
-int
-gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
+BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
 {
   return gdImageColorAllocateAlpha (im, r, g, b, gdAlphaOpaque);
 }
 
-int
-gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a)
+BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a)
 {
   int i;
   int ct = (-1);
  * return a color index in one search over the color table.
  */
 
-int
-gdImageColorResolve (gdImagePtr im, int r, int g, int b)
+BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b)
 {
   return gdImageColorResolveAlpha (im, r, g, b, gdAlphaOpaque);
 }
 
-int
-gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
+BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
 {
   int c;
   int ct = -1;
   return op;			/* Return newly allocated color */
 }
 
-void
-gdImageColorDeallocate (gdImagePtr im, int color)
+BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color)
 {
   if (im->trueColor)
     {
   im->open[color] = 1;
 }
 
-void
-gdImageColorTransparent (gdImagePtr im, int color)
+BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color)
 {
   if (!im->trueColor)
     {
   im->transparent = color;
 }
 
-void
-gdImagePaletteCopy (gdImagePtr to, gdImagePtr from)
+BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr to, gdImagePtr from)
 {
   int i;
   int x, y, p;
 
 /* end of line clipping code */
 
-void
-gdImageSetPixel (gdImagePtr im, int x, int y, int color)
+BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color)
 {
   int p;
   switch (color)
     }
 }
 
-int
-gdImageGetPixel (gdImagePtr im, int x, int y)
+BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y)
 {
   if (gdImageBoundsSafeMacro (im, x, y))
     {
     }
 }
 
-void
-gdImageAABlend (gdImagePtr im)
+BGD_DECLARE(void) gdImageAABlend (gdImagePtr im)
 {
   float p_alpha, old_alpha;
   int color = im->AA_color, color_red, color_green, color_blue;
 }
 
 /* Bresenham as presented in Foley & Van Dam */
-void
-gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
+BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 {
   int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag;
   int wid;
 static void dashedSet (gdImagePtr im, int x, int y, int color,
 		       int *onP, int *dashStepP, int wid, int vert);
 
-void
-gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
+BGD_DECLARE(void) gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 {
   int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag;
   int dashStep = 0;
   *onP = on;
 }
 
-int
-gdImageBoundsSafe (gdImagePtr im, int x, int y)
+BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y)
 {
   return gdImageBoundsSafeMacro (im, x, y);
 }
 
-void
-gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
+BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
 {
   int cx, cy;
   int px, py;
     }
 }
 
-void
-gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
+BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
 {
   int cx, cy;
   int px, py;
     }
 }
 
-void
-gdImageString (gdImagePtr im, gdFontPtr f,
+BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f,
 	       int x, int y, unsigned char *s, int color)
 {
   int i;
     }
 }
 
-void
-gdImageStringUp (gdImagePtr im, gdFontPtr f,
+BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
 		 int x, int y, unsigned char *s, int color)
 {
   int i;
 
 static int strlen16 (unsigned short *s);
 
-void
-gdImageString16 (gdImagePtr im, gdFontPtr f,
+BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f,
 		 int x, int y, unsigned short *s, int color)
 {
   int i;
     }
 }
 
-void
-gdImageStringUp16 (gdImagePtr im, gdFontPtr f,
+BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f,
 		   int x, int y, unsigned short *s, int color)
 {
   int i;
    See gd_arc_f_buggy.c for a better version that doesn't 
    seem to be bug-free yet. */
 
-void
-gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
+BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
 	    int color)
 {
   gdImageFilledArc (im, cx, cy, w, h, s, e, color, gdNoFill);
 }
 
-void
-gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
+BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
 		  int color, int style)
 {
   gdPoint pts[3];
     }
 }
 
-void
-gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color)
+BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color)
 {
   gdImageFilledArc (im, cx, cy, w, h, 0, 360, color, gdPie);
 }
 
-void
-gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
+BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
 {
   int lastBorder;
   /* Seek left */
     }
 }
 
-void
-gdImageFill (gdImagePtr im, int x, int y, int color)
+BGD_DECLARE(void) gdImageFill (gdImagePtr im, int x, int y, int color)
 {
   int lastBorder;
   int old;
     }
 }
 
-void
-gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
+BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 {
   int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = y2,
     y2v = y2;
   gdImageLine (im, x2v, y1v, x2v, y2v, color);
 }
 
-void
-gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
+BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
 			int color)
 {
   int x, y;
     }
 }
 
-void
-gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX,
+BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX,
 	     int srcY, int w, int h)
 {
   int c;
 
 /* This function is a substitute for real alpha channel operations,
    so it doesn't pay attention to the alpha channel. */
-void
-gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 		  int srcX, int srcY, int w, int h, int pct)
 {
 
 
 /* This function is a substitute for real alpha channel operations,
    so it doesn't pay attention to the alpha channel. */
-void
-gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 		      int srcX, int srcY, int w, int h, int pct)
 {
 
     }
 }
 
-void
-gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 		    int srcX, int srcY, int dstW, int dstH, int srcW,
 		    int srcH)
 {
 	coordinates allow accurate rotation of 
 	objects of odd-numbered width or height. */
 
-void
-gdImageCopyRotated (gdImagePtr dst,
+BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
 		    gdImagePtr src,
 		    double dstX, double dstY,
 		    int srcX, int srcY,
 #define floor2(exp) ((long) exp)
 /*#define floor2(exp) floor(exp)*/
 
-void
-gdImageCopyResampled (gdImagePtr dst,
+BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
 		      gdImagePtr src,
 		      int dstX, int dstY,
 		      int srcX, int srcY,
     }
 }
 
-gdImagePtr
-gdImageCreateFromXbm (FILE * fd)
+BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd)
 {
   gdImagePtr im;
   int bit;
   return 0;
 }
 
-void
-gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
+BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 {
   int i;
   int lx, ly;
 /* That could help to adjust intersections  to produce a nice */
 /* interior_extrema. */
 
-void
-gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
+BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 {
   int i;
   int y;
   return (*(const int *) a) - (*(const int *) b);
 }
 
-void
-gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
+BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
 {
   if (im->style)
     {
   im->stylePos = 0;
 }
 
-void
-gdImageSetThickness (gdImagePtr im, int thickness)
+BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness)
 {
   im->thick = thickness;
 }
 
-void
-gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
+BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
 {
   int i;
   im->brush = brush;
     }
 }
 
-void
-gdImageSetTile (gdImagePtr im, gdImagePtr tile)
+BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile)
 {
   int i;
   im->tile = tile;
     }
 }
 
-void
-gdImageSetAntiAliased (gdImagePtr im, int c)
+BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c)
 {
   im->AA = 1;
   im->AA_color = c;
   im->AA_dont_blend = -1;
 }
 
-void
-gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend)
+BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend)
 {
   im->AA = 1;
   im->AA_color = c;
   im->AA_dont_blend = dont_blend;
 }
 
-void
-gdImageInterlace (gdImagePtr im, int interlaceArg)
+BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg)
 {
   im->interlace = interlaceArg;
 }
 
-int
-gdImageCompare (gdImagePtr im1, gdImagePtr im2)
+BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2)
 {
   int x, y;
   int p1, p2;
   return cmpStatus;
 }
 
-int
-gdAlphaBlend (int dst, int src)
+BGD_DECLARE(int) gdAlphaBlend (int dst, int src)
 {
   /* 2.0.12: TBB: alpha in the destination should be a 
      component of the result. Thanks to Frank Warmerdam for
 	    gdTrueColorGetBlue (dst)) / gdAlphaMax));
 }
 
-void
-gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg)
+BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg)
 {
   im->alphaBlendingFlag = alphaBlendingArg;
 }
 
-void
-gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
+BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
 {
   im->saveAlphaFlag = saveAlphaArg;
 }
 
-void
-gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
+BGD_DECLARE(void) gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
 {
   if (x1 < 0)
     {
   im->cy2 = y2;
 }
 
-void
-gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P)
+BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P)
 {
   *x1P = im->cx1;
   *y1P = im->cy1;
 	not on Silly Silly Windows (tm Aardman Productions). */
 
 /* 2.0.20: for headers */
+
+/* 2.0.24: __stdcall also needed for Visual BASIC 
+	and other languages. This breaks ABI compatibility
+	with previous DLL revs, but it's necessary. */
+
 #ifdef BGDWIN32
-#define BGD_EXPORT __declspec(dllexport)
+#define BGD_DECLARE(rt) __declspec(dllexport) rt __stdcall
 #else
 #ifdef WIN32
-#define BGD_EXPORT __declspec(dllimport)
+#define BGD_DECLARE(rt) __declspec(dllimport) rt _stdcall
 #else
 /* 2.0.19: should be 'extern', especially for font data pointers */
-#define BGD_EXPORT extern
+#define BGD_DECLARE(rt) extern rt
 #endif /* WIN32 */
 #endif /* BGDWIN32 */
 
 	based on the alpha channel value of the source color.
 	The resulting color is opaque. */
 
-   BGD_EXPORT int gdAlphaBlend (int dest, int src);
+   BGD_DECLARE(int) gdAlphaBlend (int dest, int src);
 
   typedef struct gdImageStruct
   {
 /* Functions to manipulate images. */
 
 /* Creates a palette-based image (up to 256 colors). */
-   BGD_EXPORT gdImagePtr gdImageCreate (int sx, int sy);
+BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy);
 
 /* An alternate name for the above (2.0). */
 #define gdImageCreatePalette gdImageCreate
 
 /* Creates a truecolor image (millions of colors). */
-   BGD_EXPORT gdImagePtr gdImageCreateTrueColor (int sx, int sy);
+BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy);
 
 /* Creates an image from various file types. These functions
 	return a palette or truecolor image based on the
 	nature of the file being loaded. Truecolor PNG
 	stays truecolor; palette PNG stays palette-based;
 	JPEG is always truecolor. */
-   BGD_EXPORT gdImagePtr gdImageCreateFromPng (FILE * fd);
-   BGD_EXPORT gdImagePtr gdImageCreateFromPngCtx (gdIOCtxPtr in);
-   BGD_EXPORT gdImagePtr gdImageCreateFromPngPtr (int size, void *data);
-   BGD_EXPORT gdImagePtr gdImageCreateFromWBMP (FILE * inFile);
-   BGD_EXPORT gdImagePtr gdImageCreateFromWBMPCtx (gdIOCtx * infile);
-   BGD_EXPORT gdImagePtr gdImageCreateFromWBMPPtr (int size, void *data);
-   BGD_EXPORT gdImagePtr gdImageCreateFromJpeg (FILE * infile);
-   BGD_EXPORT gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile);
-   BGD_EXPORT gdImagePtr gdImageCreateFromJpegPtr (int size, void *data);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * fd);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtxPtr in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP (FILE * inFile);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx (gdIOCtx * infile);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPPtr (int size, void *data);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromJpeg (FILE * infile);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtx (gdIOCtx * infile);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtr (int size, void *data);
 
 /* A custom data source. */
 /* The source function must return -1 on error, otherwise the number
   gdSource, *gdSourcePtr;
 
    /* Deprecated in favor of gdImageCreateFromPngCtx */
-   BGD_EXPORT gdImagePtr gdImageCreateFromPngSource (gdSourcePtr in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr in);
 
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd (FILE * in);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGdPtr (int size, void *data);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGdCtx (gdIOCtxPtr in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGdPtr (int size, void *data);
 
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2 (FILE * in);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2Ptr (int size, void *data);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2 (FILE * in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ptr (int size, void *data);
 
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w,
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w,
 				       int h);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy,
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy,
 					  int w, int h);
-   BGD_EXPORT gdImagePtr gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy,
+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy,
 					  int w, int h);
   /* 2.0.10: prototype was missing */
-   BGD_EXPORT gdImagePtr gdImageCreateFromXbm (FILE * in);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * in);
 
   /* NOTE: filename, not FILE */
-   BGD_EXPORT gdImagePtr gdImageCreateFromXpm (char *filename);
+BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename);
 
-   BGD_EXPORT void gdImageDestroy (gdImagePtr im);
+BGD_DECLARE(void) gdImageDestroy (gdImagePtr im);
 
 /* Replaces or blends with the background depending on the
 	most recent call to gdImageAlphaBlending and the
 	here. All other gd drawing functions pass through this call, 
 	allowing for many useful effects. */
 
-   BGD_EXPORT void gdImageSetPixel (gdImagePtr im, int x, int y, int color);
+BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color);
 
-   BGD_EXPORT int gdImageGetPixel (gdImagePtr im, int x, int y);
+BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y);
 
-   BGD_EXPORT void gdImageAABlend (gdImagePtr im);
+BGD_DECLARE(void) gdImageAABlend (gdImagePtr im);
 
-   BGD_EXPORT void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
+BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
 
 /* For backwards compatibility only. Use gdImageSetStyle()
 	for much more flexible line drawing. */
-   BGD_EXPORT void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2,
+BGD_DECLARE(void) gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2,
 			  int color);
 /* Corners specified (not width and height). Upper left first, lower right
  	second. */
-   BGD_EXPORT void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
+BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
 			 int color);
 /* Solid bar. Upper left corner first, lower right corner second. */
-   BGD_EXPORT void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
+BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
 			       int color);
-   BGD_EXPORT void gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2);
-   BGD_EXPORT void gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P);
-   BGD_EXPORT int gdImageBoundsSafe (gdImagePtr im, int x, int y);
-   BGD_EXPORT void gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
+BGD_DECLARE(void) gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2);
+BGD_DECLARE(void) gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P);
+BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y);
+BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
 		    int color);
-   BGD_EXPORT void gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c,
+BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c,
 		      int color);
-   BGD_EXPORT void gdImageString (gdImagePtr im, gdFontPtr f, int x, int y,
+BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f, int x, int y,
 		      unsigned char *s, int color);
-   BGD_EXPORT void gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y,
+BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y,
 			unsigned char *s, int color);
-   BGD_EXPORT void gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y,
+BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y,
 			unsigned short *s, int color);
-   BGD_EXPORT void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y,
+BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y,
 			  unsigned short *s, int color);
 
 /* 2.0.16: for thread-safe use of gdImageStringFT and friends,
   Otherwise it is invoked by the first thread to invoke
   gdImageStringFT, with a very small but real risk of a race condition. 
   Return 0 on success, nonzero on failure to initialize freetype. */
- BGD_EXPORT int gdFontCacheSetup (void);
+BGD_DECLARE(int) gdFontCacheSetup (void);
 
 /* Optional: clean up after application is done using fonts in 
- BGD_EXPORT   gdImageStringFT(). */
- BGD_EXPORT void gdFontCacheShutdown (void);
+BGD_DECLARE( ) gdImageStringFT(). */
+BGD_DECLARE(void) gdFontCacheShutdown (void);
 /* 2.0.20: for backwards compatibility. A few applications did start calling
  this function when it first appeared although it was never documented. 
  Simply invokes gdFontCacheShutdown. */
- BGD_EXPORT void gdFreeFontCache (void);
+BGD_DECLARE(void) gdFreeFontCache (void);
 
 /* Calls gdImageStringFT. Provided for backwards compatibility only. */
-  BGD_EXPORT char *gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
 			  double ptsize, double angle, int x, int y,
 			  char *string);
 
 /* FreeType 2 text output */
-  BGD_EXPORT char *gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
 			 double ptsize, double angle, int x, int y,
 			 char *string);
 
 #define gdFTEX_Shift_JIS 1
 #define gdFTEX_Big5 2
 
-  BGD_EXPORT char *gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
 			   double ptsize, double angle, int x, int y,
 			   char *string, gdFTStringExtraPtr strex);
 
   }
   gdPoint, *gdPointPtr;
 
-   BGD_EXPORT void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c);
-   BGD_EXPORT void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c);
+BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c);
+BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c);
 
 /* These functions still work with truecolor images, 
 	for which they never return error. */
-   BGD_EXPORT int gdImageColorAllocate (gdImagePtr im, int r, int g, int b);
+BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b);
 /* gd 2.0: palette entries with non-opaque transparency are permitted. */
-   BGD_EXPORT int gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a);
+BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* Assumes opaque is the preferred alpha channel value */
-   BGD_EXPORT int gdImageColorClosest (gdImagePtr im, int r, int g, int b);
+BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b);
 /* Closest match taking all four parameters into account.
 	A slightly different color with the same transparency
 	beats the exact same color with radically different
 	transparency */
-   BGD_EXPORT int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a);
+BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* An alternate method */
-   BGD_EXPORT int gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b);
+BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b);
 /* Returns exact, 100% opaque matches only */
-   BGD_EXPORT int gdImageColorExact (gdImagePtr im, int r, int g, int b);
+BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b);
 /* Returns an exact match only, including alpha */
-   BGD_EXPORT int gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a);
+BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* Opaque only */
-   BGD_EXPORT int gdImageColorResolve (gdImagePtr im, int r, int g, int b);
+BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b);
 /* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */
-   BGD_EXPORT int gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a);
+BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a);
 
 /* A simpler way to obtain an opaque truecolor value for drawing on a
 	truecolor image. Not for use with palette images! */
 	((g) << 8) + \
 	(b))
 
-   BGD_EXPORT void gdImageColorDeallocate (gdImagePtr im, int color);
+BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color);
 
 /* Converts a truecolor image to a palette-based image,
 	using a high-quality two-pass quantization routine
         conversion to palette is not great (for small images
         it can be negative) and the quality loss is ugly. */
 
-   BGD_EXPORT void gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag,
+BGD_DECLARE(void) gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag,
 				  int colorsWanted);
 
 /* Specifies a color index (if a palette image) or an
 	a truecolor image. Note that gdImageColorTransparent
 	is usually compatible with older browsers that
 	do not understand full alpha channels well. TBB */
-   BGD_EXPORT void gdImageColorTransparent (gdImagePtr im, int color);
+BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color);
 
-   BGD_EXPORT void gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src);
-   BGD_EXPORT void gdImagePng (gdImagePtr im, FILE * out);
-   BGD_EXPORT void gdImagePngCtx (gdImagePtr im, gdIOCtx * out);
+BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src);
+BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * out);
+BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * out);
   /* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all,
      1 is FASTEST but produces larger files, 9 provides the best
      compression (smallest files) but takes a long time to compress, and
      -1 selects the default compiled into the zlib library. */
-   BGD_EXPORT void gdImagePngEx (gdImagePtr im, FILE * out, int level);
-   BGD_EXPORT void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level);
+BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * out, int level);
+BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level);
 
-   BGD_EXPORT void gdImageWBMP (gdImagePtr image, int fg, FILE * out);
-   BGD_EXPORT void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out);
+BGD_DECLARE(void) gdImageWBMP (gdImagePtr image, int fg, FILE * out);
+BGD_DECLARE(void) gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out);
 
 /* Guaranteed to correctly free memory returned
 	by the gdImage*Ptr functions */
-   BGD_EXPORT void gdFree (void *m);
+BGD_DECLARE(void) gdFree (void *m);
 
 /* Best to free this memory with gdFree(), not free() */
   void *gdImageWBMPPtr (gdImagePtr im, int *size, int fg);
 
 /* 100 is highest quality (there is always a little loss with JPEG).
 	0 is lowest. 10 is about the lowest useful setting. */
-   BGD_EXPORT void gdImageJpeg (gdImagePtr im, FILE * out, int quality);
-   BGD_EXPORT void gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality);
+BGD_DECLARE(void) gdImageJpeg (gdImagePtr im, FILE * out, int quality);
+BGD_DECLARE(void) gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality);
 
 /* Best to free this memory with gdFree(), not free() */
-  BGD_EXPORT void *gdImageJpegPtr (gdImagePtr im, int *size, int quality);
+BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality);
 
 /* A custom data sink. For backwards compatibility. Use
 	gdIOCtx instead. */
   }
   gdSink, *gdSinkPtr;
 
-   BGD_EXPORT void gdImagePngToSink (gdImagePtr im, gdSinkPtr out);
+BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr out);
 
-   BGD_EXPORT void gdImageGd (gdImagePtr im, FILE * out);
-   BGD_EXPORT void gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt);
+BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * out);
+BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt);
 
 /* Best to free this memory with gdFree(), not free() */
-  BGD_EXPORT void *gdImagePngPtr (gdImagePtr im, int *size);
-  BGD_EXPORT void *gdImagePngPtrEx (gdImagePtr im, int *size, int level);
+BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size);
+BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level);
 
 /* Best to free this memory with gdFree(), not free() */
-  BGD_EXPORT void *gdImageGdPtr (gdImagePtr im, int *size);
+BGD_DECLARE(void *) gdImageGdPtr (gdImagePtr im, int *size);
 
 /* Best to free this memory with gdFree(), not free() */
-  BGD_EXPORT void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size);
+BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size);
 
-   BGD_EXPORT void gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h,
+BGD_DECLARE(void) gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h,
 		       int color);
 
 /* Style is a bitwise OR ( | operator ) of these.
 #define gdNoFill 2
 #define gdEdged 4
 
-   BGD_EXPORT void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s,
+BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s,
 			 int e, int color, int style);
-   BGD_EXPORT void gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
+BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
 		   int color);
-   BGD_EXPORT void gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h,
+BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h,
 			     int color);
-   BGD_EXPORT void gdImageFillToBorder (gdImagePtr im, int x, int y, int border,
+BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border,
 			    int color);
-   BGD_EXPORT void gdImageFill (gdImagePtr im, int x, int y, int color);
-   BGD_EXPORT void gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageFill (gdImagePtr im, int x, int y, int color);
+BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 		    int srcX, int srcY, int w, int h);
-   BGD_EXPORT void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 			 int srcX, int srcY, int w, int h, int pct);
-   BGD_EXPORT void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX,
+BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX,
 			     int dstY, int srcX, int srcY, int w, int h,
 			     int pct);
 
 /* Stretches or shrinks to fit, as needed. Does NOT attempt
 	to average the entire set of source pixels that scale down onto the
 	destination pixel. */
-   BGD_EXPORT void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 			   int srcX, int srcY, int dstW, int dstH, int srcW,
 			   int srcH);
 
 	on modern hardware, except for some embedded devices. If the 
 	destination is a palette image, gdImageCopyResized is 
 	substituted automatically. */
-   BGD_EXPORT void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX,
+BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX,
 			     int dstY, int srcX, int srcY, int dstW, int dstH,
 			     int srcW, int srcH);
 
         gdImageArc. Floating point destination center
         coordinates allow accurate rotation of
         objects of odd-numbered width or height. */
-   BGD_EXPORT void gdImageCopyRotated (gdImagePtr dst,
+BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
 			   gdImagePtr src,
 			   double dstX, double dstY,
 			   int srcX, int srcY,
 			   int srcWidth, int srcHeight, int angle);
 
-   BGD_EXPORT void gdImageSetBrush (gdImagePtr im, gdImagePtr brush);
-   BGD_EXPORT void gdImageSetTile (gdImagePtr im, gdImagePtr tile);
-   BGD_EXPORT void gdImageSetAntiAliased (gdImagePtr im, int c);
-   BGD_EXPORT void gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend);
-   BGD_EXPORT void gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels);
+BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush);
+BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile);
+BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c);
+BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend);
+BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels);
 /* Line thickness (defaults to 1). Affects lines, ellipses, 
 	rectangles, polygons and so forth. */
-   BGD_EXPORT void gdImageSetThickness (gdImagePtr im, int thickness);
+BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness);
 /* On or off (1 or 0) for all three of these. */
-   BGD_EXPORT void gdImageInterlace (gdImagePtr im, int interlaceArg);
-   BGD_EXPORT void gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg);
-   BGD_EXPORT void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg);
+BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg);
+BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg);
+BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg);
 
 /* Macros to access information about images. */
 
 
 /* I/O Support routines. */
 
-  BGD_EXPORT gdIOCtx *gdNewFileCtx (FILE *);
+BGD_DECLARE(gdIOCtx *) gdNewFileCtx (FILE *);
   /* If data is null, size is ignored and an initial data buffer is
     allocated automatically. NOTE: this function assumes gd has the right 
     to free or reallocate "data" at will! Also note that gd will free 
     "data" when the IO context is freed. If data is not null, it must point
     to memory allocated with gdMalloc, or by a call to gdImage[something]Ptr.
     If not, see gdNewDynamicCtxEx for an alternative. */
-  BGD_EXPORT gdIOCtx *gdNewDynamicCtx (int size, void *data);
+BGD_DECLARE(gdIOCtx *) gdNewDynamicCtx (int size, void *data);
   /* 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as
     needed as described above. If freeFlag is zero, gd will never free 
     or reallocate "data," which means that the context should only be used
     not large enough and an image write is attempted, the write operation
     will fail. Those wishing to write an image to a buffer in memory have
     a much simpler alternative in the gdImage[something]Ptr functions. */
-  BGD_EXPORT gdIOCtx *gdNewDynamicCtxEx (int size, void *data, int freeFlag);
-  BGD_EXPORT gdIOCtx *gdNewSSCtx (gdSourcePtr in, gdSinkPtr out);
-  BGD_EXPORT void *gdDPExtractData (struct gdIOCtx *ctx, int *size);
+BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx (int size, void *data, int freeFlag);
+BGD_DECLARE(gdIOCtx *) gdNewSSCtx (gdSourcePtr in, gdSinkPtr out);
+BGD_DECLARE(void *) gdDPExtractData (struct gdIOCtx *ctx, int *size);
 
 #define GD2_CHUNKSIZE           128
 #define GD2_CHUNKSIZE_MIN	64
 #define GD2_FMT_COMPRESSED      2
 
 /* Image comparison definitions */
-   BGD_EXPORT int gdImageCompare (gdImagePtr im1, gdImagePtr im2);
+BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2);
 
 #define GD_CMP_IMAGE		1	/* Actual image IS different */
 #define GD_CMP_NUM_COLORS	2	/* Number of Colours in pallette differ */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.