gimp r26567 - in trunk: . app/display



Author: martinn
Date: Thu Aug 14 20:31:44 2008
New Revision: 26567
URL: http://svn.gnome.org/viewvc/gimp?rev=26567&view=rev

Log:
2008-08-14  Martin Nordholts  <martinn svn gnome org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_image_starts_to_fit)
	(gimp_display_shell_scale_image_is_within_viewport): Make
	proper tests (<= not <).


Modified:
   trunk/ChangeLog
   trunk/app/display/gimpdisplayshell-scale.c

Modified: trunk/app/display/gimpdisplayshell-scale.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-scale.c	(original)
+++ trunk/app/display/gimpdisplayshell-scale.c	Thu Aug 14 20:31:44 2008
@@ -366,11 +366,11 @@
                                                                &new_scale_width,
                                                                &new_scale_height);
 
-      *vertically   = current_scale_width  > shell->disp_width &&
-                      new_scale_width      < shell->disp_width;
+      *vertically   = current_scale_width  >  shell->disp_width &&
+                      new_scale_width      <= shell->disp_width;
         
-      *horizontally = current_scale_height > shell->disp_height &&
-                      new_scale_height     < shell->disp_height;
+      *horizontally = current_scale_height >  shell->disp_height &&
+                      new_scale_height     <= shell->disp_height;
         
     }
 
@@ -507,12 +507,12 @@
 
   gimp_display_shell_draw_get_scaled_image_size (shell, &sw, &sh);
 
-  return sw              < shell->disp_width       &&
-         sh              < shell->disp_height      &&
-         shell->offset_x < 0                       &&
-         shell->offset_y < 0                       &&
-         shell->offset_x > sw - shell->disp_width  &&
-         shell->offset_y > sh - shell->disp_height;
+  return sw              <= shell->disp_width       &&
+         sh              <= shell->disp_height      &&
+         shell->offset_x <= 0                       &&
+         shell->offset_y <= 0                       &&
+         shell->offset_x >  sw - shell->disp_width  &&
+         shell->offset_y >  sh - shell->disp_height;
 }
 
 /**



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