diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-03-13 14:22:22 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2017-03-13 14:22:22 +0000 |
| commit | 014489163050d8abe9e5c4949fb80f3c21b1c17b (patch) | |
| tree | 7cbeb87aa023d563986b32f65fd500c6072ee86a /src/display/canvas-grid.cpp | |
| parent | Two Extensions for converting objects to paths before exporting. (Bug 1662531) (diff) | |
| download | inkscape-014489163050d8abe9e5c4949fb80f3c21b1c17b.tar.gz inkscape-014489163050d8abe9e5c4949fb80f3c21b1c17b.zip | |
Replace rectangle based zooming by affine based zooming.
This allows a rotation to be included in the drawing to window mapping.
General code cleanup.
Added documentation.
Any change to zooming behavior is probably a bug.
(bzr r15592)
Diffstat (limited to 'src/display/canvas-grid.cpp')
| -rw-r--r-- | src/display/canvas-grid.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index cf7d04555..2dadde336 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -841,7 +841,9 @@ void CanvasXYGrid::Update (Geom::Affine const &affine, unsigned int /*flags*/) { ow = origin * affine; - sw = spacing * affine; + // Temp hack to insure grid doesn't collapse with rotation. + sw[0] = spacing[0] * sqrt(affine[0]*affine[0] + affine[1]*affine[1]); + sw[1] = spacing[1] * sqrt(affine[2]*affine[2] + affine[3]*affine[3]); sw -= Geom::Point(affine[4], affine[5]); for(int dim = 0; dim < 2; dim++) { |
