2003-05-13 Michael Natterer <mitch@gimp.org> * app/core/gimpitem.[ch]: added "gboolean clip_result" to GimpItem::flip(). * app/vectors/gimpvectors.c * app/tools/gimpfliptool.c: changed accordingly. * app/core/gimpdrawable.c: implement GimpItem::flip() and GimpItem::transform(). * app/core/gimpchannel.c * app/core/gimplayer.c: chain up in flip() and transform() and do only the layer/channel specific stuff here. * app/core/gimpdrawable-transform.[ch]: fixed indentation. (gimp_drawable_transform_tiles_flip): added "gboolean clip_result" and warn that it is not yet implemented. (gimp_drawable_transform_tiles_affine): when transforming a channel set bg_color to transparent. Clip channels (but not layer masks) only if the passed tiles have bpp == 1 (the channel is unfloated). (gimp_drawable_transform_affine): clip all unfloated channels. * app/core/gimpitem-linked.[ch]: added gimp_item_linked_get_list() utility function to avoind iterating all layers/channels/vectors in all functions. * app/tools/gimptransformtool.c: clip all unfloated channels. The clipping fixes above together fix bug #112858.
66 lines
3 KiB
C
66 lines
3 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995-2001 Spencer Kimball, Peter Mattis, and others
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef __GIMP_DRAWABLE_TRANSFORM_H__
|
|
#define __GIMP_DRAWABLE_TRANSFORM_H__
|
|
|
|
|
|
typedef enum
|
|
{
|
|
X0,
|
|
Y0,
|
|
X1,
|
|
Y1,
|
|
X2,
|
|
Y2,
|
|
X3,
|
|
Y3
|
|
} GimpTransformBoundingBox;
|
|
|
|
|
|
TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|
TileManager *float_tiles,
|
|
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,
|
|
gdouble axis,
|
|
gboolean clip_result);
|
|
|
|
gboolean gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|
GimpMatrix3 matrix,
|
|
GimpTransformDirection direction,
|
|
GimpInterpolationType interpolation_type,
|
|
gboolean clip_result);
|
|
gboolean gimp_drawable_transform_flip (GimpDrawable *drawable,
|
|
GimpOrientationType flip_type);
|
|
|
|
|
|
TileManager * gimp_drawable_transform_cut (GimpDrawable *drawable,
|
|
gboolean *new_layer);
|
|
gboolean gimp_drawable_transform_paste (GimpDrawable *drawable,
|
|
TileManager *tiles,
|
|
gboolean new_layer);
|
|
|
|
|
|
#endif /* __GIMP_DRAWABLE_TRANSFORM_H__ */
|