[gimp] plug-ins: Port common/curve-bend.c to new item transform API



commit 719e04f5d9563efc0c4a94bac8c5a09fa3aa192d
Author: Martin Nordholts <martinn src gnome org>
Date:   Wed Oct 6 19:30:09 2010 +0200

    plug-ins: Port common/curve-bend.c to new item transform API

 plug-ins/common/curve-bend.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/curve-bend.c b/plug-ins/common/curve-bend.c
index b0e223a..da67755 100644
--- a/plug-ins/common/curve-bend.c
+++ b/plug-ins/common/curve-bend.c
@@ -414,9 +414,16 @@ p_gimp_rotate (gint32  image_id,
 
   l_angle_rad = (angle_deg * G_PI) / 180.0;
 
-  l_rc = gimp_drawable_transform_rotate_default (drawable_id, l_angle_rad,
-                                                 TRUE, 0, 0, interpolation,
-                                                 FALSE);
+  gimp_context_push ();
+  if (! interpolation)
+    gimp_context_set_interpolation (GIMP_INTERPOLATION_NONE);
+  gimp_context_set_transform_resize (GIMP_TRANSFORM_RESIZE_ADJUST);
+  l_rc = gimp_item_transform_rotate (drawable_id,
+                                     l_angle_rad,
+                                     TRUE /*auto_center*/,
+                                     -1.0 /*center_x*/,
+                                     -1.0 /*center_y*/);
+  gimp_context_pop ();
 
   if (l_rc == -1)
     g_printerr ("Error: gimp_drawable_transform_rotate_default call failed\n");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]