[gimp] app: fix GimpCanvasRectangleGuides' extents



commit c1c20e4c3866008b81c80663e7c0b7280553bab6
Author: Michael Natterer <mitch gimp org>
Date:   Tue May 24 20:49:05 2011 +0200

    app: fix GimpCanvasRectangleGuides' extents

 app/display/gimpcanvasrectangleguides.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpcanvasrectangleguides.c b/app/display/gimpcanvasrectangleguides.c
index 30dd831..803adad 100644
--- a/app/display/gimpcanvasrectangleguides.c
+++ b/app/display/gimpcanvasrectangleguides.c
@@ -371,15 +371,15 @@ gimp_canvas_rectangle_guides_get_extents (GimpCanvasItem   *item,
   if (private->type != GIMP_GUIDES_NONE)
     {
       cairo_rectangle_int_t rectangle;
-      gdouble               x, y;
-      gdouble               w, h;
+      gdouble               x1, y1;
+      gdouble               x2, y2;
 
-      gimp_canvas_rectangle_guides_transform (item, shell, &x, &y, &w, &h);
+      gimp_canvas_rectangle_guides_transform (item, shell, &x1, &y1, &x2, &y2);
 
-      rectangle.x      = floor (x - 1.5);
-      rectangle.y      = floor (y - 1.5);
-      rectangle.width  = ceil (w + 3.0);
-      rectangle.height = ceil (h + 3.0);
+      rectangle.x      = floor (x1 - 1.5);
+      rectangle.y      = floor (y1 - 1.5);
+      rectangle.width  = ceil (x2 - x1 + 3.0);
+      rectangle.height = ceil (y2 - y1 + 3.0);
 
       return cairo_region_create_rectangle (&rectangle);
     }



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