Commits

Anonymous committed 5b14780

- WS

  • Participants
  • Parent commits 10caf1a
  • Branches GD-2.0

Comments (0)

Files changed (1)

 #define GD_EXTRA_VERSION "alpha"
 #define GD_VERSION_STRING "2.1.0-alpha"
 
-
 /* Do the DLL dance: dllexport when building the DLL,
 	dllimport when importing from it, nothing when
 	not on Silly Silly Windows (tm Aardman Productions). */
 
 /* 2.0.20: for headers */
 
-/* 2.0.24: __stdcall also needed for Visual BASIC 
+/* 2.0.24: __stdcall also needed for Visual BASIC
 	and other languages. This breaks ABI compatibility
 	with previous DLL revs, but it's necessary. */
 
 #define BGD_DECLARE(rt) extern rt
 #else
 #ifdef BGDWIN32
+
 #define BGD_DECLARE(rt) __declspec(dllexport) rt __stdcall
 #else
 #define BGD_DECLARE(rt) __declspec(dllimport) rt _stdcall
 #define BGD_EXPORT_DATA_IMPL __declspec(dllexport)
 #else
 #define BGD_EXPORT_DATA_PROT __declspec(dllimport) extern
-#define BGD_EXPORT_DATA_IMPL __declspec(dllimport) 
+#define BGD_EXPORT_DATA_IMPL __declspec(dllimport)
 #endif /* BGDWIN32 */
 #endif /* NONDLL */
 
  * that the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
  * documentation.  This software is provided "AS IS." Thomas Boutell and
- * Boutell.Com, Inc. disclaim all warranties, either express or implied, 
- * including but not limited to implied warranties of merchantability and 
+ * Boutell.Com, Inc. disclaim all warranties, either express or implied,
+ * including but not limited to implied warranties of merchantability and
  * fitness for a particular purpose, with respect to this code and accompanying
  * documentation. */
 
 
 /* Image type. See functions below; you will not need to change
 	the elements directly. Use the provided macros to
-	access sx, sy, the color table, and colorsTotal for 
+	access sx, sy, the color table, and colorsTotal for
 	read-only purposes. */
 
-/* If 'truecolor' is set true, the image is truecolor; 
+/* If 'truecolor' is set true, the image is truecolor;
 	pixels are represented by integers, which
-	must be 32 bits wide or more. 
+	must be 32 bits wide or more.
 
 	True colors are repsented as follows:
 
 	ARGB
 
 	Where 'A' (alpha channel) occupies only the
-	LOWER 7 BITS of the MSB. This very small 
+	LOWER 7 BITS of the MSB. This very small
 	loss of alpha channel resolution allows gd 2.x
 	to keep backwards compatibility by allowing
 	signed integers to be used to represent colors,
 };
 
 
-/* This function accepts truecolor pixel values only. The 
+/* This function accepts truecolor pixel values only. The
 	source color is composited with the destination color
 	based on the alpha channel value of the source color.
 	The resulting color is opaque. */
     int open[gdMaxColors];
     /* For backwards compatibility, this is set to the
        first palette entry with 100% transparency,
-       and is also set and reset by the 
+       and is also set and reset by the
        gdImageColorTransparent function. Newer
        applications can allocate palette entries
        with any desired level of transparency; however,
        really support multiple levels of transparency in
        palettes, to my knowledge, as of 2/15/01. Most
        common browsers will display 100% opaque and
-       100% transparent correctly, and do something 
+       100% transparent correctly, and do something
        unpredictable and/or undesirable for levels
        in between. TBB */
     int alpha[gdMaxColors];
     /* Should alpha channel be copied, or applied, each time a
        pixel is drawn? This applies to truecolor images only.
        No attempt is made to alpha-blend in palette images,
-       even if semitransparent palette entries exist. 
+       even if semitransparent palette entries exist.
        To do that, build your image as a truecolor image,
        then quantize down to 8 bits. */
     int alphaBlendingFlag;
 
 /* Replaces or blends with the background depending on the
 	most recent call to gdImageAlphaBlending and the
-	alpha channel value of 'color'; default is to overwrite. 
+	alpha channel value of 'color'; default is to overwrite.
 	Tiling and line styling are also implemented
-	here. All other gd drawing functions pass through this call, 
+	here. All other gd drawing functions pass through this call,
 	allowing for many useful effects. */
 
 BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color);
 			  unsigned short *s, int color);
 
 /* 2.0.16: for thread-safe use of gdImageStringFT and friends,
-  call this before allowing any thread to call gdImageStringFT. 
+  call this before allowing any thread to call gdImageStringFT.
   Otherwise it is invoked by the first thread to invoke
-  gdImageStringFT, with a very small but real risk of a race condition. 
+  gdImageStringFT, with a very small but real risk of a race condition.
   Return 0 on success, nonzero on failure to initialize freetype. */
 BGD_DECLARE(int) gdFontCacheSetup (void);
 
