[gimp] libgimpcolor: rudimentary docs for gimp_adaptive_supersample_area()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpcolor: rudimentary docs for gimp_adaptive_supersample_area()
- Date: Fri, 9 Aug 2019 13:26:24 +0000 (UTC)
commit b45c2a6f787468325c461b282941f142eeb67254
Author: Michael Natterer <mitch gimp org>
Date: Fri Aug 9 15:24:49 2019 +0200
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.
libgimpcolor/gimpadaptivesupersample.c | 20 ++++++++++++++++++++
libgimpcolor/gimpadaptivesupersample.h | 13 ++++++++++++-
libgimpcolor/gimpcolortypes.h | 14 --------------
3 files changed, 32 insertions(+), 15 deletions(-)
---
diff --git a/libgimpcolor/gimpadaptivesupersample.c b/libgimpcolor/gimpadaptivesupersample.c
index 3b9bedcf41..ef1cbf1cb9 100644
--- a/libgimpcolor/gimpadaptivesupersample.c
+++ b/libgimpcolor/gimpadaptivesupersample.c
@@ -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,
diff --git a/libgimpcolor/gimpadaptivesupersample.h b/libgimpcolor/gimpadaptivesupersample.h
index fdee486f85..9cb2f823c7 100644
--- a/libgimpcolor/gimpadaptivesupersample.h
+++ b/libgimpcolor/gimpadaptivesupersample.h
@@ -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,
diff --git a/libgimpcolor/gimpcolortypes.h b/libgimpcolor/gimpcolortypes.h
index 565df1bd17..539f1d77f9 100644
--- a/libgimpcolor/gimpcolortypes.h
+++ b/libgimpcolor/gimpcolortypes.h
@@ -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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]