<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>DOCUMENTATION.mkd</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -12,10 +12,6 @@ typedef Imlib_Color_Range Gradient;
 typedef ImlibPolygon Polygon;
 typedef Imlib_Font Font;
 
-/*?lua
-lib_name = &quot;lua-imlib2&quot;
-?*/
-
 static struct { const char *fmtstr; Imlib_Load_Error errno; } err_strings[] = {
   {&quot;file '%s' does not exist&quot;, IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST},
   {&quot;file '%s' is a directory&quot;, IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY},
@@ -44,13 +40,7 @@ static int push_load_error_str(lua_State *L, Imlib_Load_Error err, const char *f
   return 1;
 }
 
-/**
- * @@module imlib2.color : Represent colors in rgba format.
- * Each instance of imlib2.color has the modifiable fields red, green, blue 
- * and alpha. An error will be raised on an attempt to set them to a value 
- * outside of the range 0 &amp;lt;= x &amp;lt;= 255.  Non-integer values will be 
- * truncated.
- */
+/* imlib2.color */
 
 static Imlib_Color *push_Color(lua_State *L) {
   Imlib_Color *c = (Imlib_Color*)lua_newuserdata(L, sizeof(Imlib_Color));
@@ -62,13 +52,7 @@ static Imlib_Color *push_Color(lua_State *L) {
 #define check_color(L,n)\
   (Imlib_Color*)luaL_checkudata(L, n, &quot;imlib2.color&quot;)
 
-/**
- * color.new(red, green, blue[, alpha]) : Creates a new color.
- * An error will be raised unless red, green, blue and alpha are in the range 
- * 0 &amp;lt; x &amp;lt;= 255
- *
- * @constructor
- */
+/* color.new(red, green, blue[, alpha]) */
 static int color_new(lua_State *L) {
   Imlib_Color *c;
   int i;
@@ -91,8 +75,7 @@ static int color_new(lua_State *L) {
 #define set_color(c)\
   imlib_context_set_color(c-&gt;red, c-&gt;green, c-&gt;blue, c-&gt;alpha)
 
-/*** imlib2.color metamethods ***/
-
+/* col:__tostring() */
 static int colorm_tostring(lua_State *L) {
   Imlib_Color *c = check_color(L,1);
   lua_pushfstring(L, &quot;&lt;imlib2.color r=%d g=%d b=%d a=%d&gt; (%p)&quot;,
@@ -100,26 +83,7 @@ static int colorm_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * @field col.red : get/set the red field
- * Raises an exception if you try to set the value outside of the range 0-255 
- * inclusive.
- */
-/**
- * @field col.green : get/set the red field
- * Raises an exception if you try to set the value outside of the range 0-255 
- * inclusive.
- */
-/**
- * @field col.blue : get/set the red field
- * Raises an exception if you try to set the value outside of the range 0-255 
- * inclusive.
- */
-/**
- * @field col.alpha : get/set the red field
- * Raises an exception if you try to set the value outside of the range 0-255 
- * inclusive.
- */
+/* read fields col.red, col.green, col.blue, col.alpha */
 static int colorm__index(lua_State *L) {
   Imlib_Color *c = check_color(L, 1);
   const char *field = luaL_checkstring(L, 2);
@@ -140,6 +104,7 @@ static int colorm__index(lua_State *L) {
   return 1;
 }
 
+/* set fields col.red, col.green, col.blue, col.alpha */
 static int colorm__newindex(lua_State *L) {
   Imlib_Color *c = check_color(L, 1);
   const char *field = luaL_checkstring(L, 2);
@@ -158,12 +123,7 @@ static int colorm__newindex(lua_State *L) {
   return 0;
 }
 
-/**
- * @@module imlib2.border : Represents a border.
- * Contains left, top, right, bottom values as mutable fields. A border is the 
- * area at the edge of an image that does not scale when the rest of the image 
- * is resized - the borders remain constant in size.
- */
+/* imlib2.border */
 
 static Imlib_Border *push_Border(lua_State *L) {
   Imlib_Border *b = (Imlib_Border*)lua_newuserdata(L, sizeof(Imlib_Border));
@@ -172,9 +132,7 @@ static Imlib_Border *push_Border(lua_State *L) {
   return b;
 }
 
-/**
- * border.new(left, top, right, bottom) : creates a new border
- */
+/* border.new(left, top, right, bottom) */
 static int border_new(lua_State *L) {
   Imlib_Border *b;
   int left=luaL_checkint(L, 1);
@@ -193,6 +151,7 @@ static int border_new(lua_State *L) {
 #define check_border(L, n)\
   (Imlib_Border*)luaL_checkudata(L, n, &quot;imlib2.border&quot;)
 
+/* bd:__tostring() */
 static int borderm_tostring(lua_State *L) {
   Imlib_Border *b = check_border(L, 1);
   lua_pushfstring(L, &quot;&lt;imlib2.border left=%d top=%d right=%d bottom=%d&gt; (%p)&quot;,
@@ -200,18 +159,7 @@ static int borderm_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * @field bd.left : allows get/set
- */
-/**
- * @field bd.top : allows get/set
- */
-/**
- * @field bd.right : allows get/set
- */
-/**
- * @field bd.bottom : allows get/set
- */
+/* read fields bd.left, bd.top, bd.right, bd.bottom */
 static int borderm__index(lua_State *L) {
   Imlib_Border *b = check_border(L, 1);
   const char *field = luaL_checkstring(L, 2);
@@ -232,6 +180,7 @@ static int borderm__index(lua_State *L) {
   return 1;
 }
 
+/* set fields bd.left, bd.top, bd.right, bd.bottom */
 static int borderm__newindex(lua_State *L) {
   Imlib_Border *b = check_border(L, 1);
   const char *field = luaL_checkstring(L, 2);
@@ -249,10 +198,8 @@ static int borderm__newindex(lua_State *L) {
   return 0;
 }
 
-/**
- * @@module imlib2.gradient
- * Consists of colours and the offsets at which they occur.
- */
+/* imlib2.gradient */
+
 static Gradient push_Gradient(lua_State *L, Gradient gr) {
   Gradient *grp = (Gradient*)lua_newuserdata(L, sizeof(Gradient));
   *grp = gr;
@@ -270,12 +217,7 @@ static Gradient check_Gradient(lua_State *L, int n) {
   return gr;
 }
 
-/**
- * gradient.new() : Creates a new gradient
- * Use grad:add_color() to add colors to it
- *
- * @constructor
- */
+/* gradient.new() */
 static int gradient_new(lua_State *L) {
   Gradient gr = push_Gradient(L, imlib_create_color_range());
   if (gr == NULL)
@@ -294,6 +236,7 @@ static int gradientm_gc(lua_State *L) {
   return 0;
 }
 
+/* grad:__tostring() */
 static int gradientm_tostring(lua_State *L) {
   Gradient *grp = (Gradient*)luaL_checkudata(L, 1, &quot;imlib2.gradient&quot;);
   Gradient gr = *grp;
@@ -304,13 +247,7 @@ static int gradientm_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * grad:add_color(offset, color) : add an imlib2.color at the given offset
- * The offset parameter has no meaning for the first color added.
- *
- * @parameter offset the distance from the previous colour in pixels
- * @parameter color an imlib2.color
- */
+/* grad:add_color(offset, color) */
 static int gradientm_add_color(lua_State *L) {
   Gradient gr = check_Gradient(L, 1);
   int offset = luaL_checkint(L, 2);
@@ -321,10 +258,7 @@ static int gradientm_add_color(lua_State *L) {
   return 0;
 }
 
-/**
- * @@module imlib2.polygon : represents a polygon object
- * Points are drawn in the order in which they are added
- */
+/* imlib2.polygon */
 
 static Polygon push_Polygon(lua_State *L, Polygon po) {
   Polygon *pop = (Polygon*)lua_newuserdata(L, sizeof(Polygon));
@@ -343,10 +277,7 @@ static Polygon check_Polygon(lua_State *L, int n) {
   return po;
 }
 
-/** polygon.new() : create a new polygon
- *
- * @constructor
- */
+/* polygon.new() */
 static int polygon_new(lua_State *L) {
   Polygon po = push_Polygon(L, imlib_polygon_new());
   if (po == NULL)
@@ -364,6 +295,7 @@ static int polygonm_gc(lua_State *L) {
   return 0;
 }
 
+/* poly:__tostring() */
 static int polygonm_tostring(lua_State *L) {
   Polygon po = check_Polygon(L, 1);
   if (po)
@@ -373,12 +305,7 @@ static int polygonm_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * poly:add_point(x, y) : add point (x,y) to the polygon
- *
- * @param x x coordinate in pixels
- * @param y y coordinate in pixels
- */
+/* poly:add_points(x, y) */
 static int polygonm_add_point(lua_State *L) {
   Polygon po = check_Polygon(L, 1);
   int x = luaL_checkint(L, 2);
@@ -387,14 +314,7 @@ static int polygonm_add_point(lua_State *L) {
   return 0;
 }
 
-/**
- * poly:get_bounds()
- * Returns the four points of the rectangular bounding area for the polygon.
- * @return `x1`: x coordinate of the upper left corner
- * @return `y1`: y coordinate of the upper left corner
- * @return `x2`: x coordinate of the upper right corner
- * @return `y2`: y coordinate of the lower right corner
- */
+/* poly:get_bounds() */
 static int polygonm_get_bounds(lua_State *L) {
   int i;
   Polygon po = check_Polygon(L, 1);
@@ -405,9 +325,7 @@ static int polygonm_get_bounds(lua_State *L) {
   return 4;
 }
 
-/**
- * poly:contains_point() : returns true if the polygon contains point (x,y)
- */
+/* poly:contains_point() */
 static int polygonm_contains_point(lua_State *L) {
   Polygon po = check_Polygon(L, 1);
   int x = luaL_checkint(L, 2);
@@ -416,11 +334,7 @@ static int polygonm_contains_point(lua_State *L) {
   return 1;
 }
 
-/**
- * @@module imlib2.font
- * Instances represent a loaded font. Provides static methods for querying and 
- * modifying the font paths.
- */
+/* imlib2.font */
 
 static Font push_Font(lua_State *L, Font fo) {
   Font *fop = (Font*)lua_newuserdata(L, sizeof(Font));
@@ -438,13 +352,7 @@ static Font check_Font(lua_State *L, int n) {
   return fo;
 }
 
-/**
- * font.load(name) : load the given font from the current font path.
- * 
- * @param name a font name, e.g. &quot;Vera/10&quot;
- * @return a font object for the given font name, or if no such font can be 
- *         found on the font path, nil plus an error message.
- */
+/* font.load(name) */
 static int font_load(lua_State *L) {
   const char *path = luaL_checkstring(L, 1);
   Font fo = push_Font(L, imlib_load_font(path));
@@ -456,11 +364,7 @@ static int font_load(lua_State *L) {
   return 1;
 }
 
-/**
- * font.add_path(path)
- * Add the given path to the list of paths Imlib2 searches when loading a 
- * font.
- */
+/* font.add_path(path) */
 static int font_add_path(lua_State *L) {
   const char *path = luaL_checkstring(L, 1);
   /* This is safe. Imlib2 does a strdup */
@@ -468,10 +372,7 @@ static int font_add_path(lua_State *L) {
   return 0;
 }
 
-/**
- * font.remove_path(path)
- * Remove the given path from Imlib2's font path list
- */
+/* font.remove_path(path) */
 static int font_remove_path(lua_State *L) {
   const char *path = luaL_checkstring(L, 1);
 
@@ -479,12 +380,7 @@ static int font_remove_path(lua_State *L) {
   return 0;
 }
 
-/**
- * font.list_paths()
- *
- * @return a table containing all the font paths Imlib2 will search when asked 
- *         to load a font
- */
+/* font.list_paths() */
 static int font_list_paths(lua_State *L) {
   char **paths;
   int i, n;
@@ -499,11 +395,7 @@ static int font_list_paths(lua_State *L) {
   return 1;
 }
 
-/**
- * font.list_fonts() : list all font names on the font path
- *
- * @return an array of all the font names Imlib2 can find on its font path
- */
+/* font.list_fonts() */
 static int font_list_fonts(lua_State *L) {
   char **fonts;
   int i, n;
@@ -518,23 +410,13 @@ static int font_list_fonts(lua_State *L) {
   return 1;
 }
 
-/**
- * font.get_cache_size() : get the size of the font cache
- *
- * @return the font cache size in bytes
- */
+/* font.get_cache_size() */
 static int font_get_cache_size(lua_State *L) {
   lua_pushinteger(L, imlib_get_font_cache_size());
   return 1;
 }
 
-/**
- * font.set_cache_size()
- * Sets the font cache size in bytes. Whenever you set the font cache size, 
- * Imlib2 will flush fonts from the cache until the memory used by fonts is 
- * less than or equal to the font cache size. Setting the size to 0 frees all 
- * speculatively cached fonts.
- */
+/* font.set_cache_size() */
 static int font_set_cache_size(lua_State *L) {
   int size = luaL_checkint(L, 1);
 
@@ -544,16 +426,7 @@ static int font_set_cache_size(lua_State *L) {
 
 static const char *const font_directions[] = {&quot;right&quot;, &quot;left&quot;, &quot;down&quot;, &quot;up&quot;, &quot;angle&quot;, NULL};
 
-/**
- * font.set_direction(dir[, angle])
- * Sets the direction that text will be drawn at. Accepts 90 degree 
- * orientations, or an arbitrary angle. Raises an error for invalid direciton 
- * names.
- *
- * @param dir can be 'right', 'left', 'down', 'up' or 'angle' (in which case 
- *            `angle` must be given)
- * @param angle given in radians. Only needed if `direction` was 'angle'
- */
+/* font.set_direction(dir[, angle]) */
 static int font_set_direction(lua_State *L) {
   int dir = luaL_checkoption(L, 1, NULL, font_directions);
   if (dir == IMLIB_TEXT_TO_ANGLE) {
@@ -567,14 +440,7 @@ static int font_set_direction(lua_State *L) {
   return 0;
 }
 
-/**
- * font.get_direction()
- * Gives the direction that text is set to be drawn at.
- *
- * @return one of the strings 'right', 'left', 'down', 'up', or 'angle'. If 
- *         'angle' is returned, then the angle in radians is given as a second 
- *         return value.
- */
+/* font.get_direction() */
 static int font_get_direction(lua_State *L) {
   int dir = imlib_context_get_direction();
   if (dir == IMLIB_TEXT_TO_ANGLE) {
@@ -599,6 +465,7 @@ static int fontm_gc(lua_State *L) {
   return 0;
 }
 
+/* fnt:__tostring() */
 static int fontm_tostring(lua_State *L) {
   Font *fop = (Font*)luaL_checkudata(L, 1, &quot;imlib2.font&quot;);
   Font fo = *fop;
@@ -609,12 +476,7 @@ static int fontm_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * fnt:get_size(str)
- * Get the width and height of the given string when drawn with `fnt`
- *
- * @return the width and height in pixels
- */
+/* fnt:get_size(str) */
 static int fontm_get_size(lua_State *L) {
   Font fo = check_Font(L, 1);
   const char *text = luaL_checkstring(L, 2);
@@ -627,16 +489,7 @@ static int fontm_get_size(lua_State *L) {
   return 2;
 }
 
-/**
- * fnt:get_advance(str)
- * Get the horizontal and vertical advance of the given string when drawn with 
- * `fnt`. The horizontal and vertical advance are the number of pixels away 
- * the next string would need to be placed at. The advances are not adjusted 
- * for rotation, and are calculated as if the text was drawn horizontally from 
- * left to right.
- *
- * @return the horizontal and vertical advance in pixels
- */
+/* fnt:get_advance(str) */
 static int fontm_get_advance(lua_State *L) {
   Font fo = check_Font(L, 1);
   const char *text = luaL_checkstring(L, 2);
@@ -649,10 +502,7 @@ static int fontm_get_advance(lua_State *L) {
   return 2;
 }
 
-/**
- * fnt:get_inset(str)
- * The inset in pixels of the first character of the given string.
- */
+/* fnt:get_inset(str) */
 static int fontm_get_inset(lua_State *L) {
   Font fo = check_Font(L, 1);
   
@@ -662,16 +512,7 @@ static int fontm_get_inset(lua_State *L) {
 }
 
 
-/* NOTE:
- * imlib_text_get_location_at_index and imlib_text_get_index_and_location are 
- * no longer wrapped because I believe the underlying implementation to be 
- * buggy
- */
-
-/**
- * fnt:get_ascent()
- * Get the front's ascent in pixels.
- */
+/* fnt:get_ascent() */
 static int fontm_get_ascent(lua_State *L) {
   Font fo = check_Font(L, 1);
 
@@ -680,10 +521,7 @@ static int fontm_get_ascent(lua_State *L) {
   return 1;
 }
 
-/**
- * fnt:get_maximum_ascent()
- * Get the font's maximum ascent in pixels.
- */
+/* fnt:get_maximum_ascent() */
 static int fontm_get_maximum_ascent(lua_State *L) {
   Font fo = check_Font(L, 1);
 
@@ -692,10 +530,7 @@ static int fontm_get_maximum_ascent(lua_State *L) {
   return 1;
 }
 
-/**
- * fnt:get_descent()
- * Get the font's descent in pixels.
- */
+/* fnt:get_descent() */
 static int fontm_get_descent(lua_State *L) {
   Font fo = check_Font(L, 1);
 
@@ -704,10 +539,7 @@ static int fontm_get_descent(lua_State *L) {
   return 1;
 }
 
-/**
- * fnt:get_maximum_descent()
- * Get the font's maximum descent in pixels.
- */
+/* fnt:get_maximum_descent() */
 static int fontm_get_maximum_descent(lua_State *L) {
   Font fo = check_Font(L, 1);
 
@@ -717,10 +549,7 @@ static int fontm_get_maximum_descent(lua_State *L) {
 }
 
 
-/**
- * @@module imlib2.image
- * Methods for image loading, saving and manipulation.
- */
+/* imlib2.image */
 
 static Image push_Image(lua_State *L, Image im) {
   Image *imp = (Image*)lua_newuserdata(L, sizeof(Image));
@@ -739,14 +568,7 @@ static Image check_Image(lua_State *L, int n) {
   return im;
 }
 
-/**
- * image.new(width, height)
- * Create a new image of given width and height.
- * 
- * @constructor
- * @param width given in pixels
- * @param height given in pixels
- */
+/* image.new(width, height) */
 static int image_new(lua_State *L) {
   int w = luaL_checkint(L, 1);
   int h = luaL_checkint(L, 2);
@@ -758,21 +580,7 @@ static int image_new(lua_State *L) {
   return 1;
 }
 
-/** image.load(path)
- *
- * Loads the image at the given path. Imlib2 searches its loader modules until 
- * it finds one that can decode the file at the given path. The loader modules 
- * available to you (and hence the range of filetypes you are able to load) 
- * will depend on the options used when building the Imlib2 shared library. 
- * Loaders will not decode image data until it is needed (provided this is 
- * feasible for the given file format). This means it is perfectly sensible to 
- * load many files in order to query their header information such as width 
- * and height. If the image is present in Imlib2's cache, it won't check if 
- * the file has change and will instead just return that cached version of the 
- * image.
- *
- * @return the loaded image or else nil plus an error message
- */
+/* image.load(path) */
 static int image_load(lua_State *L) {
   const char *path = luaL_checkstring(L, 1);
   Imlib_Load_Error err;
@@ -801,10 +609,7 @@ static int imagem_tostring(lua_State *L) {
   return 1;
 }
 
-/**
- * img:free()
- * Frees the image. This does not evict the image from Imlib2's cache.
- */
+/* img:free() */
 static int imagem_free(lua_State *L) {
   Image *imp = (Image*)luaL_checkudata(L, 1, &quot;imlib2.image&quot;);
   Image im = *imp;
@@ -816,10 +621,7 @@ static int imagem_free(lua_State *L) {
   return 0;
 }
 
-/**
- * img:clone()
- * Obtain a clone of the image.
- */
+/* img:clone() */
 static int imagem_clone(lua_State *L) {
   Image old_im = check_Image(L, 1);
   Image new_im;
@@ -831,10 +633,7 @@ static int imagem_clone(lua_State *L) {
   return 1;
 }
 
-/**
- * img:get_width()
- * Get the width of the image in pixels.
- */
+/* img:get_width() */
 static int imagem_get_width(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -842,9 +641,7 @@ static int imagem_get_width(lua_State *L) {
   return 1;
 }
 
-/** img:get_height()
- * Get the height of the image in pixels.
- */
+/* img:get_height() */
 static int imagem_get_height(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -852,10 +649,7 @@ static int imagem_get_height(lua_State *L) {
   return 1;
 }
 
-/**
- * img:get_filename()
- * Returns the current image filename.
- */
+/* img:get_filename() */
 static int imagem_get_filename(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -863,10 +657,7 @@ static int imagem_get_filename(lua_State *L) {
   return 1;
 }
 
-/**
- * img:get_format()
- * Get the current image format.
- */
+/* img:get_format() */
 static int imagem_get_format(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -874,12 +665,7 @@ static int imagem_get_format(lua_State *L) {
   return 1;
 }
 
-/**
- * img:set_format(format)
- * Sets the image format to the given string. No check is made to ensure that 
- * the Imlib2 shared library can save in this format. If it can not, 
- * `img:save()` will later fail.
- */
+/* img:set_format(format) */
 static int imagem_set_format(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -887,10 +673,7 @@ static int imagem_set_format(lua_State *L) {
   return 0;
 }
 
-/**
- * img:has_alpha()
- * Gives a boolean value indicating whether the image has an alpha channel.
- */
+/* img:has_alpha() */
 static int imagem_has_alpha(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -898,10 +681,7 @@ static int imagem_has_alpha(lua_State *L) {
   return 1;
 }
 
-/**
- * img:set_alpha(bool)
- * Enable or disable the image's alpha channel based on the given boolean.
- */
+/* img:set_alpha(bool) */
 static int imagem_set_alpha(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -909,12 +689,7 @@ static int imagem_set_alpha(lua_State *L) {
   return 0;
 }
 
-/**
- * img:get_border()
- * Get an imlib2.border object for `img`.
- *
- * @return an imlib2.border
- */
+/* img:get_border() */
 static int imagem_get_border(lua_State *L) {
   Image im = check_Image(L, 1);
   Imlib_Border *b = push_Border(L);
@@ -923,12 +698,7 @@ static int imagem_get_border(lua_State *L) {
   return 1;
 }
 
-/**
- * img:set_border(border)
- * Sets the image border to the given imlib2.border object.
- *
- * @param border must be an imlib2.border object
- */
+/* img:set_border(border) */
 static int imagem_set_border(lua_State *L) {
   Image im = check_Image(L, 1);
   Imlib_Border *b = (Imlib_Border*)luaL_checkudata(L, 2, &quot;imlib2.border&quot;);
@@ -937,14 +707,7 @@ static int imagem_set_border(lua_State *L) {
   return 0;
 }
 
-/**
- * img:get_pixel(x, y)
- * Gives the color of the pixel at the given (x,y) coordinates. The origin - 
- * (0,0) is at the top left.
- *
- * @return an instance of imlib2.color matching the color at the given 
- *         coordinates.
- */
+/* img:get_pixel(x, y) */
 static int imagem_get_pixel(lua_State *L) {
   Image im = check_Image(L, 1);
   int x = luaL_checkint(L, 2);
@@ -959,15 +722,7 @@ static int imagem_get_pixel(lua_State *L) {
  * written to change self, to fit in with the rest of the api
  ***/
 
-/**
- * img:crop(x, y, width, height)
- * Crops the image to the given rectangle.
- *
- * @param x the x coordinate of the top left corner
- * @param y the y coordinate of the top left corner
- * @param width the width of the rectangle
- * @param height the height of the rectangle
- */
+/* img:crop(x, y, width, height) */
 static int imagem_crop(lua_State *L) {
   Image *imp = (Image*)luaL_checkudata(L, 1, &quot;imlib2.image&quot;);
   Image old_im;
@@ -984,19 +739,7 @@ static int imagem_crop(lua_State *L) {
   return 0;
 }
 
-/** img:crop_and_scale(source_x, source_y, source_h, source_w, dest_w, dest_h)
- * Crops the iamge to the given rectangle and also scales it. The image will 
- * be scaled to the given destination width and height.
- * 
- * @param source_x the x coordinate of the top left corner of the source 
- *               rectangle
- * @param source_y the y coordinate of the top left corner of the source 
- *               rectangle
- * @param source_h the height of the source rectangle
- * @param source_w the width of the source rectangle
- * @param dest_w the width of the destination rectangle
- * @param dest_h the height of the destination rectangle
- */
+/* img:crop_and_scale(source_x, source_y, source_h, source_w, dest_w, dest_h) */
 static int imagem_crop_and_scale(lua_State *L) {
   Image *imp = (Image*)luaL_checkudata(L, 1, &quot;imlib2.image&quot;);
   Image old_im;
@@ -1016,10 +759,7 @@ static int imagem_crop_and_scale(lua_State *L) {
   return 0;
 }
 
-/**
- * img:rotate(angle)
- * Rotates the image by `angle` radians.
- */
+/* img:rotate(angle) */
 static int imagem_rotate(lua_State *L) {
   Image *imp = (Image*)luaL_checkudata(L, 1, &quot;imlib2.image&quot;);
   Image old_im;
@@ -1038,10 +778,7 @@ static int imagem_rotate(lua_State *L) {
 /* TODO imlib_blend_image_onto_image_at_angle */
 /* TODO imlib_blend_image_onto_image_skewed */
 
-/**
- * img:flip_horizontal()
- * Flips the image horizontally
- */
+/* img:flip_horizontal() */
 static int imagem_flip_horizontal(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1049,10 +786,7 @@ static int imagem_flip_horizontal(lua_State *L) {
   return 1;
 }
 
-/**
- * img:flip_vertical()
- * Flips the image vertically
- */
+/* img:flip_vertical() */
 static int imagem_flip_vertical(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1060,10 +794,7 @@ static int imagem_flip_vertical(lua_State *L) {
   return 1;
 }
 
-/**
- * img:flip_diagonal()
- * Flips the image diagonally.
- */
+/* img:flip_diagonal() */
 static int imagem_flip_diagonal(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1071,13 +802,7 @@ static int imagem_flip_diagonal(lua_State *L) {
   return 1;
 }
 
-/**
- * img:orientate(n)
- * Performs `n` 90 degree rotations on the image.
- *
- * @param n the number of 90 degree rotations to perform. This will be 
- *          truncated to an integer.
- */
+/* img:orientate(n) */
 static int imagem_orientate(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1085,11 +810,7 @@ static int imagem_orientate(lua_State *L) {
   return 1;
 }
 
-/**
- * img:blue(radius)
- * Blurs the image. A radious value of 0 has no effect. 1 and above determine 
- * the blur matrix radius that determines how much to blur the image.
- */
+/* img:blue(radius) */
 static int imagem_blur(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1097,10 +818,7 @@ static int imagem_blur(lua_State *L) {
   return 1;
 }
 
-/*
- * img:sharpen(radius)
- * Sharpens the image. The radious affects how much to sharpen by.
- */
+/* img:sharpen(radius) */
 static int imagem_sharpen(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1108,10 +826,7 @@ static int imagem_sharpen(lua_State *L) {
   return 1;
 }
 
-/**
- * img:tile_horizontal()
- * Modifies the image so it will tile seamlessly horizontally.
- */
+/* img:tile_horizontal() */
 static int imagem_tile_horizontal(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1119,10 +834,7 @@ static int imagem_tile_horizontal(lua_State *L) {
   return 1;
 }
 
-/**
- * img:tile_vertical()
- * Modifies the image so it will tile seamlessly vertically.
- */
+/* img:tile_vertical() */
 static int imagem_tile_vertical(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1130,10 +842,7 @@ static int imagem_tile_vertical(lua_State *L) {
   return 1;
 }
 
-/**
- * img:tile()
- * Modifies the image so it will tile seamless horizontally and vertically.
- */
+/* img:tile() */
 static int imagem_tile(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1142,9 +851,7 @@ static int imagem_tile(lua_State *L) {
 }
 
 /* TODO, accept a color argument, wrapping imlib_image_clear_color */
-/** img:clear()
- * Clears the contents of the image.
- */
+/* img:clear() */
 static int imagem_clear(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1152,13 +859,7 @@ static int imagem_clear(lua_State *L) {
   return 1;
 }
 
-/**
- * img:draw_pixel(x, y[, color])
- * Draw a pixel at the specified coordinates. If no color is specified then 
- * the pixel will be drawn in the most recent color.
- *
- * @param color optional, an imlib2.color object
- */
+/* img:draw_pixel(x, y[, color]) */
 static int imagem_draw_pixel(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1172,12 +873,7 @@ static int imagem_draw_pixel(lua_State *L) {
   return 0;
 }
 
-/** img:draw_line(x1, y1, x2, y2, color)
- * Draw a line from (x1, y1) to (x2, y2). If no color is specified, then it 
- * will be drawn in the most recent color.
- *
- * @param color optional, an imlib2.color object
- */
+/* img:draw_line(x1, y1, x2, y2, color) */
 static int imagem_draw_line(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1193,13 +889,7 @@ static int imagem_draw_line(lua_State *L) {
   return 0;
 }
 
-/**
- * img:draw_rectangle(x, y, width, height[, color])
- * Draws the outline of a rectangle. If no color is specified, then it will be 
- * drawn in the most recent color.
- *
- * @param color optional, an imlib2.color object
- */
+/* img:draw_rectangle(x, y, width, height[, color]) */
 static int imagem_draw_rectangle(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1215,13 +905,7 @@ static int imagem_draw_rectangle(lua_State *L) {
   return 0;
 }
 
-/**
- * img:fill_rectangle(x, y, width, height, color)
- * Draws a filled rectangle. If no color is specified, then it will be drawn 
- * in the most recent color.
- *
- * @param color optional, an imlib2.color object
- */
+/* img:fill_rectangle(x, y, width, height, color) */
 static int imagem_fill_rectangle(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1240,10 +924,7 @@ static int imagem_fill_rectangle(lua_State *L) {
 /* TODO imlib_copy_alpha_to_image */
 /* TODO imlib_copy_alpha_rectangle_to_image */
 
-/**
- * img:scroll_rectangle(x, y, width, height, delta_x, delta_y)
- * Scrolls the specified rectangle by the given displacement.
- */
+/* img:scroll_rectangle(x, y, width, height, delta_x, delta_y) */
 static int imagem_scroll_rectangle(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1257,10 +938,7 @@ static int imagem_scroll_rectangle(lua_State *L) {
   return 0;
 }
 
-/**
- * img:copy_rectangle(x, y, width, height, new_x, new_y)
- * Copies the given rectangle to (new_x, new_y).
- */
+/* img:copy_rectangle(x, y, width, height, new_x, new_y) */
 static int imagem_copy_rectangle(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1274,17 +952,7 @@ static int imagem_copy_rectangle(lua_State *L) {
   return 0;
 }
 
-/**
- * img:fill_gradient(gradient, x, y, width, height, angle)
- * Fills a rectangle with the given gradient
- *
- * @param gradient an imlib2.gradient object
- * @param x the x coordinate of the rectangle's top left corner
- * @param y the y coordinate of the rectangle's top left corner
- * @param width the width of the rectangle
- * @param height the height of the rectangle
- * @param angle the angle at which the gradient will be drawn
- */
+/* img:fill_gradient(gradient, x, y, width, height, angle) */
 static int imagem_fill_gradient(lua_State *L) {
   Image im = check_Image(L, 1);
   Gradient gr = check_Gradient(L, 2);
@@ -1300,15 +968,7 @@ static int imagem_fill_gradient(lua_State *L) {
   return 0;
 }
 
-/**
- * img:draw_ellipse(xc, yc, a, b[, color])
- * Draws the outline of an ellipse. (xc, yc) is the centre of the ellipse, 
- * which is described by the equation (x-xc)^2/a^2 + (y-yc)^2/b^2 = 1. If no 
- * color is specified then it will be drawn in the most recent color.
- *
- * @param a horizontal amplitude
- * @param b vertical amplitude
- */
+/* img:draw_ellipse(xc, yc, a, b[, color]) */
 static int imagem_draw_ellipse(lua_State *L) {
   Image im = check_Image(L, 1);
   imlib_context_set_image(im);
@@ -1324,15 +984,7 @@ static int imagem_draw_ellipse(lua_State *L) {
   return 0;
 }
 
-/**
- * img:fill_ellipse(xc, yc, a, b[, color])
- * Fills an ellipse. (xc, yc) is the centre of the ellipse, which is described 
- * by the equation (x-xc)^2/a^2 + (y-yc)^2/b^2 = 1. If no color is specified 
- * then it will be drawn in the most recent color.
- *
- * @param a horizontal amplitude
- * @param b vertical amplitude
- */
+/* img:fill_ellipse(xc, yc, a, b[, color]) */
 static int imagem_fill_ellipse(lua_State *L)
 {
   Image im = check_Image(L, 1);
@@ -1349,18 +1001,7 @@ static int imagem_fill_ellipse(lua_State *L)
   return 0;
 }
 
-/**
- * img:draw_polygon(polygon, closed[, color])
- * Draws the outline of a polygon. Points in the imlib2.polygon are drawn in 
- * the order in which they were added. The final point will be connected to 
- * the first point if `closed` is true. If no color is specified then it will 
- * be drawn in the most recent color.
- *
- * @param polygon an imlib2.polygon
- * @param closed a boolean indicating whether to connect the last point to the 
- *               first
- * @param color optional, an imlib2.color object
- */
+/* img:draw_polygon(polygon, closed[, color]) */
 static int imagem_draw_polygon(lua_State *L) {
   Image im = check_Image(L, 1);
   Polygon po = check_Polygon(L, 2);
@@ -1374,14 +1015,7 @@ static int imagem_draw_polygon(lua_State *L) {
   return 0;
 }
 
-/**
- * img:fill_polygon(polygon[, color])
- * Fills a polygon. If no color is specified then it will be drawn in the most 
- * recent color.
- *
- * @param polygon an imlib2.polygon
- * @param color optional, an imlib2.color object
- */
+/* img:fill_polygon(polygon[, color]) */
 static int imagem_fill_polygon(lua_State *L) {
   Image im = check_Image(L, 1);
   Polygon po = check_Polygon(L, 2);
@@ -1394,16 +1028,7 @@ static int imagem_fill_polygon(lua_State *L) {
   return 0;
 }
 
-/**
- * img:draw_text(font, string, x, y[, color])
- * Draws a string in the given font at point (x, y). If no color is specified 
- * then it will be drawn in the most recent color.
- *
- * @param font an imlib2.font object
- * @param string the string to be drawn
- * @param x the x coordinate of the point to start drawing
- * @param y the y coordinate of the point to start drawing
- */
+/* img:draw_text(font, string, x, y[, color]) */
 static int imagem_draw_text(lua_State *L) {
   Image im = check_Image(L, 1);
   Font fo = check_Font(L, 2);
@@ -1425,14 +1050,7 @@ static int imagem_draw_text(lua_State *L) {
 
 /* TODO: Look at imlib_filter_* */
 
-/**
- * img:save(path)
- * Saves the image to the given path. The file extension (e.g. .png or .jpg) 
- * will affect the output format (but will not override any format set by a 
- * call to `img:set_format()`).
- *
- * @return true or nil plus an error message if the save fails
- */
+/* img:save(path) */
 static int imagem_save(lua_State *L) {
   Imlib_Load_Error err;
 
@@ -1450,56 +1068,34 @@ static int imagem_save(lua_State *L) {
   }
 }
 
-/*** imlib2 functions ***/
-
-/**
- * @@module imlib2
- * Functions to modify the operation of the imlib2 library
- */
+/* imlib2 */
 
-/**
- * imlib2.set_anti_alias(bool)
- * Enable or disable anti-aliasing for future drawing operations.
- */
+/* imlib2.set_anti_alias(bool) */
 static int set_anti_alias(lua_State *L) {
   luaL_checkany(L, 1);
   imlib_context_set_anti_alias(lua_toboolean(L, 1));
   return 1;
 }
 
-/**
- * imlib2.get_anti_alias()
- * Gives a boolean indicating whether anti-aliasing is enabled or disabled
- */
+/* imlib2.get_anti_alias() */
 static int get_anti_alias(lua_State *L) {
   lua_pushboolean(L, imlib_context_get_anti_alias());
   return 1;
 }
 
-/**
- * imlib2.get_cache_size()
- * Gives the current size of the image cache in bytes
- */
+/* imlib2.get_cache_size() */
 static int get_cache_size(lua_State *L) {
   lua_pushinteger(L, imlib_get_cache_size());
   return 1;
 }
 
-/**
- * imlib2.set_cache_size(size)
- * Set the size of the image cache
- *
- * @param size the desired cache size in bytes
- */
+/* imlib2.set_cache_size(size) */
 static int set_cache_size(lua_State *L) {
   imlib_set_cache_size(luaL_checkint(L, 1));
   return 1;
 }
 
-/**
- * imlib2.flush_cache()
- * Flushes the image cache.
- */
+/* imlib2.flush_cache() */
 static int flush_cache(lua_State *L) {
   int csize = imlib_get_cache_size();
   imlib_set_cache_size(0);</diff>
      <filename>limlib2.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>af16926386ecb1e11c6dc5732c485ab07c7c2e23</id>
    </parent>
  </parents>
  <author>
    <name>A.S. Bradbury</name>
    <email>asb@asbradbury.org</email>
  </author>
  <url>http://github.com/asb/lua-imlib2/commit/b76980b8435942f30b5486cef924c30f1a724bc2</url>
  <id>b76980b8435942f30b5486cef924c30f1a724bc2</id>
  <committed-date>2008-07-27T12:59:48-07:00</committed-date>
  <authored-date>2008-07-27T12:59:48-07:00</authored-date>
  <message>separate API documentation from code, convert to Markdown</message>
  <tree>b58f276d5424de03dde7e8033f9ca1c10cd49902</tree>
  <committer>
    <name>A.S. Bradbury</name>
    <email>asb@asbradbury.org</email>
  </committer>
</commit>
