diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-04-10 20:11:50 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-04-10 20:11:50 +0000 |
| commit | 5be72612bc09d01581d572d152dafdd64f5cfd7e (patch) | |
| tree | 569b4adb875b53b26aa7166379c2b8d36a37439c /src/document.cpp | |
| parent | Fix coding style issues in mirror symmetry code (diff) | |
| parent | added info about multiple pen feature in gui (diff) | |
| download | inkscape-5be72612bc09d01581d572d152dafdd64f5cfd7e.tar.gz inkscape-5be72612bc09d01581d572d152dafdd64f5cfd7e.zip | |
update to trunk
(bzr r13682.1.26)
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/document.cpp b/src/document.cpp index 62e2f5b46..1c6bb76de 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -764,6 +764,17 @@ void SPDocument::setHeight(const Inkscape::Util::Quantity &height, bool changeSi root->updateRepr(); } +Geom::Rect SPDocument::getViewBox() const +{ + Geom::Rect viewBox; + if (root->viewBox_set) { + viewBox = root->viewBox; + } else { + viewBox = Geom::Rect::from_xywh( 0, 0, getWidth().value("px"), getHeight().value("px")); + } + return viewBox; +} + void SPDocument::setViewBox(const Geom::Rect &viewBox) { root->viewBox_set = true; |
