gimp r25754 - in trunk: . app/core
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25754 - in trunk: . app/core
- Date: Thu, 22 May 2008 11:52:02 +0000 (UTC)
Author: neo
Date: Thu May 22 11:52:02 2008
New Revision: 25754
URL: http://svn.gnome.org/viewvc/gimp?rev=25754&view=rev
Log:
2008-05-22 Sven Neumann <sven gimp org>
* app/core/gimpdrawable-operation.[ch]
(gimp_drawable_apply_operation): changed order of parameters to be
consistent with gimp_drawable_process().
* app/core/gimpdrawable-process.[ch]: introduced a variant of
gimp_drawable_process() for processing a GimpLut with
gimp_lut_process().
* app/core/gimpdrawable-brightness-contrast.c
* app/core/gimpdrawable-color-balance.c
* app/core/gimpdrawable-colorize.c
* app/core/gimpdrawable-curves.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-hue-saturation.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-levels.c
* app/core/gimpdrawable-posterize.c
* app/core/gimpdrawable-threshold.c: changed accordingly.
Modified:
trunk/ChangeLog
trunk/app/core/gimpdrawable-brightness-contrast.c
trunk/app/core/gimpdrawable-color-balance.c
trunk/app/core/gimpdrawable-colorize.c
trunk/app/core/gimpdrawable-curves.c
trunk/app/core/gimpdrawable-desaturate.c
trunk/app/core/gimpdrawable-equalize.c
trunk/app/core/gimpdrawable-hue-saturation.c
trunk/app/core/gimpdrawable-invert.c
trunk/app/core/gimpdrawable-levels.c
trunk/app/core/gimpdrawable-operation.c
trunk/app/core/gimpdrawable-operation.h
trunk/app/core/gimpdrawable-posterize.c
trunk/app/core/gimpdrawable-process.c
trunk/app/core/gimpdrawable-process.h
trunk/app/core/gimpdrawable-threshold.c
Modified: trunk/app/core/gimpdrawable-brightness-contrast.c
==============================================================================
--- trunk/app/core/gimpdrawable-brightness-contrast.c (original)
+++ trunk/app/core/gimpdrawable-brightness-contrast.c Thu May 22 11:52:02 2008
@@ -67,9 +67,8 @@
NULL);
gimp_brightness_contrast_config_set_node (config, node);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Brightness_Contrast"));
-
+ gimp_drawable_apply_operation (drawable, progress,
+ _("Brightness_Contrast"), node, TRUE);
g_object_unref (node);
}
else
@@ -80,9 +79,8 @@
config->contrast,
gimp_drawable_bytes (drawable));
- gimp_drawable_process (drawable, progress, _("Brightness-Contrast"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, progress, _("Brightness-Contrast"),
+ lut);
gimp_lut_free (lut);
}
Modified: trunk/app/core/gimpdrawable-color-balance.c
==============================================================================
--- trunk/app/core/gimpdrawable-color-balance.c (original)
+++ trunk/app/core/gimpdrawable-color-balance.c Thu May 22 11:52:02 2008
@@ -77,9 +77,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Color Balance"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Color Balance"),
+ node, TRUE);
g_object_unref (node);
}
else
Modified: trunk/app/core/gimpdrawable-colorize.c
==============================================================================
--- trunk/app/core/gimpdrawable-colorize.c (original)
+++ trunk/app/core/gimpdrawable-colorize.c Thu May 22 11:52:02 2008
@@ -70,9 +70,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Colorize"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Colorize"),
+ node, TRUE);
g_object_unref (node);
}
else
Modified: trunk/app/core/gimpdrawable-curves.c
==============================================================================
--- trunk/app/core/gimpdrawable-curves.c (original)
+++ trunk/app/core/gimpdrawable-curves.c Thu May 22 11:52:02 2008
@@ -162,9 +162,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Curves"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Curves"),
+ node, TRUE);
g_object_unref (node);
}
else
@@ -180,9 +179,7 @@
&cruft,
gimp_drawable_bytes (drawable));
- gimp_drawable_process (drawable, progress, _("Curves"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, progress, _("Curves"), lut);
gimp_lut_free (lut);
}
}
Modified: trunk/app/core/gimpdrawable-desaturate.c
==============================================================================
--- trunk/app/core/gimpdrawable-desaturate.c (original)
+++ trunk/app/core/gimpdrawable-desaturate.c Thu May 22 11:52:02 2008
@@ -68,9 +68,8 @@
g_object_unref (config);
- gimp_drawable_apply_operation (drawable, desaturate, TRUE,
- progress, _("Desaturate"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Desaturate"),
+ desaturate, TRUE);
g_object_unref (desaturate);
}
else
Modified: trunk/app/core/gimpdrawable-equalize.c
==============================================================================
--- trunk/app/core/gimpdrawable-equalize.c (original)
+++ trunk/app/core/gimpdrawable-equalize.c Thu May 22 11:52:02 2008
@@ -50,8 +50,6 @@
lut = equalize_lut_new (hist, gimp_drawable_bytes (drawable));
gimp_histogram_unref (hist);
- gimp_drawable_process (drawable, NULL, _("Equalize"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, NULL, _("Equalize"), lut);
gimp_lut_free (lut);
}
Modified: trunk/app/core/gimpdrawable-hue-saturation.c
==============================================================================
--- trunk/app/core/gimpdrawable-hue-saturation.c (original)
+++ trunk/app/core/gimpdrawable-hue-saturation.c Thu May 22 11:52:02 2008
@@ -75,9 +75,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Hue-Saturation"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Hue-Saturation"),
+ node, TRUE);
g_object_unref (node);
}
else
Modified: trunk/app/core/gimpdrawable-invert.c
==============================================================================
--- trunk/app/core/gimpdrawable-invert.c (original)
+++ trunk/app/core/gimpdrawable-invert.c Thu May 22 11:52:02 2008
@@ -52,18 +52,15 @@
invert = g_object_new (GEGL_TYPE_NODE, "operation", "invert", NULL);
- gimp_drawable_apply_operation (drawable, invert, TRUE,
- progress, _("Invert"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Invert"),
+ invert, TRUE);
g_object_unref (invert);
}
else
{
GimpLut *lut = invert_lut_new (gimp_drawable_bytes (drawable));
- gimp_drawable_process (drawable, progress, _("Invert"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, progress, _("Invert"), lut);
gimp_lut_free (lut);
}
}
Modified: trunk/app/core/gimpdrawable-levels.c
==============================================================================
--- trunk/app/core/gimpdrawable-levels.c (original)
+++ trunk/app/core/gimpdrawable-levels.c Thu May 22 11:52:02 2008
@@ -151,28 +151,23 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, levels, TRUE,
- progress, _("Levels"));
+ gimp_drawable_apply_operation (drawable, progress, _("Levels"),
+ levels, TRUE);
g_object_unref (levels);
}
else
{
Levels levels;
- GimpLut *lut;
+ GimpLut *lut = gimp_lut_new ();
gimp_levels_config_to_cruft (config, &levels,
gimp_drawable_is_rgb (drawable));
-
- lut = gimp_lut_new ();
gimp_lut_setup (lut,
- (GimpLutFunc) levels_lut_func,
- &levels,
+ (GimpLutFunc) levels_lut_func, &levels,
gimp_drawable_bytes (drawable));
- gimp_drawable_process (drawable, progress, _("Levels"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, progress, _("Levels"), lut);
gimp_lut_free (lut);
}
}
Modified: trunk/app/core/gimpdrawable-operation.c
==============================================================================
--- trunk/app/core/gimpdrawable-operation.c (original)
+++ trunk/app/core/gimpdrawable-operation.c Thu May 22 11:52:02 2008
@@ -36,15 +36,16 @@
#warning FIXME: gegl_node_add_child() is not public API
#endif
-extern GeglNode * gegl_node_add_child (GeglNode *self,
- GeglNode *child);
+extern GeglNode * gegl_node_add_child (GeglNode *self,
+ GeglNode *child);
+
void
gimp_drawable_apply_operation (GimpDrawable *drawable,
- GeglNode *operation,
- gboolean linear,
GimpProgress *progress,
- const gchar *undo_desc)
+ const gchar *undo_desc,
+ GeglNode *operation,
+ gboolean linear)
{
GeglNode *gegl;
GeglNode *input;
@@ -55,9 +56,9 @@
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
- g_return_if_fail (GEGL_IS_NODE (operation));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (undo_desc != NULL);
+ g_return_if_fail (GEGL_IS_NODE (operation));
if (! gimp_drawable_mask_intersect (drawable,
&rect.x, &rect.y,
Modified: trunk/app/core/gimpdrawable-operation.h
==============================================================================
--- trunk/app/core/gimpdrawable-operation.h (original)
+++ trunk/app/core/gimpdrawable-operation.h Thu May 22 11:52:02 2008
@@ -26,10 +26,10 @@
void gimp_drawable_apply_operation (GimpDrawable *drawable,
- GeglNode *operation,
- gboolean linear,
GimpProgress *progress,
- const gchar *undo_desc);
+ const gchar *undo_desc,
+ GeglNode *operation,
+ gboolean linear);
#endif /* __GIMP_DRAWABLE_OPERATION_H__ */
Modified: trunk/app/core/gimpdrawable-posterize.c
==============================================================================
--- trunk/app/core/gimpdrawable-posterize.c (original)
+++ trunk/app/core/gimpdrawable-posterize.c Thu May 22 11:52:02 2008
@@ -67,9 +67,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Posterize"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Posterize"),
+ node, TRUE);
g_object_unref (node);
}
else
@@ -78,9 +77,7 @@
lut = posterize_lut_new (config->levels, gimp_drawable_bytes (drawable));
- gimp_drawable_process (drawable, progress, _("Posterize"),
- (PixelProcessorFunc) gimp_lut_process, lut);
-
+ gimp_drawable_process_lut (drawable, progress, _("Posterize"), lut);
gimp_lut_free (lut);
}
Modified: trunk/app/core/gimpdrawable-process.c
==============================================================================
--- trunk/app/core/gimpdrawable-process.c (original)
+++ trunk/app/core/gimpdrawable-process.c Thu May 22 11:52:02 2008
@@ -22,6 +22,7 @@
#include "core-types.h"
+#include "base/gimplut.h"
#include "base/pixel-processor.h"
#include "base/pixel-region.h"
@@ -43,6 +44,7 @@
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
+ g_return_if_fail (undo_desc != NULL);
if (gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
{
@@ -61,3 +63,12 @@
gimp_drawable_update (drawable, x, y, width, height);
}
}
+void
+gimp_drawable_process_lut (GimpDrawable *drawable,
+ GimpProgress *progress,
+ const gchar *undo_desc,
+ GimpLut *lut)
+{
+ gimp_drawable_process (drawable, progress, undo_desc,
+ (PixelProcessorFunc) gimp_lut_process, lut);
+}
Modified: trunk/app/core/gimpdrawable-process.h
==============================================================================
--- trunk/app/core/gimpdrawable-process.h (original)
+++ trunk/app/core/gimpdrawable-process.h Thu May 22 11:52:02 2008
@@ -20,11 +20,15 @@
#define __GIMP_DRAWABLE_PROCESS_H__
-void gimp_drawable_process (GimpDrawable *drawable,
- GimpProgress *progress,
- const gchar *undo_desc,
- PixelProcessorFunc func,
- gpointer data);
+void gimp_drawable_process (GimpDrawable *drawable,
+ GimpProgress *progress,
+ const gchar *undo_desc,
+ PixelProcessorFunc func,
+ gpointer data);
+void gimp_drawable_process_lut (GimpDrawable *drawable,
+ GimpProgress *progress,
+ const gchar *undo_desc,
+ GimpLut *lut);
#endif /* __GIMP_DRAWABLE_PROCESS_H__ */
Modified: trunk/app/core/gimpdrawable-threshold.c
==============================================================================
--- trunk/app/core/gimpdrawable-threshold.c (original)
+++ trunk/app/core/gimpdrawable-threshold.c Thu May 22 11:52:02 2008
@@ -68,9 +68,8 @@
"config", config,
NULL);
- gimp_drawable_apply_operation (drawable, node, TRUE,
- progress, _("Threshold"));
-
+ gimp_drawable_apply_operation (drawable, progress, _("Threshold"),
+ node, TRUE);
g_object_unref (node);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]