Re: Re: It's getting worse... Now I really want the old rect selection tool back!

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

 



On Wednesday 26 July 2006 23:38, Michael Schumacher wrote:
> The difference from Germany to France and vice versa wasn't that large
> the last time I checked :)

Ok, Ok, I'll stop assuming things... Now I only need to get this darn kopete 
to work, that'll have to wait til tomorrow...

In the mean time, here is a preliminary patch for bug #348807. It's 
preliminary because it remedies only the bug as described by my own report, 
but looking at the code I think there is another one lurking in there. Both 
inc_y and inc_x are applied to the resulting coordinates in some cases while 
IMHO only the value resulting in the larger dimension change should be 
applied. The corresponding other value should be calculated out of the aspect 
ratio and the above value, this would probably result in a smoother operation 
and make it less likely that the mouse cursor lies outside the dimension of 
the selection rectangle.

I'm not quite convinced that this is the best solution, so I'll run some test 
first...

regards
Karl Günter

? .emacsbuf
? rectangletool.diff
Index: gimprectangletool.c
===================================================================
RCS file: /cvs/gnome/gimp/app/tools/gimprectangletool.c,v
retrieving revision 1.68
diff -u -3 -p -r1.68 gimprectangletool.c
--- gimprectangletool.c	21 Jun 2006 15:25:10 -0000	1.68
+++ gimprectangletool.c	26 Jul 2006 22:23:20 -0000
@@ -1218,20 +1218,34 @@ gimp_rectangle_tool_motion (GimpTool    
           break;
 
         case RECT_RESIZING_LOWER_LEFT:
-        case RECT_RESIZING_LEFT:
           if (inc_y == 0 || inc_x / inc_y < aspect)
             x1 = rx2 - (y2 - ry1) * aspect + .5;
           else
             y2 = ry1 + (rx2 - x1) / aspect + .5;
           break;
 
+        case RECT_RESIZING_LEFT:
+          /* When resizing the left hand delimiter then the aspect dictates the 
+           * height of the result, any inc_y is redundant and not relevant to the
+           * result
+           */
+          y2 = ry1 + (rx2 - x1) / aspect + .5;
+          break;
+
         case RECT_RESIZING_LOWER_RIGHT:
-        case RECT_RESIZING_RIGHT:
         case RECT_RESIZING_BOTTOM:
           if (inc_y == 0 || inc_x / inc_y < aspect)
             x2 = rx1 + (y2 - ry1) * aspect + .5;
           else
             y2 = ry1 + (x2 - rx1) / aspect + .5;
+          break;
+
+        case RECT_RESIZING_RIGHT:	
+          /* When resizing the right hand delimiter then the aspect dictates the 
+           * height of the result, any inc_y is redundant and not relevant to the
+           * result
+           */
+          y2 = ry1 + (x2 - rx1) / aspect + 0.5;
           break;
 
         default:
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux