Index: app/core/gimpdrawable-transform.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-transform.c,v
retrieving revision 1.103
diff -u -3 -r1.103 gimpdrawable-transform.c
--- app/core/gimpdrawable-transform.c	31 Aug 2004 14:17:33 -0000	1.103
+++ app/core/gimpdrawable-transform.c	9 Oct 2004 05:36:10 -0000
@@ -912,9 +912,12 @@
 }
 
 gboolean
-gimp_drawable_transform_flip (GimpDrawable        *drawable,
-                              GimpContext         *context,
-                              GimpOrientationType  flip_type)
+_gimp_drawable_transform_flip_real (GimpDrawable        *drawable,
+                                    GimpContext         *context,
+                                    GimpOrientationType  flip_type,
+                                    gboolean             auto_axis,
+                                    gdouble               axis_coordinate,
+                                    gboolean clip_result)
 {
   GimpImage   *gimage;
   TileManager *orig_tiles;
@@ -944,24 +947,32 @@
       width  = tile_manager_width  (orig_tiles);
       height = tile_manager_height (orig_tiles);
 
-      switch (flip_type)
+      if (auto_axis)
         {
-        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;
+          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;
+            }
+        }
+      else
+        {
+          axis = axis_coordinate;
         }
 
       /* transform the buffer */
       new_tiles = gimp_drawable_transform_tiles_flip (drawable, context,
                                                       orig_tiles,
-                                                      flip_type, axis, FALSE);
+                                                      flip_type,
+                                                      axis, clip_result);
 
       /* Free the cut/copied buffer */
       tile_manager_unref (orig_tiles);
@@ -981,6 +992,36 @@
 }
 
 gboolean
+gimp_drawable_transform_flip (GimpDrawable        *drawable,
+                              GimpContext         *context,
+                              GimpOrientationType  flip_type)
+  {
+    return _gimp_drawable_transform_flip_real (drawable,
+                                               context,
+                                               flip_type,
+                                               TRUE, 0.0,
+                                               FALSE
+                                              );
+  }
+
+gboolean
+gimp_drawable_transform_flip_extended (GimpDrawable        *drawable,
+                                       GimpContext         *context,
+                                       GimpOrientationType  flip_type,
+                                       gboolean             auto_axis,
+                                       gdouble              axis_coordinate,
+                                       gboolean clip_result)
+  {
+    return _gimp_drawable_transform_flip_real (drawable,
+                                               context,
+                                               flip_type,
+                                               auto_axis,
+                                               axis_coordinate,
+                                               clip_result
+                                              );
+  }
+
+gboolean
 gimp_drawable_transform_rotate (GimpDrawable     *drawable,
                                 GimpContext      *context,
                                 GimpRotationType  rotate_type)
Index: app/core/gimpdrawable-transform.h
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-transform.h,v
retrieving revision 1.13
diff -u -3 -r1.13 gimpdrawable-transform.h
--- app/core/gimpdrawable-transform.h	31 Aug 2004 14:17:33 -0000	1.13
+++ app/core/gimpdrawable-transform.h	9 Oct 2004 05:36:10 -0000
@@ -70,7 +70,13 @@
 gboolean      gimp_drawable_transform_flip         (GimpDrawable           *drawable,
                                                     GimpContext            *context,
                                                     GimpOrientationType     flip_type);
-
+                                                    
+gboolean     gimp_drawable_transform_flip_extended (GimpDrawable        *drawable,
+                                                    GimpContext         *context,
+                                                    GimpOrientationType  flip_type,
+                                                    gboolean             auto_axis,
+                                                    gdouble              axis_coordinate,
+                                                    gboolean             clip_result);
 
 gboolean      gimp_drawable_transform_rotate       (GimpDrawable           *drawable,
                                                     GimpContext            *context,
Index: libgimp/Makefile.am
===================================================================
RCS file: /cvs/gnome/gimp/libgimp/Makefile.am,v
retrieving revision 1.151
diff -u -3 -r1.151 Makefile.am
--- libgimp/Makefile.am	28 Sep 2004 23:23:09 -0000	1.151
+++ libgimp/Makefile.am	9 Oct 2004 05:36:10 -0000
@@ -82,7 +82,8 @@
 	gimpcontext_pdb.c		\
 	gimpconvert_pdb.c		\
 	gimpdisplay_pdb.c		\
-	gimpdrawable_pdb.c		\
+	gimpdrawable_pdb.c	    \
+    gimpdrawabletransform_pdb.c    \
 	gimpedit_pdb.c			\
 	gimpfileops_pdb.c		\
 	gimpfloatingsel_pdb.c		\
@@ -128,6 +129,7 @@
 	gimpconvert_pdb.h		\
 	gimpdisplay_pdb.h		\
 	gimpdrawable_pdb.h		\
+    gimpdrawabletransform_pdb.h    \
 	gimpedit_pdb.h			\
 	gimpfileops_pdb.h		\
 	gimpfloatingsel_pdb.h		\
Index: app/pdb/Makefile.am
===================================================================
RCS file: /cvs/gnome/gimp/app/pdb/Makefile.am,v
retrieving revision 1.27
diff -u -3 -r1.27 Makefile.am
--- app/pdb/Makefile.am	28 Sep 2004 22:01:20 -0000	1.27
+++ app/pdb/Makefile.am	9 Oct 2004 05:36:10 -0000
@@ -19,6 +19,7 @@
 	convert_cmds.c		\
 	display_cmds.c		\
 	drawable_cmds.c		\
+    drawable_transform_cmds.c    \
 	edit_cmds.c		\
 	fileops_cmds.c		\
 	floating_sel_cmds.c	\
Index: tools/pdbgen/Makefile.am
===================================================================
RCS file: /cvs/gnome/gimp/tools/pdbgen/Makefile.am,v
retrieving revision 1.79
diff -u -3 -r1.79 Makefile.am
--- tools/pdbgen/Makefile.am	28 Sep 2004 22:01:20 -0000	1.79
+++ tools/pdbgen/Makefile.am	9 Oct 2004 05:36:10 -0000
@@ -11,6 +11,7 @@
 	pdb/convert.pdb		\
 	pdb/display.pdb		\
 	pdb/drawable.pdb	\
+	pdb/drawable_transform.pdb	\    
 	pdb/edit.pdb		\
 	pdb/fileops.pdb		\
 	pdb/floating_sel.pdb	\
