summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-07-20 21:13:38 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-07-20 21:24:48 +0200
commitb0333689ef53c16c2f5313f5e97ba81d91576256 (patch)
treeea07b5707f38db204c0199befb8d6603cad31fd4
parent5a8139faae2d2e3d36049eb61192128559401ba9 (diff)
downloadlibgd-b0333689ef53c16c2f5313f5e97ba81d91576256.tar.gz
Document all BGD_DECLARE'd functions
We add only minimal documentation comments for now, but at least that lets Natural Docs add the function prototypes to the documentation.
-rw-r--r--src/gd.c241
-rw-r--r--src/gd_bmp.c18
-rw-r--r--src/gd_color_map.c3
-rw-r--r--src/gd_color_match.c6
-rw-r--r--src/gd_crop.c9
-rw-r--r--src/gd_filter.c54
-rw-r--r--src/gd_gd.c6
-rw-r--r--src/gd_gd2.c6
-rw-r--r--src/gd_interpolation.c19
-rw-r--r--src/gd_io_dp.c12
-rw-r--r--src/gd_io_file.c6
-rw-r--r--src/gd_io_ss.c6
-rw-r--r--src/gd_nnquant.c3
-rw-r--r--src/gd_ss.c3
-rw-r--r--src/gd_tga.c26
-rw-r--r--src/gd_tiff.c46
-rw-r--r--src/gd_topal.c30
-rw-r--r--src/gd_transform.c9
-rw-r--r--src/gd_version.c15
-rw-r--r--src/gd_wbmp.c30
-rw-r--r--src/gd_webp.c12
-rw-r--r--src/gd_xbm.c3
-rw-r--r--src/gdfontg.c3
-rw-r--r--src/gdfontl.c3
-rw-r--r--src/gdfontmb.c3
-rw-r--r--src/gdfonts.c3
-rw-r--r--src/gdfontt.c3
-rw-r--r--src/gdft.c21
-rw-r--r--src/gdfx.c28
-rw-r--r--src/gdhelpers.c3
30 files changed, 539 insertions, 91 deletions
diff --git a/src/gd.c b/src/gd.c
index 9875966..9fe175f 100644
--- a/src/gd.c
+++ b/src/gd.c
@@ -120,11 +120,17 @@ void gd_error_ex(int priority, const char *format, ...)
va_end(args);
}
+/*
+ Function: gdSetErrorMethod
+*/
BGD_DECLARE(void) gdSetErrorMethod(gdErrorMethod error_method)
{
gd_error_method = error_method;
}
+/*
+ Function: gdClearErrorMethod
+*/
BGD_DECLARE(void) gdClearErrorMethod(void)
{
gd_error_method = gd_stderr_error;
@@ -132,6 +138,10 @@ BGD_DECLARE(void) gdClearErrorMethod(void)
static void gdImageBrushApply (gdImagePtr im, int x, int y);
static void gdImageTileApply (gdImagePtr im, int x, int y);
+
+/*
+ Function: gdImageGetTrueColorPixel
+*/
BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
@@ -385,11 +395,17 @@ BGD_DECLARE(void) gdImageDestroy (gdImagePtr im)
gdFree (im);
}
+/*
+ Function: gdImageColorClosest
+*/
BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b)
{
return gdImageColorClosestAlpha (im, r, g, b, gdAlphaOpaque);
}
+/*
+ Function: gdImageColorClosestAlpha
+*/
BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int i;
@@ -557,6 +573,9 @@ HWB_to_RGB (HWBType HWB, RGBType * RGB)
}
#endif
+/*
+ Function: gdImageColorClosestHWB
+*/
BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
{
int i;
@@ -582,11 +601,17 @@ BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
return ct;
}
+/*
+ Function: gdImageColorExact
+*/
BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b)
{
return gdImageColorExactAlpha (im, r, g, b, gdAlphaOpaque);
}
+/*
+ Function: gdImageColorExactAlpha
+*/
BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int i;
@@ -605,11 +630,17 @@ BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int
return -1;
}
+/*
+ Function: gdImageColorAllocate
+*/
BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
{
return gdImageColorAllocateAlpha (im, r, g, b, gdAlphaOpaque);
}
+/*
+ Function: gdImageColorAllocateAlpha
+*/
BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int i;
@@ -639,21 +670,24 @@ BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b,
}
/*
- * gdImageColorResolve is an alternative for the code fragment:
- *
- * if ((color=gdImageColorExact(im,R,G,B)) < 0)
- * if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
- * color=gdImageColorClosest(im,R,G,B);
- *
- * in a single function. Its advantage is that it is guaranteed to
- * return a color index in one search over the color table.
- */
+ Function: gdImageColorResolve
+
+ gdImageColorResolve is an alternative for the code fragment
+ | if ((color=gdImageColorExact(im,R,G,B)) < 0)
+ | if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
+ | color=gdImageColorClosest(im,R,G,B);
+ in a single function. Its advantage is that it is guaranteed to
+ return a color index in one search over the color table.
+*/
BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b)
{
return gdImageColorResolveAlpha (im, r, g, b, gdAlphaOpaque);
}
+/*
+ Function: gdImageColorResolveAlpha
+*/
BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int c;
@@ -705,6 +739,9 @@ BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, i
return op; /* Return newly allocated color */
}
+/*
+ Function: gdImageColorDeallocate
+*/
BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color)
{
if (im->trueColor || (color >= gdMaxColors) || (color < 0)) {
@@ -714,6 +751,9 @@ BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color)
im->open[color] = 1;
}
+/*
+ Function: gdImageColorTransparent
+*/
BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color)
{
if (color < 0) {
@@ -734,6 +774,9 @@ BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color)
im->transparent = color;
}
+/*
+ Function: gdImagePaletteCopy
+*/
BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr to, gdImagePtr from)
{
int i;
@@ -786,6 +829,9 @@ BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr to, gdImagePtr from)
}
+/*
+ Function: gdImageColorReplace
+*/
BGD_DECLARE(int) gdImageColorReplace (gdImagePtr im, int src, int dst)
{
register int x, y;
@@ -817,6 +863,9 @@ BGD_DECLARE(int) gdImageColorReplace (gdImagePtr im, int src, int dst)
return n;
}
+/*
+ Function: gdImageColorReplaceThreshold
+*/
BGD_DECLARE(int) gdImageColorReplaceThreshold (gdImagePtr im, int src, int dst, float threshold)
{
register int x, y;
@@ -855,6 +904,9 @@ static int colorCmp (const void *x, const void *y)
return (a > b) - (a < b);
}
+/*
+ Function: gdImageColorReplaceArray
+*/
BGD_DECLARE(int) gdImageColorReplaceArray (gdImagePtr im, int len, int *src, int *dst)
{
register int x, y;
@@ -904,6 +956,9 @@ BGD_DECLARE(int) gdImageColorReplaceArray (gdImagePtr im, int len, int *src, int
return n;
}
+/*
+ Function: gdImageColorReplaceCallback
+*/
BGD_DECLARE(int) gdImageColorReplaceCallback (gdImagePtr im, gdCallbackImageColor callback)
{
int c, d, n = 0;
@@ -1029,6 +1084,9 @@ clip_1d (int *x0, int *y0, int *x1, int *y1, int mindim, int maxdim)
/* end of line clipping code */
+/*
+ Function: gdImageSetPixel
+*/
BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color)
{
int p;
@@ -1220,6 +1278,9 @@ gdImageTileApply (gdImagePtr im, int x, int y)
}
}
+/*
+ Function: gdImageGetPixel
+*/
BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y)
{
if (gdImageBoundsSafeMacro (im, x, y)) {
@@ -1233,6 +1294,9 @@ BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y)
}
}
+/*
+ Function: gdImageGetTrueColorPixel
+*/
BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
{
int p = gdImageGetPixel (im, x, y);
@@ -1245,9 +1309,13 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
}
}
+/*
+ Function: gdImageAABlend
+
+ NO-OP, kept for library compatibility.
+*/
BGD_DECLARE(void) gdImageAABlend (gdImagePtr im)
{
- /* NO-OP, kept for library compatibility. */
(void)im;
}
@@ -1294,7 +1362,11 @@ static void gdImageVLine(gdImagePtr im, int x, int y1, int y2, int col)
return;
}
-/* Bresenham as presented in Foley & Van Dam */
+/*
+ Function: gdImageLine
+
+ Bresenham as presented in Foley & Van Dam.
+*/
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;
@@ -1462,6 +1534,9 @@ BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, in
static void dashedSet (gdImagePtr im, int x, int y, int color,
int *onP, int *dashStepP, int wid, int vert);
+/*
+ Function: gdImageDashedLine
+*/
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;
@@ -1603,11 +1678,17 @@ dashedSet (gdImagePtr im, int x, int y, int color,
*onP = on;
}
+/*
+ Function: gdImageBoundsSafe
+*/
BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y)
{
return gdImageBoundsSafeMacro (im, x, y);
}
+/*
+ Function: gdImageChar
+*/
BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
{
int cx, cy;
@@ -1634,6 +1715,9 @@ BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
}
}
+/*
+ Function: gdImageCharUp
+*/
BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
{
int cx, cy;
@@ -1660,6 +1744,9 @@ BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c
}
}
+/*
+ Function: gdImageString
+*/
BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned char *s, int color)
{
@@ -1672,6 +1759,9 @@ BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f,
}
}
+/*
+ Function: gdImageStringUp
+*/
BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned char *s, int color)
{
@@ -1686,6 +1776,9 @@ BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
static int strlen16 (unsigned short *s);
+/*
+ Function: gdImageString16
+*/
BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned short *s, int color)
{
@@ -1698,6 +1791,9 @@ BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f,
}
}
+/*
+ Function: gdImageStringUp16
+*/
BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned short *s, int color)
{
@@ -1738,12 +1834,18 @@ lsqrt (long n)
cx and cy are the center in pixels; w and h are the horizontal
and vertical diameter in pixels. */
+/*
+ Function: gdImageArc
+*/
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);
}
+/*
+ Function: gdImageFilledArc
+*/
BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
int color, int style)
{
@@ -1844,6 +1946,9 @@ BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h,
}
}
+/*
+ Function: gdImageEllipse
+*/
BGD_DECLARE(void) gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c)
{
int x=0,mx1=0,mx2=0,my1=0,my2=0;
@@ -1888,6 +1993,9 @@ BGD_DECLARE(void) gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, in
}
+/*
+ Function: gdImageFilledEllipse
+*/
BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
{
int x=0,mx1=0,mx2=0,my1=0,my2=0;
@@ -1941,6 +2049,9 @@ BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, in
}
}
+/*
+ Function: gdImageFillToBorder
+*/
BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
{
int lastBorder;
@@ -2086,6 +2197,10 @@ struct seg {
{sp--; Y = sp->y+(DY = sp->dy); XL = sp->xl; XR = sp->xr;}
static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc);
+
+/*
+ Function: gdImageFill
+*/
BGD_DECLARE(void) gdImageFill(gdImagePtr im, int x, int y, int nc)
{
int l, x1, x2, dy;
@@ -2279,6 +2394,9 @@ skip:
gdFree(stack);
}
+/*
+ Function: gdImageRectangle
+*/
BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
{
int thick = im->thick;
@@ -2450,12 +2568,18 @@ static void _gdImageFilledVRectangle (gdImagePtr im, int x1, int y1, int x2, int
}
}
+/*
+ Function: gdImageFilledRectangle
+*/
BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
int color)
{
_gdImageFilledVRectangle(im, x1, y1, x2, y2, color);
}
+/*
+ Function: gdImageClone
+*/
BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
gdImagePtr dst;
register int i, x;
@@ -2551,6 +2675,9 @@ BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src) {
return dst;
}
+/*
+ Function: gdImageCopy
+*/
BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX,
int srcY, int w, int h)
{
@@ -2638,8 +2765,12 @@ BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dst
}
}
-/* This function is a substitute for real alpha channel operations,
- so it doesn't pay attention to the alpha channel. */
+/*
+ Function: gdImageCopyMerge
+
+ This function is a substitute for real alpha channel operations,
+ so it doesn't pay attention to the alpha channel.
+*/
BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
int srcX, int srcY, int w, int h, int pct)
{
@@ -2682,8 +2813,12 @@ BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, in
}
}
-/* This function is a substitute for real alpha channel operations,
- so it doesn't pay attention to the alpha channel. */
+/*
+ Function: gdImageCopyMergeGray
+
+ This function is a substitute for real alpha channel operations,
+ so it doesn't pay attention to the alpha channel.
+*/
BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
int srcX, int srcY, int w, int h, int pct)
{
@@ -2742,6 +2877,9 @@ BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX
}
}
+/*
+ Function: gdImageCopyResized
+*/
BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
int srcX, int srcY, int dstW, int dstH, int srcW,
int srcH)
@@ -2878,6 +3016,9 @@ BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX,
coordinates allow accurate rotation of
objects of odd-numbered width or height. */
+/*
+ Function: gdImageCopyRotated
+*/
BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
gdImagePtr src,
double dstX, double dstY,
@@ -2961,6 +3102,9 @@ BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
#define floor2(exp) ((long) exp)
/*#define floor2(exp) floor(exp)*/
+/*
+ Function: gdImageCopyResampled
+*/
BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
gdImagePtr src,
int dstX, int dstY,
@@ -3063,6 +3207,9 @@ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
}
}
+/*
+ Function: gdImagePolygon
+*/
BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
if (n <= 0) {
@@ -3074,6 +3221,9 @@ BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
gdImageOpenPolygon (im, p, n, c);
}
+/*
+ Function: gdImageOpenPolygon
+*/
BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
int i;
@@ -3101,6 +3251,9 @@ BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
/* That could help to adjust intersections to produce a nice */
/* interior_extrema. */
+/*
+ Function: gdImageFilledPolygon
+*/
BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
int i;
@@ -3244,6 +3397,9 @@ BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int
static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int t);
+/*
+ Function: gdImageSetStyle
+*/
BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
{
if (im->style) {
@@ -3261,11 +3417,17 @@ BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
im->stylePos = 0;
}
+/*
+ Function: gdImageSetThickness
+*/
BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness)
{
im->thick = thickness;
}
+/*
+ Function: gdImageSetBrush
+*/
BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
{
int i;
@@ -3283,6 +3445,9 @@ BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
}
}
+/*
+ Function: gdImageSetTile
+*/
BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile)
{
int i;
@@ -3300,6 +3465,9 @@ BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile)
}
}
+/*
+ Function: gdImageSetAntiAliased
+*/
BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c)
{
im->AA = 1;
@@ -3307,6 +3475,9 @@ BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c)
im->AA_dont_blend = -1;
}
+/*
+ Function: gdImageSetAntiAliasedDontBlend
+*/
BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend)
{
im->AA = 1;
@@ -3314,11 +3485,17 @@ BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont
im->AA_dont_blend = dont_blend;
}
+/*
+ Function: gdImageInterlace
+*/
BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg)
{
im->interlace = interlaceArg;
}
+/*
+ Function: gdImageCompare
+*/
BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2)
{
int x, y;
@@ -3401,6 +3578,9 @@ BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2)
of gdAlphaBlend(), which merges alpha in the
destination color much better. */
+/*
+ Function: gdAlphaBlend
+*/
BGD_DECLARE(int) gdAlphaBlend (int dst, int src)
{
int src_alpha = gdTrueColorGetAlpha(src);
@@ -3447,6 +3627,10 @@ BGD_DECLARE(int) gdAlphaBlend (int dst, int src)
}
static int gdAlphaOverlayColor (int src, int dst, int max );
+
+/*
+ Function: gdLayerOverlay
+*/
BGD_DECLARE(int) gdLayerOverlay (int dst, int src)
{
int a1, a2;
@@ -3472,7 +3656,11 @@ static int gdAlphaOverlayColor (int src, int dst, int max )
}
}
-/* Apply 'multiply' effect */
+/*
+ Function: gdLayerMultiply
+
+ Apply 'multiply' effect.
+*/
BGD_DECLARE(int) gdLayerMultiply (int dst, int src)
{
int a1, a2, r1, r2, g1, g2, b1, b2;
@@ -3495,16 +3683,25 @@ BGD_DECLARE(int) gdLayerMultiply (int dst, int src)
);
}
+/*
+ Function: gdImageAlphaBlending
+*/
BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg)
{
im->alphaBlendingFlag = alphaBlendingArg;
}
+/*
+ Function: gdImageSaveAlpha
+*/
BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
{
im->saveAlphaFlag = saveAlphaArg;
}
+/*
+ Function: gdImageSetClip
+*/
BGD_DECLARE(void) gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
{
if (x1 < 0) {
@@ -3537,6 +3734,9 @@ BGD_DECLARE(void) gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2)
im->cy2 = y2;
}
+/*
+ Function: gdImageGetClip
+*/
BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P)
{
*x1P = im->cx1;
@@ -3545,6 +3745,9 @@ BGD_DECLARE(void) gdImageGetClip (gdImagePtr im, int *x1P, int *y1P, int *x2P, i
*y2P = im->cy2;
}
+/*
+ Function: gdImageSetResolution
+*/
BGD_DECLARE(void) gdImageSetResolution(gdImagePtr im, const unsigned int res_x, const unsigned int res_y)
{
if (res_x > 0) im->res_x = res_x;
@@ -3702,7 +3905,11 @@ static void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int co
}
-/* convert a palette image to true color */
+/*
+ Function: gdImagePaletteToTrueColor
+
+ Convert a palette image to true color.
+*/
BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src)
{
unsigned int y;
diff --git a/src/gd_bmp.c b/src/gd_bmp.c
index 275cdda..e1194c5 100644
--- a/src/gd_bmp.c
+++ b/src/gd_bmp.c
@@ -60,6 +60,9 @@ static int gdBMPPutInt(gdIOCtx *out, int w)
return 0;
}
+/*
+ Function: gdImageBmpPtr
+*/
BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
{
void *rv;
@@ -71,6 +74,9 @@ BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
return rv;
}
+/*
+ Function: gdImageBmp
+*/
BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -79,6 +85,9 @@ BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression)
out->gd_free(out);
}
+/*
+ Function: gdImageBmpCtx
+*/
BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
{
int bitmap_size = 0, info_size, total_size, padding;
@@ -397,6 +406,9 @@ static int build_rle_packet(unsigned char *row, int packet_type, int length, uns
return compressed_size;
}
+/*
+ Function: gdImageCreateFromBmp
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromBmp(FILE * inFile)
{
gdImagePtr im = 0;
@@ -407,6 +419,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromBmp(FILE * inFile)
return im;
}
+/*
+ Function: gdImageCreateFromBmpPtr
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpPtr(int size, void *data)
{
gdImagePtr im;
@@ -417,6 +432,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpPtr(int size, void *data)
return im;
}
+/*
+ Function: gdImageCreateFromBmpCtx
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpCtx(gdIOCtxPtr infile)
{
bmp_hdr_t *hdr;
diff --git a/src/gd_color_map.c b/src/gd_color_map.c
index ff48399..46f3bfa 100644
--- a/src/gd_color_map.c
+++ b/src/gd_color_map.c
@@ -767,6 +767,9 @@ BGD_EXPORT_DATA_PROT gdColorMap GD_COLOR_MAP_X11 = {
(gdColorMapEntry *)GD_COLOR_MAP_X11_ENTRIES
};
+/*
+ Function: gdColorMapLookup
+*/
BGD_DECLARE(int)
gdColorMapLookup(const gdColorMap color_map, const char *color_name, int *r, int *g, int *b)
{
diff --git a/src/gd_color_match.c b/src/gd_color_match.c
index 5f0fd0a..f0842b6 100644
--- a/src/gd_color_match.c
+++ b/src/gd_color_match.c
@@ -5,8 +5,10 @@
#include "gd.h"
#include "gdhelpers.h"
-/* bring the palette colors in im2 to be closer to im1
- *
+/*
+ Function: gdImageColorMatch
+
+ Bring the palette colors in im2 to be closer to im1.
*/
BGD_DECLARE(int) gdImageColorMatch (gdImagePtr im1, gdImagePtr im2)
{
diff --git a/src/gd_crop.c b/src/gd_crop.c
index d51ad67..6cca819 100644
--- a/src/gd_crop.c
+++ b/src/gd_crop.c
@@ -18,6 +18,9 @@
static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color);
+/*
+ Function: gdImageCrop
+ */
BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop)
{
gdImagePtr dst;
@@ -29,6 +32,9 @@ BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop)
return dst;
}
+/*
+ Function: gdImageCropAuto
+ */
BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode)
{
const int width = gdImageSX(im);
@@ -117,6 +123,9 @@ BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode)
return gdImageCrop(im, &crop);
}
+/*
+ Function: gdImageCropThreshold
+ */
BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold)
{
const int width = gdImageSX(im);
diff --git a/src/gd_filter.c b/src/gd_filter.c
index 3ea8732..d3a5918 100644
--- a/src/gd_filter.c
+++ b/src/gd_filter.c
@@ -34,6 +34,9 @@ typedef int (BGD_STDCALL *FuncPtr)(gdImagePtr, int, int);
# define GD_SCATTER_SEED() (unsigned int)(time(0) * getpid())
#endif
+/*
+ Function: gdImageScatter
+ */
BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus)
{
gdScatter s;
@@ -45,6 +48,9 @@ BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus)
return gdImageScatterEx(im, &s);
}
+/*
+ Function: gdImageScatterColor
+ */
BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors)
{
gdScatter s;
@@ -57,6 +63,9 @@ BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int color
return gdImageScatterEx(im, &s);
}
+/*
+ Function: gdImageScatterEx
+ */
BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr scatter)
{
register int x, y;
@@ -116,6 +125,9 @@ BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr scatter)
return 1;
}
+/*
+ Function: gdImagePixelate
+ */
BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode)
{
int x, y;
@@ -172,7 +184,11 @@ BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned i
return 1;
}
-/* invert src image */
+/*
+ Function: gdImageNegate
+
+ Invert src image.
+ */
BGD_DECLARE(int) gdImageNegate(gdImagePtr src)
{
int x, y;
@@ -204,7 +220,11 @@ BGD_DECLARE(int) gdImageNegate(gdImagePtr src)
return 1;
}
-/* Convert the image src to a grayscale image */
+/*
+ Function: gdImageGrayScale
+
+ Convert the image src to a grayscale image.
+ */
BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src)
{
int x, y;
@@ -237,7 +257,11 @@ BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src)
return 1;
}
-/* Set the brightness level <level> for the image src */
+/*
+ Function: gdImageBrightness
+
+ Set the brightness level <level> for the image src.
+ */
BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness)
{
int x, y;
@@ -283,6 +307,9 @@ BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness)
}
+/*
+ Function: gdImageContrast
+ */
BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast)
{
int x, y;
@@ -343,6 +370,9 @@ BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast)
}
+/*
+ Function: gdImageColor
+ */
BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha)
{
int x, y;
@@ -385,6 +415,9 @@ BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, co
return 1;
}
+/*
+ Function: gdImageConvolution
+ */
BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset)
{
int x, y, i, j, new_a;
@@ -445,6 +478,9 @@ BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float fi
return 1;
}
+/*
+ Function: gdImageSelectiveBlur
+ */
BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src)
{
int x, y, i, j;
@@ -563,6 +599,9 @@ BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src)
return 1;
}
+/*
+ Function: gdImageEdgeDetectQuick
+ */
BGD_DECLARE(int) gdImageEdgeDetectQuick(gdImagePtr src)
{
float filter[3][3] = {{-1.0,0.0,-1.0},
@@ -603,6 +642,9 @@ BGD_DECLARE(int) gdImageGaussianBlur(gdImagePtr im)
return gdImageConvolution(im, filter, 16, 0);
}
+/*
+ Function: gdImageEmboss
+ */
BGD_DECLARE(int) gdImageEmboss(gdImagePtr im)
{
/*
@@ -617,6 +659,9 @@ BGD_DECLARE(int) gdImageEmboss(gdImagePtr im)
return gdImageConvolution(im, filter, 1, 127);
}
+/*
+ Function: gdImageMeanRemoval
+ */
BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im)
{
float filter[3][3] = {{-1.0,-1.0,-1.0},
@@ -626,6 +671,9 @@ BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im)
return gdImageConvolution(im, filter, 1, 0);
}
+/*
+ Function: gdImageSmooth
+ */
BGD_DECLARE(int) gdImageSmooth(gdImagePtr im, float weight)
{
float filter[3][3] = {{1.0,1.0,1.0},
diff --git a/src/gd_gd.c b/src/gd_gd.c
index f8d39cb..13defa0 100644
--- a/src/gd_gd.c
+++ b/src/gd_gd.c
@@ -326,6 +326,9 @@ _gdImageGd (gdImagePtr im, gdIOCtx * out)
}
}
+/*
+ Function: gdImageGd
+ */
BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * outFile)
{
gdIOCtx *out = gdNewFileCtx (outFile);
@@ -334,6 +337,9 @@ BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * outFile)
out->gd_free (out);
}
+/*
+ Function: gdImageGdPtr
+ */
BGD_DECLARE(void *) gdImageGdPtr (gdImagePtr im, int *size)
{
void *rv;
diff --git a/src/gd_gd2.c b/src/gd_gd2.c
index 2837456..8df93c1 100644
--- a/src/gd_gd2.c
+++ b/src/gd_gd2.c
@@ -1043,6 +1043,9 @@ fail:
}
+/*
+ Function: gdImageGd2
+*/
BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
{
gdIOCtx *out = gdNewFileCtx (outFile);
@@ -1051,6 +1054,9 @@ BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
out->gd_free (out);
}
+/*
+ Function: gdImageGd2Ptr
+*/
BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size)
{
void *rv;
diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c
index 438ad41..7e7943d 100644
--- a/src/gd_interpolation.c
+++ b/src/gd_interpolation.c
@@ -1607,6 +1607,9 @@ gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width,
return dst;
}
+/*
+ Function: gdImageScale
+*/
BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height)
{
gdImagePtr im_scaled = NULL;
@@ -1793,6 +1796,9 @@ gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
return dst;
}
+/*
+ Function: gdImageRotateInterpolated
+*/
BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor)
{
/* round to two decimals and keep the 100x multiplication to use it in the common square angles
@@ -2111,6 +2117,9 @@ BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine
return GD_TRUE;
}
+/*
+ Function: gdImageSetInterpolationMethod
+*/
BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id)
{
if (im == NULL || (uintmax_t)id > GD_METHOD_COUNT) {
@@ -2193,9 +2202,13 @@ BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMet
}
-/* Return the interpolation mode set in 'im'. This is here so that
- * the value can be read via a language or VM with an FFI but no
- * (portable) way to extract the value from the struct. */
+/*
+ Function: gdImageGetInterpolationMethod
+
+ Return the interpolation mode set in 'im'. This is here so that
+ the value can be read via a language or VM with an FFI but no
+ (portable) way to extract the value from the struct.
+*/
BGD_DECLARE(gdInterpolationMethod) gdImageGetInterpolationMethod(gdImagePtr im)
{
return im->interpolation_id;
diff --git a/src/gd_io_dp.c b/src/gd_io_dp.c
index 8dbcc62..135eda3 100644
--- a/src/gd_io_dp.c
+++ b/src/gd_io_dp.c
@@ -64,13 +64,20 @@ static int dynamicGetchar(gdIOCtxPtr ctx);
static int dynamicSeek(struct gdIOCtx *, const int);
static long dynamicTell(struct gdIOCtx *);
-/* return data as a dynamic pointer */
+/*
+ Function: gdNewDynamicCtx
+
+ Return data as a dynamic pointer.
+*/
BGD_DECLARE(gdIOCtx *) gdNewDynamicCtx(int initialSize, void *data)
{
/* 2.0.23: Phil Moore: 'return' keyword was missing! */
return gdNewDynamicCtxEx(initialSize, data, 1);
}
+/*
+ Function: gdNewDynamicCtxEx
+*/
BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx(int initialSize, void *data, int freeOKFlag)
{
dpIOCtx *ctx;
@@ -103,6 +110,9 @@ BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx(int initialSize, void *data, int freeOK
return (gdIOCtx *)ctx;
}
+/*
+ Function: gdDPExtractData
+*/
BGD_DECLARE(void *) gdDPExtractData (struct gdIOCtx *ctx, int *size)
{
dynamicPtr *dp;
diff --git a/src/gd_io_file.c b/src/gd_io_file.c
index d3893e4..40c4f59 100644
--- a/src/gd_io_file.c
+++ b/src/gd_io_file.c
@@ -48,7 +48,11 @@ static int fileSeek(struct gdIOCtx *, const int);
static long fileTell(struct gdIOCtx *);
static void gdFreeFileCtx(gdIOCtx *ctx);
-/* return data as a dynamic pointer */
+/*
+ Function: gdNewFileCtx
+
+ Return data as a dynamic pointer.
+*/
BGD_DECLARE(gdIOCtx *) gdNewFileCtx(FILE *f)
{
fileIOCtx *ctx;
diff --git a/src/gd_io_ss.c b/src/gd_io_ss.c
index a0cf391..abff844 100644
--- a/src/gd_io_ss.c
+++ b/src/gd_io_ss.c
@@ -47,7 +47,11 @@ static int sinkPutbuf(gdIOCtx *ctx, const void *buf, int size);
static void sinkPutchar(gdIOCtx *ctx, int a);
static void gdFreeSsCtx(gdIOCtx *ctx);
-/* return data as a dynamic pointer */
+/*
+ Function: gdNewSSCtx
+
+ Return data as a dynamic pointer.
+*/
BGD_DECLARE(gdIOCtx *) gdNewSSCtx(gdSourcePtr src, gdSinkPtr snk)
{
ssIOCtxPtr ctx;
diff --git a/src/gd_nnquant.c b/src/gd_nnquant.c
index 5466067..d6b2b27 100644
--- a/src/gd_nnquant.c
+++ b/src/gd_nnquant.c
@@ -506,6 +506,9 @@ int verbose;
if (verbose) gd_error_ex(GD_NOTICE, "finished 1D learning: final alpha=%f !\n",((float)alpha)/initalpha);
}
+/*
+ Function: gdImageNeuQuant
+*/
BGD_DECLARE(gdImagePtr) gdImageNeuQuant(gdImagePtr im, const int max_color, int sample_factor)
{
const int newcolors = max_color;
diff --git a/src/gd_ss.c b/src/gd_ss.c
index 9098c9b..248699e 100644
--- a/src/gd_ss.c
+++ b/src/gd_ss.c
@@ -18,6 +18,9 @@
#define GD_SS_DBG(s)
#ifdef HAVE_LIBPNG
+/*
+ Function: gdImagePngToSink
+*/
BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr outSink)
{
gdIOCtx *out = gdNewSSCtx (NULL, outSink);
diff --git a/src/gd_tga.c b/src/gd_tga.c
index 7f85ea4..1705324 100644
--- a/src/gd_tga.c
+++ b/src/gd_tga.c
@@ -12,10 +12,14 @@
#include "gd_errors.h"
#include "gdhelpers.h"
-/*! \brief Creates a gdImage from a TGA file
- * Creates a gdImage from a TGA binary file via a gdIOCtx.
- * \param infile Pointer to TGA binary file
- * \return gdImagePtr
+/*
+ Function: gdImageCreateFromTga
+
+ Creates a gdImage from a TGA file
+
+ Parameters:
+
+ infile - Pointer to TGA binary file
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTga(FILE *fp)
{
@@ -27,6 +31,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTga(FILE *fp)
return image;
}
+/*
+ Function: gdImageCreateFromTgaPtr
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaPtr(int size, void *data)
{
gdImagePtr im;
@@ -38,10 +45,13 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaPtr(int size, void *data)
}
-/*! \brief Creates a gdImage from a gdIOCtx
- * Creates a gdImage from a gdIOCtx referencing a TGA binary file.
- * \param ctx Pointer to a gdIOCtx structure
- * \return gdImagePtr
+/*
+ Function: gdImageCreateFromTgaCtx
+
+ Creates a gdImage from a gdIOCtx referencing a TGA binary file.
+
+ Parameters:
+ ctx - Pointer to a gdIOCtx structure
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx)
{
diff --git a/src/gd_tiff.c b/src/gd_tiff.c
index e4fa07b..26805ff 100644
--- a/src/gd_tiff.c
+++ b/src/gd_tiff.c
@@ -408,13 +408,15 @@ void tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
}
/*
- gdImageTiffCtx
- --------------
- Write the gd image as a tiff file
- Parameters are:
- image: gd image structure;
- out: the stream where to write
- */
+ Function: gdImageTiffCtx
+
+ Write the gd image as a tiff file.
+
+ Parameters:
+
+ image - gd image structure;
+ out - the stream where to write
+*/
BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out)
{
int clipx1P, clipy1P, clipx2P, clipy2P;
@@ -782,10 +784,11 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
return GD_SUCCESS;
}
-/* gdImageCreateFromTiffCtx
-** ------------------------
-** Create a gdImage from a TIFF file input from an gdIOCtx
- */
+/*
+ Function: gdImageCreateFromTiffCtx
+
+ Create a gdImage from a TIFF file input from an gdIOCtx.
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile)
{
TIFF *tif;
@@ -991,9 +994,9 @@ error:
return im;
}
-/* gdImageCreateFromTIFF
-** ---------------------
- */
+/*
+ Function: gdImageCreateFromTIFF
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile)
{
gdImagePtr im;
@@ -1004,6 +1007,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile)
return im;
}
+/*
+ Function: gdImageCreateFromTiffPtr
+*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data)
{
gdImagePtr im;
@@ -1014,9 +1020,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data)
return im;
}
-/* gdImageTIFF
-** -----------
- */
+/*
+ Function: gdImageTiff
+*/
BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -1025,9 +1031,9 @@ BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile)
out->gd_free(out);
}
-/* gdImageTIFFPtr
-** --------------
- */
+/*
+ Function: gdImageTiffPtr
+*/
BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size)
{
void *rv;
diff --git a/src/gd_topal.c b/src/gd_topal.c
index b094bed..7ff835a 100644
--- a/src/gd_topal.c
+++ b/src/gd_topal.c
@@ -1366,12 +1366,14 @@ zeroHistogram (hist3d histogram)
/*
- Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
- See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ).
- Speed is from 1 (highest quality) to 10 (fastest).
- Speed 0 selects method-specific default (recommended).
+ Function: gdImageTrueColorToPaletteSetMethod
- Returns FALSE if the given method is invalid or not available.
+ Selects quantization method used for subsequent gdImageTrueColorToPalette calls.
+ See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ).
+ Speed is from 1 (highest quality) to 10 (fastest).
+ Speed 0 selects method-specific default (recommended).
+
+ Returns FALSE if the given method is invalid or not available.
*/
BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed)
{
@@ -1393,11 +1395,13 @@ BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method,
}
/*
- Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
- Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min.
- If palette cannot represent image with at least min_quality, then image will remain true-color.
- If palette can represent image with quality better than max_quality, then lower number of colors will be used.
- This function has effect only when GD_QUANT_LIQ method has been selected.
+ Function: gdImageTrueColorToPaletteSetQuality
+
+ Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for.
+ Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min.
+ If palette cannot represent image with at least min_quality, then image will remain true-color.
+ If palette can represent image with quality better than max_quality, then lower number of colors will be used.
+ This function has effect only when GD_QUANT_LIQ method has been selected.
*/
BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality)
{
@@ -1410,6 +1414,9 @@ BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_qu
static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colorsWanted, gdImagePtr *cimP);
+/*
+ Function: gdImageCreatePaletteFromTrueColor
+*/
BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int dither, int colorsWanted)
{
gdImagePtr nim;
@@ -1419,6 +1426,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int di
return NULL;
}
+/*
+ Function: gdImageTrueColorToPalette
+*/
BGD_DECLARE(int) gdImageTrueColorToPalette (gdImagePtr im, int dither, int colorsWanted)
{
return gdImageTrueColorToPaletteBody(im, dither, colorsWanted, 0);
diff --git a/src/gd_transform.c b/src/gd_transform.c
index 3841e3e..a126686 100644
--- a/src/gd_transform.c
+++ b/src/gd_transform.c
@@ -4,6 +4,9 @@
#include "gd.h"
+/*
+ Function: gdImageFlipVertical
+*/
BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im)
{
register int x, y;
@@ -32,6 +35,9 @@ BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im)
return;
}
+/*
+ Function: gdImageFlipHorizontal
+*/
BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im)
{
@@ -68,6 +74,9 @@ BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im)
}
}
+/*
+ Function: gdImageFlipBoth
+*/
BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im)
{
gdImageFlipVertical(im);
diff --git a/src/gd_version.c b/src/gd_version.c
index 222d428..46725b0 100644
--- a/src/gd_version.c
+++ b/src/gd_version.c
@@ -9,25 +9,40 @@
* so that changes in the shared library will automatically be
* reflected in executables using it without recompiling them. */
+/*
+ Function: gdMajorVersion
+*/
BGD_DECLARE(int) gdMajorVersion()
{
return GD_MAJOR_VERSION;
}
+/*
+ Function: gdMinorVersion
+*/
BGD_DECLARE(int) gdMinorVersion()
{
return GD_MINOR_VERSION;
}
+/*
+ Function: gdReleaseVersion
+*/
BGD_DECLARE(int) gdReleaseVersion()
{
return GD_RELEASE_VERSION;
}
+/*
+ Function: gdExtraVersion
+*/
BGD_DECLARE(const char *) gdExtraVersion() {
return GD_EXTRA_VERSION;
}
+/*
+ Function: gdVersionString
+*/
BGD_DECLARE(const char *) gdVersionString() {
return GD_VERSION_STRING;
}
diff --git a/src/gd_wbmp.c b/src/gd_wbmp.c
index 53fbdc2..d9de591 100644
--- a/src/gd_wbmp.c
+++ b/src/gd_wbmp.c
@@ -82,15 +82,17 @@ int gd_getin(void *in)
return (gdGetC((gdIOCtx *)in));
}
-/* gdImageWBMPCtx
- * --------------
- * Write the image as a wbmp file
- * Parameters are:
- * image: gd image structure;
- * fg: the index of the foreground color. any other value will be
- * considered as background and will not be written
- * out: the stream where to write
- */
+/*
+ Function: gdImageWBMPCtx
+
+ Write the image as a wbmp file
+
+ Parameters:
+ image - gd image structure
+ fg - the index of the foreground color. any other value will be
+ considered as background and will not be written
+ out - the stream where to write
+*/
BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out)
{
int x, y, pos;
@@ -242,8 +244,9 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPPtr(int size, void *data)
return im;
}
-/* gdImageWBMP
- */
+/*
+ Function: gdImageWBMP
+*/
BGD_DECLARE(void) gdImageWBMP(gdImagePtr im, int fg, FILE *outFile)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -252,8 +255,9 @@ BGD_DECLARE(void) gdImageWBMP(gdImagePtr im, int fg, FILE *outFile)
out->gd_free(out);
}
-/* gdImageWBMPPtr
- */
+/*
+ Function: gdImageWBMPPtr
+*/
BGD_DECLARE(void *) gdImageWBMPPtr(gdImagePtr im, int *size, int fg)
{
void *rv;
diff --git a/src/gd_webp.c b/src/gd_webp.c
index 7202c42..98628cf 100644
--- a/src/gd_webp.c
+++ b/src/gd_webp.c
@@ -160,6 +160,9 @@ freeargb:
gdFree(argb);
}
+/*
+ Function: gdImageWebpEx
+*/
BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -170,6 +173,9 @@ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization
out->gd_free(out);
}
+/*
+ Function: gdImageWebp
+*/
BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -180,6 +186,9 @@ BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
out->gd_free(out);
}
+/*
+ Function: gdImageWebpPtr
+*/
BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size)
{
void *rv;
@@ -194,6 +203,9 @@ BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size)
return rv;
}
+/*
+ Function: gdImageWebpPtrEx
+*/
BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization)
{
void *rv;
diff --git a/src/gd_xbm.c b/src/gd_xbm.c
index 4110e20..58b5720 100644
--- a/src/gd_xbm.c
+++ b/src/gd_xbm.c
@@ -195,6 +195,9 @@ static void gdCtxPrintf(gdIOCtx * out, const char *format, ...)
#define gdCtxPuts(out, s) out->putBuf(out, s, strlen(s))
/* {{{ gdImageXbmCtx */
+/*
+ Function: gdImageXbmCtx
+*/
BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out)
{
int x, y, c, b, sx, sy, p;
diff --git a/src/gdfontg.c b/src/gdfontg.c
index 3717860..04f3362 100644
--- a/src/gdfontg.c
+++ b/src/gdfontg.c
@@ -4382,6 +4382,9 @@ gdFont gdFontGiantRep = {
BGD_EXPORT_DATA_PROT gdFontPtr gdFontGiant = &gdFontGiantRep;
+/*
+ Function: gdFontGetGiant
+*/
BGD_DECLARE(gdFontPtr) gdFontGetGiant (void)
{
return gdFontGiant;
diff --git a/src/gdfontl.c b/src/gdfontl.c
index a987407..8501b5f 100644
--- a/src/gdfontl.c
+++ b/src/gdfontl.c
@@ -4639,6 +4639,9 @@ gdFont gdFontLargeRep = {
BGD_EXPORT_DATA_PROT gdFontPtr gdFontLarge = &gdFontLargeRep;
+/*
+ Function: gdFontGetLarge
+*/
BGD_DECLARE(gdFontPtr)
gdFontGetLarge (void)
{
diff --git a/src/gdfontmb.c b/src/gdfontmb.c
index 349b2db..566cc6d 100644
--- a/src/gdfontmb.c
+++ b/src/gdfontmb.c
@@ -3869,6 +3869,9 @@ gdFont gdFontMediumBoldRep = {
BGD_EXPORT_DATA_PROT gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
+/*
+ Function: gdFontGetMediumBold
+*/
BGD_DECLARE(gdFontPtr)
gdFontGetMediumBold (void)
{
diff --git a/src/gdfonts.c b/src/gdfonts.c
index f7c2725..f84b2ee 100644
--- a/src/gdfonts.c
+++ b/src/gdfonts.c
@@ -3867,6 +3867,9 @@ gdFont gdFontSmallRep = {
BGD_EXPORT_DATA_PROT gdFontPtr gdFontSmall = &gdFontSmallRep;
+/*
+ Function: gdFontGetSmall
+*/
BGD_DECLARE(gdFontPtr)
gdFontGetSmall (void)
{
diff --git a/src/gdfontt.c b/src/gdfontt.c
index c9c6f4a..3c97c4d 100644
--- a/src/gdfontt.c
+++ b/src/gdfontt.c
@@ -2590,6 +2590,9 @@ gdFont gdFontTinyRep = {
BGD_EXPORT_DATA_PROT gdFontPtr gdFontTiny = &gdFontTinyRep;
+/*
+ Function: gdFontGetTiny
+*/
BGD_DECLARE(gdFontPtr)
gdFontGetTiny (void)
{
diff --git a/src/gdft.c b/src/gdft.c
index 6f56ef9..9661f2b 100644
--- a/src/gdft.c
+++ b/src/gdft.c
@@ -92,6 +92,9 @@ static char *font_path(char **fontpath, char *name_list);
#define TRUE !FALSE
#endif
+/*
+ Function: gdImageStringTTF
+*/
BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
double ptsize, double angle, int x, int y, char *string)
{
@@ -866,11 +869,17 @@ gdft_draw_bitmap (gdCache_head_t * tc_cache, gdImage * im, int fg,
return (char *) NULL;
}
+/*
+ Function: gdFreeFontCache
+*/
BGD_DECLARE(void) gdFreeFontCache ()
{
gdFontCacheShutdown ();
}
+/*
+ Function: gdFontCacheShutdown
+*/
BGD_DECLARE(void) gdFontCacheShutdown ()
{
if (fontCache) {
@@ -884,9 +893,11 @@ BGD_DECLARE(void) gdFontCacheShutdown ()
}
}
-/********************************************************************/
-/* gdImageStringFT - render a utf8 string onto a gd image */
+/*
+ Function: gdImageStringFT
+ Render a utf8 string onto a gd image.
+*/
BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
double ptsize, double angle, int x, int y, char *string)
{
@@ -894,6 +905,9 @@ BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fon
ptsize, angle, x, y, string, 0);
}
+/*
+ Function: gdFontCacheSetup
+*/
BGD_DECLARE(int) gdFontCacheSetup (void)
{
if (fontCache) {
@@ -1842,6 +1856,9 @@ static char * font_path(char **fontpath, char *name_list)
return NULL;
}
+/*
+ Function: gdFTUseFontConfig
+*/
BGD_DECLARE(int) gdFTUseFontConfig(int flag)
{
#ifdef HAVE_LIBFONTCONFIG
diff --git a/src/gdfx.c b/src/gdfx.c
index 4bb68d9..f145de0 100644
--- a/src/gdfx.c
+++ b/src/gdfx.c
@@ -25,6 +25,9 @@
#define MAXY(x) MAX4(x[1],x[3],x[5],x[7])
#define MINY(x) MIN4(x[1],x[3],x[5],x[7])
+/*
+ Function: gdImageStringFTCircle
+*/
BGD_DECLARE(char *)
gdImageStringFTCircle (gdImagePtr im,
int cx,
@@ -254,6 +257,9 @@ main (int argc, char *argv[])
#define SUPERBITS1 1
#define SUPERBITS2 2
+/*
+ Function: gdImageSquareToCircle
+*/
BGD_DECLARE(gdImagePtr)
gdImageSquareToCircle (gdImagePtr im, int radius)
{
@@ -381,16 +387,18 @@ gdImageSubSharpen (int pc, int c, int nc, float inner_coeff, float
}
/*
- * Sharpen function added on 2003-11-19
- * by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
- * Simple 3x3 convolution kernel
- * Makes use of seperability
- * Faster, but less flexible, than full-blown unsharp masking
- * pct is sharpening percentage, and can be greater than 100
- * Silently does nothing to non-truecolor images
- * Silently does nothing for pct<0, as not a useful blurring function
- * Leaves transparency/alpha-channel untouched
- */
+ Function: gdImageSharpen
+
+ Sharpen function added on 2003-11-19
+ by Paul Troughton (paul<dot>troughton<at>ieee<dot>org)
+ Simple 3x3 convolution kernel
+ Makes use of seperability
+ Faster, but less flexible, than full-blown unsharp masking
+ pct is sharpening percentage, and can be greater than 100
+ Silently does nothing to non-truecolor images
+ Silently does nothing for pct<0, as not a useful blurring function
+ Leaves transparency/alpha-channel untouched
+*/
BGD_DECLARE(void)
gdImageSharpen (gdImagePtr im, int pct)
{
diff --git a/src/gdhelpers.c b/src/gdhelpers.c
index 3c063d9..c371e78 100644
--- a/src/gdhelpers.c
+++ b/src/gdhelpers.c
@@ -90,6 +90,9 @@ gdReallocEx (void *ptr, size_t size)
return newPtr;
}
+/*
+ Function: gdFree
+*/
BGD_DECLARE(void) gdFree (void *ptr)
{
free (ptr);