summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-grid.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-01-06 21:51:15 +0000
committergouldtj <gouldtj@users.sourceforge.net>2008-01-06 21:51:15 +0000
commitc171ba1cb42f94bcd783f585e7f75506812b0b23 (patch)
tree7e88cf329d1a1797ef82fd0c4c140e7686ecb126 /src/display/canvas-grid.cpp
parent* [INTL: sk] Updated Slovak translation (diff)
downloadinkscape-c171ba1cb42f94bcd783f585e7f75506812b0b23.tar.gz
inkscape-c171ba1cb42f94bcd783f585e7f75506812b0b23.zip
r17530@shi: ted | 2008-01-06 13:50:53 -0800
Swapping arround some logic and setting up the grid lines so that major ones are drawn when zoomed out correctly. This is lp:167422 (bzr r4412)
Diffstat (limited to 'src/display/canvas-grid.cpp')
-rw-r--r--src/display/canvas-grid.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index 20856709c..0edcbd0ab 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -839,10 +839,10 @@ CanvasXYGrid::Render (SPCanvasBuf *buf)
for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) {
gint const y0 = (gint) Inkscape::round(y);
- if (!scaled[NR::Y] && (ylinenum % empspacing) == 0) {
- grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor);
- } else {
+ if (!scaled[NR::Y] && (ylinenum % empspacing) != 0) {
grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, color);
+ } else {
+ grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor);
}
}
@@ -850,10 +850,10 @@ CanvasXYGrid::Render (SPCanvasBuf *buf)
gdouble x;
for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) {
gint const ix = (gint) Inkscape::round(x);
- if (!scaled[NR::X] && (xlinenum % empspacing) == 0) {
- grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor);
- } else {
+ if (!scaled[NR::X] && (xlinenum % empspacing) != 0) {
grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, color);
+ } else {
+ grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor);
}
}
} else {