[gimp] app: make the code in gimp_drawable_mask_intersect() a bit more readable



commit df1575234c79f0276d7d25db690ba2e05615c97e
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 7 17:08:54 2010 +0200

    app: make the code in gimp_drawable_mask_intersect() a bit more readable

 app/core/gimpdrawable.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index cbf7ac0..59692e6 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -1827,10 +1827,13 @@ gimp_drawable_mask_intersect (GimpDrawable *drawable,
 
       gimp_item_get_offset (item, &off_x, &off_y);
 
+      tmp_width  -= tmp_x;
+      tmp_height -= tmp_y;
+
       retval = gimp_rectangle_intersect (tmp_x - off_x, tmp_y - off_y,
-                                         tmp_width - tmp_x, tmp_height - tmp_y,
+                                         tmp_width, tmp_height,
                                          0, 0,
-                                         gimp_item_get_width (item),
+                                         gimp_item_get_width  (item),
                                          gimp_item_get_height (item),
                                          &tmp_x, &tmp_y,
                                          &tmp_width, &tmp_height);



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