converted comments to gtk-doc inline API docs.

2005-08-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpscanconvert.[ch]: converted comments to gtk-doc
	inline API docs.
This commit is contained in:
Sven Neumann 2005-08-22 16:08:08 +00:00 committed by Sven Neumann
parent 750a668125
commit eab00f1d80
3 changed files with 129 additions and 70 deletions

View File

@ -1,3 +1,8 @@
2005-08-22 Sven Neumann <sven@gimp.org>
* app/core/gimpscanconvert.[ch]: converted comments to gtk-doc
inline API docs.
2005-08-22 Sven Neumann <sven@gimp.org>
* tools/test-clipboard.c: added --version command-line option.

View File

@ -94,6 +94,13 @@ static void gimp_scan_convert_compose_callback (gpointer user_data,
/* public functions */
/**
* gimp_scan_convert_new:
*
* Create a new scan conversion context.
*
* Return value: a newly allocated #GimpScanConvert context.
*/
GimpScanConvert *
gimp_scan_convert_new (void)
{
@ -106,6 +113,12 @@ gimp_scan_convert_new (void)
return sc;
}
/**
* gimp_scan_convert_free:
* @sc: a #GimpScanConvert context
*
* Frees the resources allocated for @sc.
*/
void
gimp_scan_convert_free (GimpScanConvert *sc)
{
@ -119,7 +132,12 @@ gimp_scan_convert_free (GimpScanConvert *sc)
g_free (sc);
}
/* set the Pixel-Ratio (width / height) for the pixels.
/**
* gimp_scan_convert_set_pixel_ratio:
* @sc: a #GimpScanConvert context
* @ratio_xy: the aspect ratio of the major coordinate axes
*
* Sets the pixel aspect ratio.
*/
void
gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc,
@ -131,7 +149,17 @@ gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc,
sc->ratio_xy = ratio_xy;
}
/**
* gimp_scan_convert_set_clip_rectangle
* @sc: a #GimpScanConvert context
* @x: horizontal offset of clip rectangle
* @y: vertical offset of clip rectangle
* @width: width of clip rectangle
* @height: height of clip rectangle
*
* Sets a clip rectangle on @sc. Subsequent render operations will be
* restricted to this area.
*/
void
gimp_scan_convert_set_clip_rectangle (GimpScanConvert *sc,
gint x,
@ -148,8 +176,16 @@ gimp_scan_convert_set_clip_rectangle (GimpScanConvert *sc,
sc->clip_h = height;
}
/* Add "n_points" from "points" to the polygon currently being
* described by "scan_converter". DEPRECATED.
/**
* gimp_scan_convert_add_points:
* @sc: a #GimpScanConvert context
* @n_points: number of points to add
* @points: array of points to add
* @new_polygon: whether to start a new polygon or append to the last one
*
* Adds @n_points from @points to the polygon currently being
* described by @sc. This function is DEPRECATED, please use
* gimp_scan_convert_add_polyline() instead.
*/
void
gimp_scan_convert_add_points (GimpScanConvert *sc,
@ -225,14 +261,20 @@ gimp_scan_convert_close_add_points (GimpScanConvert *sc)
}
/* Add a polygon with "npoints" "points" that may be open or closed.
* It is not recommended to mix gimp_scan_convert_add_polyline with
* gimp_scan_convert_add_points.
/**
* gimp_scan_convert_add_polyline:
* @sc: a #GimpScanConvert context
* @n_points: number of points to add
* @points: array of points to add
* @closed: whether to close the polyline and make it a polygon
*
* Add a polyline with @n_points @points that may be open or closed.
* It is not recommended to mix gimp_scan_convert_add_polyline() with
* gimp_scan_convert_add_points().
*
* Please note that you should use gimp_scan_convert_stroke() if you
* specify open polygons.
*/
void
gimp_scan_convert_add_polyline (GimpScanConvert *sc,
guint n_points,
@ -297,12 +339,28 @@ gimp_scan_convert_add_polyline (GimpScanConvert *sc,
}
/* Stroke the content of a GimpScanConvert. The next
* gimp_scan_convert_render() will result in the outline of the polygon
* defined with the commands above.
/**
* gimp_scan_convert_stroke:
* @sc: a #GimpScanConvert context
* @width: line width in pixels
* @join: how lines should be joined
* @cap: how to render the end of lines
* @miter: convert a mitered join to a bevelled join if the miter would
* extend to a distance of more than @miter times @width from
* the actual join point
* @dash_offset: offset to apply on the dash pattern
* @dash_info: dash pattern or %NULL for a solid line
*
* Stroke the content of a GimpScanConvert. The next
* gimp_scan_convert_render() will result in the outline of the
* polygon defined with the commands above.
*
* You cannot add additional polygons after this command.
*
* Note that if you have nonstandard resolution, "width" gives the
* width (in pixels) for a vertical stroke, i.e. use the X resolution
* to calculate the width of a stroke when operating with real world
* units.
*/
void
gimp_scan_convert_stroke (GimpScanConvert *sc,
@ -464,7 +522,16 @@ gimp_scan_convert_stroke (GimpScanConvert *sc,
}
/* This is a more low level version. Expects a tile manager of depth 1.
/**
* gimp_scan_convert_render:
* @sc: a #GimpScanConvert context
* @tile_manager: the #TileManager to render to
* @off_x: horizontal offset into the @tile_manager
* @off_y: vertical offset into the @tile_manager
* @antialias: whether to apply antialiasiing
*
* Actually renders the @sc to a mask. This function expects a tile
* manager of depth 1.
*
* You cannot add additional polygons after this command.
*/
@ -483,6 +550,21 @@ gimp_scan_convert_render (GimpScanConvert *sc,
antialias, 255);
}
/**
* gimp_scan_convert_render_value:
* @sc: a #GimpScanConvert context
* @tile_manager: the #TileManager to render to
* @off_x: horizontal offset into the @tile_manager
* @off_y: vertical offset into the @tile_manager
* @value: value to use for covered pixels
*
* A variant of gimp_scan_convert_render() that doesn't do
* antialiasing but gives control over the value that should be used
* for pixels covered by the scan conversion . Uncovered pixels are
* set to zero.
*
* You cannot add additional polygons after this command.
*/
void
gimp_scan_convert_render_value (GimpScanConvert *sc,
TileManager *tile_manager,
@ -498,6 +580,19 @@ gimp_scan_convert_render_value (GimpScanConvert *sc,
FALSE, value);
}
/**
* gimp_scan_convert_compose:
* @sc: a #GimpScanConvert context
* @tile_manager: the #TileManager to render to
* @off_x: horizontal offset into the @tile_manager
* @off_y: vertical offset into the @tile_manager
* @value: value to use for covered pixels
*
* This is a variant of gimp_scan_convert_render() that composes the
* (aliased) scan conversion with the content of the @tile_manager.
*
* You cannot add additional polygons after this command.
*/
void
gimp_scan_convert_compose (GimpScanConvert *sc,
GimpChannelOps op,

View File

@ -20,83 +20,42 @@
#define __GIMP_SCAN_CONVERT_H__
/* Create a new scan conversion context.
*/
GimpScanConvert * gimp_scan_convert_new (void);
void gimp_scan_convert_free (GimpScanConvert *scan_converter);
/* set the Pixel-Ratio (width / height) for the pixels.
*/
void gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc,
void gimp_scan_convert_free (GimpScanConvert *sc);
void gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc,
gdouble ratio_xy);
void gimp_scan_convert_set_clip_rectangle (GimpScanConvert *sc,
gint x,
gint y,
gint width,
gint height);
/* Add "npoints" from "pointlist" to the polygon currently being
* described by "scan_converter". DEPRECATED.
*/
void gimp_scan_convert_add_points (GimpScanConvert *scan_converter,
void gimp_scan_convert_set_clip_rectangle (GimpScanConvert *sc,
gint x,
gint y,
gint width,
gint height);
void gimp_scan_convert_add_points (GimpScanConvert *sc,
guint n_points,
GimpVector2 *points,
gboolean new_polygon);
/* Add a polygon with "npoints" "points" that may be open or closed.
* It is not recommended to mix gimp_scan_convert_add_polyline with
* gimp_scan_convert_add_points.
*
* Please note that you should use gimp_scan_convert_stroke() if you
* specify open polygons.
*/
void gimp_scan_convert_add_polyline (GimpScanConvert *sc,
guint n_points,
GimpVector2 *points,
gboolean closed);
/* Stroke the content of a GimpScanConvert. The next
* gimp_scan_convert_to_channel will result in the outline of the polygon
* defined with the commands above.
*
* You cannot add additional polygons after this command.
*
* Note that if you have nonstandard resolution, "width" gives the
* width (in pixels) for a vertical stroke, i.e. use the X-resolution
* to calculate the width of a stroke when operating with real world
* units.
*/
void gimp_scan_convert_stroke (GimpScanConvert *sc,
void gimp_scan_convert_add_polyline (GimpScanConvert *sc,
guint n_points,
GimpVector2 *points,
gboolean closed);
void gimp_scan_convert_stroke (GimpScanConvert *sc,
gdouble width,
GimpJoinStyle join,
GimpCapStyle cap,
gdouble miter,
gdouble dash_offset,
GArray *dash_info);
/* These are more low level version. Expects a tile manager of depth 1.
*
* You cannot add additional polygons after this command.
*/
void gimp_scan_convert_render (GimpScanConvert *scan_converter,
void gimp_scan_convert_render (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
gboolean antialias);
void gimp_scan_convert_render_value (GimpScanConvert *sc,
void gimp_scan_convert_render_value (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
guchar value);
/* This is a variant of gimp_scan_convert_render() that composes the
* (unaliased) scan conversion with the existing drawable content.
*/
void gimp_scan_convert_compose (GimpScanConvert *sc,
void gimp_scan_convert_compose (GimpScanConvert *sc,
GimpChannelOps op,
TileManager *tile_manager,
gint off_x,