libgimpcolor: rudimentary docs for gimp_adaptive_supersample_area()

and proper callback annotations. Also move the three callback typedefs
from gimpcolortypes.h to gimpadaptivesupersample.h because they are
needed nowhere else.
This commit is contained in:
Michael Natterer 2019-08-09 15:24:49 +02:00
parent 9454567e8c
commit b45c2a6f78
3 changed files with 32 additions and 15 deletions

View File

@ -238,6 +238,26 @@ gimp_render_sub_pixel (gint max_depth,
return num_samples;
}
/**
* gimp_adaptive_supersample_area:
* @x1: left x coordinate of the area to process.
* @y1: top y coordinate of the area to process.
* @x2: right x coordinate of the area to process.
* @y2: bottom y coordinate of the area to process.
* @max_depth: maximum depth of supersampling.
* @threshold: lower threshold of pixel difference that stops
* supersampling.
* @render_func: (scope call): function calculate the color value at
* given coordinates.
* @render_data: user data passed to @render_func.
* @put_pixel_func: (scope call): function to a pixels to a color at
* given coordinates.
* @put_pixel_data: user data passed to @put_pixel_func.
* @progress_func: (scope call): function to report progress.
* @progress_data: user data passed to @progress_func.
*
* Returns: the number of pixels processed.
**/
gulong
gimp_adaptive_supersample_area (gint x1,
gint y1,

View File

@ -28,7 +28,18 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
/* adaptive supersampling function taken from LibGCK */
typedef void (* GimpRenderFunc) (gdouble x,
gdouble y,
GimpRGB *color,
gpointer data);
typedef void (* GimpPutPixelFunc) (gint x,
gint y,
GimpRGB *color,
gpointer data);
typedef void (* GimpProgressFunc) (gint min,
gint max,
gint current,
gpointer data);
gulong gimp_adaptive_supersample_area (gint x1,

View File

@ -107,20 +107,6 @@ struct _GimpCMYK
};
typedef void (* GimpRenderFunc) (gdouble x,
gdouble y,
GimpRGB *color,
gpointer data);
typedef void (* GimpPutPixelFunc) (gint x,
gint y,
GimpRGB *color,
gpointer data);
typedef void (* GimpProgressFunc) (gint min,
gint max,
gint current,
gpointer data);
G_END_DECLS
#endif /* __GIMP_COLOR_TYPES_H__ */