Commits

Chris Reuter committed bb1d4a0

Added documention for gdImageCreate() and type gdImage.

This change adds naturaldoc comments for the above function and type.
Text was adapted from the 2.0.36 manual.

It also fixes the formatting of the comment for gdInterpolationMethod
so that naturaldoc will extract it.

  • Participants
  • Parent commits 3c1202e

Comments (0)

Files changed (2)

 static void gdImageTileApply (gdImagePtr im, int x, int y);
 BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
 
+
+/*
+    Function: gdImageCreate
+
+    gdImageCreate is called to create palette-based images, with no
+    more than 256 colors. The image must eventually be destroyed using
+    gdImageDestroy().
+
+    >   ... inside a function ...
+    >   gdImagePtr im;
+    >   im = gdImageCreate(64, 64);
+    >   // ... Use the image ...
+    >   gdImageDestroy(im);
+
+    Parameters:
+
+        sx - The image width.
+        sy - The image height.
+
+    Returns:
+
+        A pointer to the new image or NULL if an error occurred.
+
+    See Also:
+
+        <gdImageCreateTrueColor>        
+
+ */
 BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy)
 {
 	int i;
 extern "C" {
 #endif
 
+
 #ifndef GD_H
 #define GD_H 1
 
  * Group: Transform
  *
  * Constants: gdInterpolationMethod
-
+ *
  *  GD_BELL				 - Bell
  *  GD_BESSEL			 - Bessel
  *  GD_BILINEAR_FIXED 	 - fixed point bilinear 
 /* Interpolation function ptr */
 typedef double (* interpolation_method )(double);
 
+
+/*
+   Group: Types
+ 
+   typedef: gdImage
+
+   typedef: gdImagePtr
+
+   The data structure in which gd stores images. <gdImageCreate>,
+   <gdImageCreateTrueColor> and the various image file-loading functions
+   return a pointer to this type, and the other functions expect to
+   receive a pointer to this type as their first argument.
+
+   *gdImagePtr* is a pointer to *gdImage*.
+
+   (Previous versions of this library encouraged directly manipulating
+   the contents ofthe struct but we are attempting to move away from
+   this practice so the fields are no longer documented here.  If you
+   need to poke at the internals of this struct, feel free to look at
+   *gd.h*.)
+*/
 typedef struct gdImageStruct {
 	/* Palette-based image pixels */
 	unsigned char **pixels;