Chris Reuter avatar 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.

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;
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.