diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-20 17:43:57 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-20 17:43:57 +0000 |
| commit | 0a836d1870bb87d5be3e4d900718f903371c8e56 (patch) | |
| tree | 7d218dc0e9d81e2f7d3eddcefad9640769dc89b3 /src/svg-view.cpp | |
| parent | Compact of SVG icons whith the help of ~suv and Martin Owens (diff) | |
| parent | Merge Google Summer of Code unit improvement. (diff) | |
| download | inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.tar.gz inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.zip | |
Update to trunk
(bzr r11950.1.146)
Diffstat (limited to 'src/svg-view.cpp')
| -rw-r--r-- | src/svg-view.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/svg-view.cpp b/src/svg-view.cpp index 7559cbb24..f52608420 100644 --- a/src/svg-view.cpp +++ b/src/svg-view.cpp @@ -20,6 +20,7 @@ #include "sp-item.h" #include "svg-view.h" #include "sp-root.h" +#include "util/units.h" SPSVGView::SPSVGView(SPCanvasGroup *parent) { @@ -71,16 +72,16 @@ void SPSVGView::doRescale(bool event) if (!doc()) { return; } - if (doc()->getWidth () < 1e-9) { + if (doc()->getWidth().value("px") < 1e-9) { return; } - if (doc()->getHeight () < 1e-9) { + if (doc()->getHeight().value("px") < 1e-9) { return; } if (_rescale) { - _hscale = _width / doc()->getWidth (); - _vscale = _height / doc()->getHeight (); + _hscale = _width / doc()->getWidth().value("px"); + _vscale = _height / doc()->getHeight().value("px"); if (_keepaspect) { if (_hscale > _vscale) { _hscale = _vscale; @@ -95,8 +96,8 @@ void SPSVGView::doRescale(bool event) } if (event) { - emitResized (doc()->getWidth () * _hscale, - doc()->getHeight () * _vscale); + emitResized (doc()->getWidth().value("px") * _hscale, + doc()->getHeight().value("px") * _vscale); } } |
