diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-03-28 13:57:30 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-03-28 13:57:30 +0000 |
| commit | d3117487bcf047050642b80a3f46acd811947105 (patch) | |
| tree | 2e1d204fefe18c4d2e94053f71830a18bc4590e1 /src/document.cpp | |
| parent | adding rotation transform (diff) | |
| parent | Fix calculation of miter limit. Implement 'miter-clip' line join. (diff) | |
| download | inkscape-d3117487bcf047050642b80a3f46acd811947105.tar.gz inkscape-d3117487bcf047050642b80a3f46acd811947105.zip | |
update to trunk
(bzr r13708.1.21)
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; |
