From 5d0450e4ea1b78e1591b1bafed8fb8ff505abe73 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 25 Apr 2013 09:12:35 +0200 Subject: [PATCH] app: draw guides across the entire canvas also when rotated --- app/display/gimpcanvasguide.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/display/gimpcanvasguide.c b/app/display/gimpcanvasguide.c index 07c003bdaf..b0788ce7c6 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) {