summaryrefslogtreecommitdiff
path: root/src/gd.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-09-15 23:36:49 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-09-15 23:36:49 +0200
commit0423df113159fb6fd0db3b4b31ad13392d4d6421 (patch)
treee06d7124ab83143cd24474cb6ddb8b46936cd069 /src/gd.c
parent466d440002087db9b15f94325258599ef893c9e8 (diff)
downloadlibgd-0423df113159fb6fd0db3b4b31ad13392d4d6421.tar.gz
Improve documentation
Diffstat (limited to 'src/gd.c')
-rw-r--r--src/gd.c90
1 files changed, 72 insertions, 18 deletions
diff --git a/src/gd.c b/src/gd.c
index c475f85..612e498 100644
--- a/src/gd.c
+++ b/src/gd.c
@@ -698,6 +698,7 @@ BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b)
*
* See also:
* - <gdImageColorClosestAlpha>
+ * - <gdTrueColorAlpha>
*/
BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
{
@@ -3432,9 +3433,21 @@ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
* Group: Polygons
*/
-/*
- Function: gdImagePolygon
-*/
+/**
+ * Function: gdImagePolygon
+ *
+ * Draws a closed polygon
+ *
+ * Parameters:
+ * im - The image.
+ * p - The vertices as array of <gdPoint>s.
+ * n - The number of vertices.
+ * c - The color.
+ *
+ * See also:
+ * - <gdImageOpenPolygon>
+ * - <gdImageFilledPolygon>
+ */
BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
if (n <= 0) {
@@ -3446,9 +3459,20 @@ BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
gdImageOpenPolygon (im, p, n, c);
}
-/*
- Function: gdImageOpenPolygon
-*/
+/**
+ * Function: gdImageOpenPolygon
+ *
+ * Draws an open polygon
+ *
+ * Parameters:
+ * im - The image.
+ * p - The vertices.
+ * n - The number of vertices as array of <gdPoint>s.
+ * c - The color
+ *
+ * See also:
+ * - <gdImagePolygon>
+ */
BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
int i;
@@ -3476,9 +3500,20 @@ 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
-*/
+/**
+ * Function: gdImageFilledPolygon
+ *
+ * Draws a filled polygon
+ *
+ * Parameters:
+ * im - The image.
+ * p - The vertices as array of <gdPoint>s.
+ * n - The number of vertices.
+ * c - The color
+ *
+ * See also:
+ * - <gdImagePolygon>
+ */
BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
{
int i;
@@ -3626,9 +3661,16 @@ 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
-*/
+/**
+ * Function: gdImageSetStyle
+ *
+ * Sets the style for following drawing operations
+ *
+ * Parameters:
+ * im - The image.
+ * style - An array of color values.
+ * noOfPixel - The number of color values.
+ */
BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
{
if (im->style) {
@@ -3646,17 +3688,29 @@ BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels)
im->stylePos = 0;
}
-/*
- Function: gdImageSetThickness
-*/
+/**
+ * Function: gdImageSetThickness
+ *
+ * Sets the thickness for following drawing operations
+ *
+ * Parameters:
+ * im - The image.
+ * thickness - The thickness in pixels.
+ */
BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness)
{
im->thick = thickness;
}
-/*
- Function: gdImageSetBrush
-*/
+/**
+ * Function: gdImageSetBrush
+ *
+ * Sets the brush for following drawing operations
+ *
+ * Parameters:
+ * im - The image.
+ * brush - The brush image.
+ */
BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush)
{
int i;