[gimp/soc-2011-seamless-clone2] app: draw guides across the entire canvas also when rotated



commit ae563a5bafc742584de2b11dcf627abd94f67cda
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 25 09:12:35 2013 +0200

    app: draw guides across the entire canvas also when rotated

 app/display/gimpcanvasguide.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpcanvasguide.c b/app/display/gimpcanvasguide.c
index 07c003b..b0788ce 100644
--- a/app/display/gimpcanvasguide.c
+++ b/app/display/gimpcanvasguide.c
@@ -180,14 +180,17 @@ gimp_canvas_guide_transform (GimpCanvasItem *item,
   GimpCanvasGuidePrivate *private = GET_PRIVATE (item);
   GtkWidget              *canvas  = gimp_canvas_item_get_canvas (item);
   GtkAllocation           allocation;
+  gint                    max_outside;
   gint                    x, y;
 
   gtk_widget_get_allocation (canvas, &allocation);
 
-  *x1 = 0;
-  *y1 = 0;
-  *x2 = allocation.width;
-  *y2 = allocation.height;
+  max_outside = allocation.width + allocation.height;
+
+  *x1 = -max_outside;
+  *y1 = -max_outside;
+  *x2 = allocation.width  + max_outside;
+  *y2 = allocation.height + max_outside;
 
   switch (private->orientation)
     {


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