summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-axonomgrid.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2010-04-14 20:32:14 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2010-04-14 20:32:14 +0000
commit2f984e812823d02ab0fdbf28cf33582332265524 (patch)
tree8518b80f3917b80acbf83ed19eab32603020230c /src/display/canvas-axonomgrid.cpp
parentSpelling correction in Optimized SVG extension. (diff)
downloadinkscape-2f984e812823d02ab0fdbf28cf33582332265524.tar.gz
inkscape-2f984e812823d02ab0fdbf28cf33582332265524.zip
show more axonometric grid lines
Fixed bugs: - https://launchpad.net/bugs/429776 (bzr r9331)
Diffstat (limited to 'src/display/canvas-axonomgrid.cpp')
-rw-r--r--src/display/canvas-axonomgrid.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp
index ee05cd01c..cf2883116 100644
--- a/src/display/canvas-axonomgrid.cpp
+++ b/src/display/canvas-axonomgrid.cpp
@@ -518,6 +518,9 @@ CanvasAxonomGrid::Update (Geom::Matrix const &affine, unsigned int /*flags*/)
{
ow = origin * affine;
sw = Geom::Point(fabs(affine[0]),fabs(affine[3]));
+ sw *= lengthy;
+
+ scaled = false;
for(int dim = 0; dim < 2; dim++) {
gint scaling_factor = empspacing;
@@ -525,10 +528,9 @@ CanvasAxonomGrid::Update (Geom::Matrix const &affine, unsigned int /*flags*/)
if (scaling_factor <= 1)
scaling_factor = 5;
- scaled = FALSE;
int watchdog = 0;
while ( (sw[dim] < 8.0) & (watchdog < 100) ) {
- scaled = TRUE;
+ scaled = true;
sw[dim] *= scaling_factor;
// First pass, go up to the major line spacing, then
// keep increasing by two.
@@ -538,13 +540,13 @@ CanvasAxonomGrid::Update (Geom::Matrix const &affine, unsigned int /*flags*/)
}
- spacing_ylines = sw[Geom::X] * lengthy /(tan_angle[X] + tan_angle[Z]);
- lyw = sw[Geom::Y] * lengthy;
- lxw_x = (lengthy / tan_angle[X]) * sw[Geom::X];
- lxw_z = (lengthy / tan_angle[Z]) * sw[Geom::X];
+ spacing_ylines = sw[Geom::X] /(tan_angle[X] + tan_angle[Z]);
+ lyw = sw[Geom::Y];
+ lxw_x = sw[Geom::X] / tan_angle[X];
+ lxw_z = sw[Geom::X] / tan_angle[Z];
if (empspacing == 0) {
- scaled = TRUE;
+ scaled = true;
}
}