-/* Optional: clean up after application is done using fonts in 
+/* Optional: clean up after application is done using fonts in
 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. 
+ this function when it first appeared although it was never documented.
  Simply invokes gdFontCacheShutdown. */
 BGD_DECLARE(void) gdFreeFontCache (void);
 
 			   the last string.
 
 			   NB. The caller is responsible for gdFree'ing
-			   the xshow string. 
+			   the xshow string.
 			 */
     char *fontpath;	/* if (flags & gdFTEX_RETURNFONTPATHNAME)
                            then, on return, fontpath is a malloc'ed
                            string containing the actual font file path name
                            used, which can be interesting when fontconfig
-                           is in use. 
+                           is in use.
 
                            The caller is responsible for gdFree'ing the
                            fontpath string.
 #define gdFTEX_DISABLE_KERNING 8
 #define gdFTEX_XSHOW 16
 /* The default unless gdFTUseFontConfig(1); has been called:
-  fontlist is a full or partial font file pathname or list thereof 
+  fontlist is a full or partial font file pathname or list thereof
   (i.e. just like before 2.0.29) */
 #define gdFTEX_FONTPATHNAME 32
 /* Necessary to use fontconfig patterns instead of font pathnames
-  as the fontlist argument, unless gdFTUseFontConfig(1); has 
+  as the fontlist argument, unless gdFTUseFontConfig(1); has
   been called. New in 2.0.29 */
 #define gdFTEX_FONTCONFIG 64
 /* Sometimes interesting when fontconfig is used: the fontpath
   element of the structure above will contain a gdMalloc'd string
-  copy of the actual font file pathname used, if this flag is set 
+  copy of the actual font file pathname used, if this flag is set
    when the call is made */
 #define gdFTEX_RETURNFONTPATHNAME 128
 
-/* If flag is nonzero, the fontlist parameter to gdImageStringFT 
+/* If flag is nonzero, the fontlist parameter to gdImageStringFT
   and gdImageStringFTEx shall be assumed to be a fontconfig font pattern
   if fontconfig was compiled into gd. This function returns zero
   if fontconfig is not available, nonzero otherwise. */
 BGD_DECLARE(void) gdImageOpenPolygon (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, 
+/* These functions still work with truecolor images,
 	for which they never return error. */
 BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b);
 /* gd 2.0: palette entries with non-opaque transparency are permitted. */
 	Better yet, don't use these function -- write real
 	truecolor PNGs and JPEGs. The disk space gain of
         conversion to palette is not great (for small images
-        it can be negative) and the quality loss is ugly. 
+        it can be negative) and the quality loss is ugly.
 
 	DIFFERENCES: gdImageCreatePaletteFromTrueColor creates and
-	returns a new image. gdImageTrueColorToPalette modifies 
+	returns a new image. gdImageTrueColorToPalette modifies
 	an existing image, and the truecolor pixels are discarded. */
 
 BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag,
 	gdArc and gdChord are mutually exclusive;
 	gdChord just connects the starting and ending
 	angles with a straight line, while gdArc produces
-	a rounded edge. gdPie is a synonym for gdArc. 
+	a rounded edge. gdPie is a synonym for gdArc.
 	gdNoFill indicates that the arc or chord should be
 	outlined, not filled. gdEdged, used together with
 	gdNoFill, indicates that the beginning and ending
 	destination pixel, taking into account what portion of the
 	destination pixel each source pixel represents. This is a
 	floating point operation, but this is not a performance issue
-	on modern hardware, except for some embedded devices. If the 
-	destination is a palette image, gdImageCopyResized is 
+	on modern hardware, except for some embedded devices. If the
+	destination is a palette image, gdImageCopyResized is
 	substituted automatically. */
 BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX,
 			     int dstY, int srcX, int srcY, int dstW, int dstH,
 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, 
+/* Line thickness (defaults to 1). Affects lines, ellipses,
 	rectangles, polygons and so forth. */
 BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness);
 /* On or off (1 or 0) for all three of these. */
 
 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 
+    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_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 
+    needed as described above. If freeFlag is zero, gd will never free
     or reallocate "data," which means that the context should only be used
     for *reading* an image from a memory buffer, or writing an image to a
     memory buffer which is already large enough. If the memory buffer is