[gimp] app: don't draw the grid if it covers the image entirely
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't draw the grid if it covers the image entirely
- Date: Sun, 4 Mar 2012 19:20:12 +0000 (UTC)
commit 0c236cbc48ff53b18b4424cfcc1cec9400c35a2f
Author: Michael Natterer <mitch gimp org>
Date: Sun Mar 4 20:16:14 2012 +0100
app: don't draw the grid if it covers the image entirely
Regardless of the elaborate discussion in bug #599267, as soon as the
grid starts covering the image completely (when the is no more spacing
between grid lines), it is entirely useless, so skip drawing it.
app/display/gimpcanvasgrid.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpcanvasgrid.c b/app/display/gimpcanvasgrid.c
index fbd6126..9f3304c 100644
--- a/app/display/gimpcanvasgrid.c
+++ b/app/display/gimpcanvasgrid.c
@@ -206,6 +206,13 @@ gimp_canvas_grid_draw (GimpCanvasItem *item,
g_return_if_fail (private->grid->xspacing > 0 && private->grid->yspacing > 0);
+ /* skip grid drawing when the space between grid lines starts
+ * disappearing, see bug #599267.
+ */
+ if (private->grid->xspacing * shell->scale_x < 2.0 ||
+ private->grid->yspacing * shell->scale_y < 2.0)
+ return;
+
cairo_clip_extents (cr, &dx1, &dy1, &dx2, &dy2);
x1 = floor (dx1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]