gimp r26520 - in trunk: . app/core



Author: neo
Date: Tue Aug 12 16:30:44 2008
New Revision: 26520
URL: http://svn.gnome.org/viewvc/gimp?rev=26520&view=rev

Log:
2008-08-12  Sven Neumann  <sven gimp org>

	* app/core/gimpprojection.c (gimp_projection_paint_area): moved
	function calls out of CLAMP macros.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpprojection.c

Modified: trunk/app/core/gimpprojection.c
==============================================================================
--- trunk/app/core/gimpprojection.c	(original)
+++ trunk/app/core/gimpprojection.c	Tue Aug 12 16:30:44 2008
@@ -654,11 +654,14 @@
                             gint            w,
                             gint            h)
 {
+  const gint width  = gimp_image_get_width  (proj->image);
+  const gint height = gimp_image_get_height (proj->image);
+
   /*  Bounds check  */
-  gint x1 = CLAMP (x,     0, gimp_image_get_width  (proj->image));
-  gint y1 = CLAMP (y,     0, gimp_image_get_height (proj->image));
-  gint x2 = CLAMP (x + w, 0, gimp_image_get_width  (proj->image));
-  gint y2 = CLAMP (y + h, 0, gimp_image_get_height (proj->image));
+  gint x1 = CLAMP (x,     0, width);
+  gint y1 = CLAMP (y,     0, height);
+  gint x2 = CLAMP (x + w, 0, width);
+  gint y2 = CLAMP (y + h, 0, height);
 
   gimp_projection_invalidate (proj, x1, y1, x2 - x1, y2 - y1);
 



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