diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-02-01 10:48:53 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-02-01 10:48:53 +0000 |
| commit | 3581010e2f7021167ba0f4e577e0b3f8da2944b6 (patch) | |
| tree | e6644dc31e58d21ff60a9ae7fe121287071e5566 /src/display/canvas-grid.cpp | |
| parent | Create a empty LPE (diff) | |
| parent | Latvian translation update (diff) | |
| download | inkscape-3581010e2f7021167ba0f4e577e0b3f8da2944b6.tar.gz inkscape-3581010e2f7021167ba0f4e577e0b3f8da2944b6.zip | |
Effect done
(bzr r13879.1.2)
Diffstat (limited to 'src/display/canvas-grid.cpp')
| -rw-r--r-- | src/display/canvas-grid.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 1a284b46e..0a43ed8b7 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -544,6 +544,11 @@ CanvasXYGrid::readRepr() if( root->viewBox_set ) { scale_x = root->width.computed / root->viewBox.width(); scale_y = root->height.computed / root->viewBox.height(); + if (Geom::are_near(scale_x / scale_y, 1.0, Geom::EPSILON)) { + // scaling is uniform, try to reduce numerical error + scale_x = (scale_x + scale_y)/2.0; + scale_y = scale_x; + } } gchar const *value; |
