mirror of https://github.com/GNOME/gimp.git
changed order of parameters to be consistent with gimp_drawable_process().
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. svn path=/trunk/; revision=25754
This commit is contained in:
parent
e3ffcae1bb
commit
8a62ba6a5d
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
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.
|
||||
|
||||
2008-05-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpimagemaptool.[ch]: s/save/export/g,
|
||||
|
|
|
@ -67,9 +67,8 @@ gimp_drawable_brightness_contrast (GimpDrawable *drawable,
|
|||
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 @@ gimp_drawable_brightness_contrast (GimpDrawable *drawable,
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,9 +77,8 @@ gimp_drawable_color_balance (GimpDrawable *drawable,
|
|||
"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
|
||||
|
|
|
@ -70,9 +70,8 @@ gimp_drawable_colorize (GimpDrawable *drawable,
|
|||
"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
|
||||
|
|
|
@ -162,9 +162,8 @@ gimp_drawable_curves (GimpDrawable *drawable,
|
|||
"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 @@ gimp_drawable_curves (GimpDrawable *drawable,
|
|||
&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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,9 +68,8 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
|
|||
|
||||
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
|
||||
|
|
|
@ -50,8 +50,6 @@ gimp_drawable_equalize (GimpDrawable *drawable,
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -75,9 +75,8 @@ gimp_drawable_hue_saturation (GimpDrawable *drawable,
|
|||
"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
|
||||
|
|
|
@ -52,18 +52,15 @@ gimp_drawable_invert (GimpDrawable *drawable,
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,28 +151,23 @@ gimp_drawable_levels_internal (GimpDrawable *drawable,
|
|||
"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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 @@ gimp_drawable_apply_operation (GimpDrawable *drawable,
|
|||
|
||||
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,
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -67,9 +67,8 @@ gimp_drawable_posterize (GimpDrawable *drawable,
|
|||
"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 @@ gimp_drawable_posterize (GimpDrawable *drawable,
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 @@ gimp_drawable_process (GimpDrawable *drawable,
|
|||
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_process (GimpDrawable *drawable,
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -68,9 +68,8 @@ gimp_drawable_threshold (GimpDrawable *drawable,
|
|||
"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
|
||||
|
|
Loading…
Reference in New Issue