Commit 45334e63 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Added support for transforming linked layers, channels and vectors. Fixes

2003-05-12  Michael Natterer  <mitch@gimp.org>

	Added support for transforming linked layers, channels
	and vectors. Fixes bug #86277.

	* app/core/gimpdrawable-transform.[ch]
	(gimp_drawable_transform_tiles_flip): added "gdouble axis" and
	calculate the resulting drawable offset.
	(gimp_drawable_transform_flip): calculate the axis and pass it to
	the function above.
	(gimp_drawable_transform_[tiles_]affine): reordered parameters.

	* app/core/gimpitem.[ch]: added virtual functions GimpItem::flip()
	and GimpItem::transform().

	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/vectors/gimpvectors.c: implement flip() and transform().
	Note that all functions always transform the whole item,
	regardless of a present selection.

	* app/core/Makefile.am
	* app/core/gimpitem-linked.[ch]: new files containing utility
	functions which translate, flip and transform all linked items.

	* app/tools/gimpfliptool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/layer.pdb: use the new gimp_item_linked_*()
	functions to translate, flip and transform all linked items.

	* tools/pdbgen/pdb/transform_tools.pdb: follow
	gimp_drawable_transform_affine() API change.

	* app/pdb/layer_cmds.c
	* app/pdb/transform_tools_cmds.c: regenerated.
