gimp r24945 - in branches/gimp-2-4: . plug-ins/common



Author: neo
Date: Fri Feb 22 09:40:46 2008
New Revision: 24945
URL: http://svn.gnome.org/viewvc/gimp?rev=24945&view=rev

Log:
2008-02-22  Sven Neumann  <sven gimp org>

	Merged from trunk:

	* plug-ins/common/tileit.c
	* plug-ins/common/warp.c
	* plug-ins/common/struc.c: fixed the same problem as in the Wind
	plug-in here as well (see bug #516369).


Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/plug-ins/common/struc.c
   branches/gimp-2-4/plug-ins/common/tileit.c
   branches/gimp-2-4/plug-ins/common/warp.c

Modified: branches/gimp-2-4/plug-ins/common/struc.c
==============================================================================
--- branches/gimp-2-4/plug-ins/common/struc.c	(original)
+++ branches/gimp-2-4/plug-ins/common/struc.c	Fri Feb 22 09:40:46 2008
@@ -1374,15 +1374,13 @@
        *  faster, since fewer pixels need to be operated on).
        */
       if (! gimp_drawable_mask_intersect (drawable->drawable_id,
-                                          &x1, &y1, &x2, &y2))
+                                          &x1, &y1, &width, &height))
         return;
 
-      /* Get the size of the input image. (This will/must be the same
-       *  as the size of the output image.
-       */
-      width = x2 - x1;
-      height = y2 - y1;
+      x2 = x1 + width;
+      y2 = y1 + height;
     }
+
   bytes = drawable->bpp;
 
   /*  allocate row buffers  */

Modified: branches/gimp-2-4/plug-ins/common/tileit.c
==============================================================================
--- branches/gimp-2-4/plug-ins/common/tileit.c	(original)
+++ branches/gimp-2-4/plug-ins/common/tileit.c	Fri Feb 22 09:40:46 2008
@@ -257,14 +257,15 @@
   has_alpha = gimp_drawable_has_alpha (tileitdrawable->drawable_id);
 
   if (! gimp_drawable_mask_intersect (drawable->drawable_id,
-                                      &sel_x1, &sel_y1, &sel_x2, &sel_y2))
+                                      &sel_x1,    &sel_y1,
+                                      &sel_width, &sel_height))
     {
       g_message (_("Region selected for filter is empty."));
       return;
     }
 
-  sel_width  = sel_x2 - sel_x1;
-  sel_height = sel_y2 - sel_y1;
+  sel_x2 = sel_x1 + sel_width;
+  sel_y2 = sel_y1 + sel_height;
 
   /* Calculate preview size */
 

Modified: branches/gimp-2-4/plug-ins/common/warp.c
==============================================================================
--- branches/gimp-2-4/plug-ins/common/warp.c	(original)
+++ branches/gimp-2-4/plug-ins/common/warp.c	Fri Feb 22 09:40:46 2008
@@ -747,9 +747,12 @@
   /* --------------------------------------- */
 
   if (! gimp_drawable_mask_intersect (drawable->drawable_id,
-                                      &x1, &y1, &x2, &y2))
+                                      &x1, &y1, &width, &height))
     return;
 
+  x2 = x1 + width;
+  y2 = y1 + height;
+
   width = drawable->width;     /* size of input drawable*/
   height = drawable->height;
   src_bytes = drawable->bpp;   /* bytes per pixel in SOURCE drawable, must be 2 or more  */
@@ -919,9 +922,12 @@
    *  faster, since fewer pixels need to be operated on).
    */
   if (! gimp_drawable_mask_intersect (drawable->drawable_id,
-                                      &x1, &y1, &x2, &y2))
+                                      &x1, &y1, &width, &height))
     return;
 
+  x2 = x1 + width;
+  y2 = y1 + height;
+
   /* Get the size of the input image. (This will/must be the same
    *  as the size of the output image.
    */
@@ -1235,9 +1241,12 @@
 
   /* Get selection area */
   if (! gimp_drawable_mask_intersect (orig_draw->drawable_id,
-                                      &x1, &y1, &x2, &y2))
+                                      &x1, &y1, &width, &height))
     return;
 
+  x2 = x1 + width;
+  y2 = y1 + height;
+
   width  = orig_draw->width;
   height = orig_draw->height;
   bytes  = orig_draw->bpp;



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