parent 305dc2ff
2003-05-12 Michael Natterer <mitch@gimp.org>
Added support for transforming linked layers, channels
and vectors. Fixes bug #86277.
* app/core/gimpdrawable-transform.[ch]
(gimp_drawable_transform_tiles_flip): added "gdouble axis" and
calculate the resulting drawable offset.
(gimp_drawable_transform_flip): calculate the axis and pass it to
the function above.
(gimp_drawable_transform_[tiles_]affine): reordered parameters.
* app/core/gimpitem.[ch]: added virtual functions GimpItem::flip()
and GimpItem::transform().
* app/core/gimpchannel.c
* app/core/gimplayer.c
* app/vectors/gimpvectors.c: implement flip() and transform().
Note that all functions always transform the whole item,
regardless of a present selection.
* app/core/Makefile.am
* app/core/gimpitem-linked.[ch]: new files containing utility
functions which translate, flip and transform all linked items.
* app/tools/gimpfliptool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/layer.pdb: use the new gimp_item_linked_*()
functions to translate, flip and transform all linked items.
* tools/pdbgen/pdb/transform_tools.pdb: follow
gimp_drawable_transform_affine() API change.
* app/pdb/layer_cmds.c
* app/pdb/transform_tools_cmds.c: regenerated.
2003-05-12 Michael Natterer <mitch@gimp.org>
* app/tools/tool_manager.c (tool_manager_tool_changed): make sure
......@@ -129,6 +129,8 @@ libappcore_a_sources = \
gimpimagemap.h \
gimpitem.c \
gimpitem.h \
gimpitem-linked.c \
gimpitem-linked.h \
gimpitemundo.c \
gimpitemundo.h \
gimplayer.c \
......
......@@ -99,10 +99,10 @@ sample_linear(PixelSurround *surround,
TileManager *
gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
TileManager *float_tiles,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
......@@ -140,6 +140,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (float_tiles != NULL, NULL);
g_return_val_if_fail (matrix != NULL, NULL);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -433,7 +434,8 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
TileManager *
gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
TileManager *orig,
GimpOrientationType flip_type)
GimpOrientationType flip_type,
gdouble axis)
{
TileManager *new;
PixelRegion srcPR, destPR;
......@@ -441,6 +443,7 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
gint orig_height;
gint orig_bpp;
gint orig_x, orig_y;
gint flipped_x, flipped_y;
gint i;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
......@@ -451,8 +454,27 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
orig_bpp = tile_manager_bpp (orig);
tile_manager_get_offsets (orig, &orig_x, &orig_y);
flipped_x = orig_x;
flipped_y = orig_y;
switch (flip_type)
{
case GIMP_ORIENTATION_HORIZONTAL:
flipped_x = ROUND (-((gdouble) orig_x +
(gdouble) orig_width - axis) + axis);
break;
case GIMP_ORIENTATION_VERTICAL:
flipped_y = ROUND (-((gdouble) orig_y +
(gdouble) orig_height - axis) + axis);
break;
default:
break;
}
new = tile_manager_new (orig_width, orig_height, orig_bpp);
tile_manager_set_offsets (new, orig_x, orig_y);
tile_manager_set_offsets (new, flipped_x, flipped_y);
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
{
......@@ -475,29 +497,15 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
}
}
#ifdef __GNUC__
#warning FIXME: path_transform_flip_horz/vert
#endif
#if 0
/* flip locked paths */
/* Note that the undo structures etc are setup before we enter this
* function.
*/
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
path_transform_flip_horz (gimage);
else
path_transform_flip_vert (gimage);
#endif
return new;
}
gboolean
gimp_drawable_transform_affine (GimpDrawable *drawable,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction)
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result)
{
GimpImage *gimage;
TileManager *float_tiles;
......@@ -505,6 +513,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
gboolean success = FALSE;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (matrix != NULL, FALSE);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -524,10 +533,10 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
/* transform the buffer */
new_tiles = gimp_drawable_transform_tiles_affine (drawable,
float_tiles,
interpolation_type,
FALSE,
matrix,
GIMP_TRANSFORM_FORWARD,
interpolation_type,
FALSE,
NULL, NULL);
/* Free the cut/copied buffer */
......@@ -569,18 +578,38 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
if (float_tiles)
{
TileManager *new_tiles;
gint off_x, off_y;
gint width, height;
gdouble axis = 0.0;
tile_manager_get_offsets (float_tiles, &off_x, &off_y);
width = tile_manager_width (float_tiles);
height = tile_manager_height (float_tiles);
switch (flip_type)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) width / 2.0);
break;
case GIMP_ORIENTATION_VERTICAL:
axis = ((gdouble) off_y + (gdouble) height / 2.0);
break;
default:
break;
}
/* transform the buffer */
new_tiles = gimp_drawable_transform_tiles_flip (drawable,
float_tiles,
flip_type);
new_tiles = gimp_drawable_transform_tiles_flip (drawable, float_tiles,
flip_type, axis);
/* Free the cut/copied buffer */
tile_manager_destroy (float_tiles);
if (new_tiles)
success = gimp_drawable_transform_paste (drawable,
new_tiles, new_layer);
success = gimp_drawable_transform_paste (drawable, new_tiles,
new_layer);
}
/* push the undo group end */
......
......@@ -40,8 +40,10 @@
#include "gimpimage.h"
#include "gimpimage-projection.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimpchannel.h"
#include "gimpdrawable-transform.h"
#include "gimplayer.h"
#include "gimpparasitelist.h"
......@@ -73,6 +75,16 @@ static void gimp_channel_resize (GimpItem *item,
gint new_height,
gint offx,
gint offy);
static void gimp_channel_flip (GimpItem *item,
GimpOrientationType flip_type,
gdouble axis);
static void gimp_channel_transform (GimpItem *item,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc);
......@@ -136,6 +148,8 @@ gimp_channel_class_init (GimpChannelClass *klass)
item_class->translate = gimp_channel_translate;
item_class->scale = gimp_channel_scale;
item_class->resize = gimp_channel_resize;
item_class->flip = gimp_channel_flip;
item_class->transform = gimp_channel_transform;
item_class->default_name = _("Channel");
item_class->rename_desc = _("Rename Channel");
}
......@@ -380,6 +394,79 @@ gimp_channel_resize (GimpItem *item,
channel->bounds_known = FALSE;
}
static void
gimp_channel_flip (GimpItem *item,
GimpOrientationType flip_type,
gdouble axis)
{
#ifdef __GNUC__
#warning FIXME: implement clip_result for flipping
#endif
g_print ("FIXME: implement channel flipping\n");
#if 0
GimpChannel *channel;
GimpImage *gimage;
TileManager *tiles;
channel = GIMP_CHANNEL (item);
gimage = gimp_item_get_image (item);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Flip Channel"));
tiles = gimp_drawable_transform_tiles_flip (GIMP_DRAWABLE (channel),
GIMP_DRAWABLE (channel)->tiles,
flip_type, axis,
TRUE /* always clip_result */);
if (tiles)
gimp_drawable_transform_paste (GIMP_DRAWABLE (channel), tiles, FALSE);
gimp_image_undo_group_end (gimage);
/* bounds are now unknown */
channel->bounds_known = FALSE;
#endif
}
static void
gimp_channel_transform (GimpItem *item,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpChannel *channel;
GimpImage *gimage;
TileManager *tiles;
channel = GIMP_CHANNEL (item);
gimage = gimp_item_get_image (item);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Transform Channel"));
tiles = gimp_drawable_transform_tiles_affine (GIMP_DRAWABLE (channel),
GIMP_DRAWABLE (channel)->tiles,
matrix, direction,
interpolation_type,
TRUE, /* always clip_result */
progress_callback,
progress_data);
if (tiles)
gimp_drawable_transform_paste (GIMP_DRAWABLE (channel), tiles, FALSE);
gimp_image_undo_group_end (gimage);
/* bounds are now unknown */
channel->bounds_known = FALSE;
}
static void
gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc)
......
......@@ -40,8 +40,10 @@
#include "gimpimage.h"
#include "gimpimage-projection.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimpchannel.h"
#include "gimpdrawable-transform.h"
#include "gimplayer.h"
#include "gimpparasitelist.h"
......@@ -73,6 +75,16 @@ static void gimp_channel_resize (GimpItem *item,
gint new_height,
gint offx,
gint offy);
static void gimp_channel_flip (GimpItem *item,
GimpOrientationType flip_type,
gdouble axis);
static void gimp_channel_transform (GimpItem *item,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data);
static void gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc);
......@@ -136,6 +148,8 @@ gimp_channel_class_init (GimpChannelClass *klass)
item_class->translate = gimp_channel_translate;
item_class->scale = gimp_channel_scale;
item_class->resize = gimp_channel_resize;
item_class->flip = gimp_channel_flip;
item_class->transform = gimp_channel_transform;
item_class->default_name = _("Channel");
item_class->rename_desc = _("Rename Channel");
}
......@@ -380,6 +394,79 @@ gimp_channel_resize (GimpItem *item,
channel->bounds_known = FALSE;
}
static void
gimp_channel_flip (GimpItem *item,
GimpOrientationType flip_type,
gdouble axis)
{
#ifdef __GNUC__
#warning FIXME: implement clip_result for flipping
#endif
g_print ("FIXME: implement channel flipping\n");
#if 0
GimpChannel *channel;
GimpImage *gimage;
TileManager *tiles;
channel = GIMP_CHANNEL (item);
gimage = gimp_item_get_image (item);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Flip Channel"));
tiles = gimp_drawable_transform_tiles_flip (GIMP_DRAWABLE (channel),
GIMP_DRAWABLE (channel)->tiles,
flip_type, axis,
TRUE /* always clip_result */);
if (tiles)
gimp_drawable_transform_paste (GIMP_DRAWABLE (channel), tiles, FALSE);
gimp_image_undo_group_end (gimage);
/* bounds are now unknown */
channel->bounds_known = FALSE;
#endif
}
static void
gimp_channel_transform (GimpItem *item,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
GimpChannel *channel;
GimpImage *gimage;
TileManager *tiles;
channel = GIMP_CHANNEL (item);
gimage = gimp_item_get_image (item);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Transform Channel"));
tiles = gimp_drawable_transform_tiles_affine (GIMP_DRAWABLE (channel),
GIMP_DRAWABLE (channel)->tiles,
matrix, direction,
interpolation_type,
TRUE, /* always clip_result */
progress_callback,
progress_data);
if (tiles)
gimp_drawable_transform_paste (GIMP_DRAWABLE (channel), tiles, FALSE);
gimp_image_undo_group_end (gimage);
/* bounds are now unknown */
channel->bounds_known = FALSE;
}
static void
gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc)
......
......@@ -99,10 +99,10 @@ sample_linear(PixelSurround *surround,
TileManager *
gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
TileManager *float_tiles,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data)
{
......@@ -140,6 +140,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (float_tiles != NULL, NULL);
g_return_val_if_fail (matrix != NULL, NULL);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -433,7 +434,8 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
TileManager *
gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
TileManager *orig,
GimpOrientationType flip_type)
GimpOrientationType flip_type,
gdouble axis)
{
TileManager *new;
PixelRegion srcPR, destPR;
......@@ -441,6 +443,7 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
gint orig_height;
gint orig_bpp;
gint orig_x, orig_y;
gint flipped_x, flipped_y;
gint i;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
......@@ -451,8 +454,27 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
orig_bpp = tile_manager_bpp (orig);
tile_manager_get_offsets (orig, &orig_x, &orig_y);
flipped_x = orig_x;
flipped_y = orig_y;
switch (flip_type)
{
case GIMP_ORIENTATION_HORIZONTAL:
flipped_x = ROUND (-((gdouble) orig_x +
(gdouble) orig_width - axis) + axis);
break;
case GIMP_ORIENTATION_VERTICAL:
flipped_y = ROUND (-((gdouble) orig_y +
(gdouble) orig_height - axis) + axis);
break;
default:
break;
}
new = tile_manager_new (orig_width, orig_height, orig_bpp);
tile_manager_set_offsets (new, orig_x, orig_y);
tile_manager_set_offsets (new, flipped_x, flipped_y);
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
{
......@@ -475,29 +497,15 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
}
}
#ifdef __GNUC__
#warning FIXME: path_transform_flip_horz/vert
#endif
#if 0
/* flip locked paths */
/* Note that the undo structures etc are setup before we enter this
* function.
*/
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
path_transform_flip_horz (gimage);
else
path_transform_flip_vert (gimage);
#endif
return new;
}
gboolean
gimp_drawable_transform_affine (GimpDrawable *drawable,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction)
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result)
{
GimpImage *gimage;
TileManager *float_tiles;
......@@ -505,6 +513,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
gboolean success = FALSE;
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (matrix != NULL, FALSE);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -524,10 +533,10 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
/* transform the buffer */
new_tiles = gimp_drawable_transform_tiles_affine (drawable,
float_tiles,
interpolation_type,
FALSE,
matrix,
GIMP_TRANSFORM_FORWARD,
interpolation_type,
FALSE,
NULL, NULL);
/* Free the cut/copied buffer */
......@@ -569,18 +578,38 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
if (float_tiles)
{
TileManager *new_tiles;
gint off_x, off_y;
gint width, height;
gdouble axis = 0.0;
tile_manager_get_offsets (float_tiles, &off_x, &off_y);
width = tile_manager_width (float_tiles);
height = tile_manager_height (float_tiles);
switch (flip_type)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) width / 2.0);
break;
case GIMP_ORIENTATION_VERTICAL:
axis = ((gdouble) off_y + (gdouble) height / 2.0);
break;
default:
break;
}
/* transform the buffer */
new_tiles = gimp_drawable_transform_tiles_flip (drawable,
float_tiles,
flip_type);
new_tiles = gimp_drawable_transform_tiles_flip (drawable, float_tiles,
flip_type, axis);
/* Free the cut/copied buffer */
tile_manager_destroy (float_tiles);
if (new_tiles)
success = gimp_drawable_transform_paste (drawable,
new_tiles, new_layer);
success = gimp_drawable_transform_paste (drawable, new_tiles,
new_layer);
}
/* push the undo group end */
......
......@@ -35,21 +35,22 @@ typedef enum
TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
TileManager *float_tiles,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpProgressFunc progress_callback,
gpointer progress_data);
TileManager * gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
TileManager *orig,
GimpOrientationType flip_type);
GimpOrientationType flip_type,
gdouble axis);
gboolean gimp_drawable_transform_affine (GimpDrawable *drawable,
GimpInterpolationType interpolation_type,
gboolean clip_result,
GimpMatrix3 matrix,
GimpTransformDirection direction);
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gboolean clip_result);
gboolean gimp_drawable_transform_flip (GimpDrawable *drawable,
GimpOrientationType flip_type);
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "core-types.h"
#include "gimpimage.h"
#include "gimpitem.h"
#include "gimpitem-linked.h"
#include "gimplist.h"
void
gimp_item_linked_translate (GimpItem *item,
gint offset_x,
gint offset_y,
gboolean push_undo)
{
GimpImage *gimage;
GimpItem *linked_item;
GList *list;
g_return_if_fail (GIMP_IS_ITEM (item));
gimage = gimp_item_get_image (item);
g_return_if_fail (GIMP_IS_IMAGE (gimage));
for (list = GIMP_LIST (gimage->layers)->list;
list;
list = g_list_next (list))
{
linked_item = (GimpItem *) list->data;
if (linked_item != item && gimp_item_get_linked (linked_item))
gimp_item_translate (linked_item, offset_x, offset_y, push_undo);
}
for (list = GIMP_LIST (gimage->channels)->list;
list;
list = g_list_next (list))
{
linked_item = (GimpItem *) list->data;
if (linked_item != item && gimp_item_get_linked (linked_item))
gimp_item_translate (linked_item, offset_x, offset_y, push_undo);
}
for (list = GIMP_LIST (gimage->vectors)->list;
list;
list = g_list_next (list))
{
linked_item = (GimpItem *) list->data;
if (linked_item != item && gimp_item_get_linked (linked_item))
gimp_item_translate (linked_item, offset_x, offset_y, push_undo);
}
}
void
gimp_item_linked_flip (GimpItem *item,
GimpOrientationType flip_type,
gdouble axis)
{
GimpImage *gimage;
GimpItem *linked_item;
GList *list;
g_return_if_fail (GIMP_IS_ITEM (item));
gimage = gimp_item_get_image (item);
g_return_if_fail (GIMP_IS_IMAGE (gimage));
for (list = GIMP_LIST (gimage->layers)->list;
list;
list = g_list_next (list))
{
linked_item = (GimpItem *) list->data;
if (linked_item != item && gimp_item_get_linked (linked_item))
gimp_item_flip (linked_item, flip_type, axis);
}
for (list = GIMP_LIST (gimage->channels)->list;
list;
list = g_list_next (list))
{
linked_item = (GimpItem *) list->data;