summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-21 11:52:05 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-21 11:52:05 +0000
commit35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1 (patch)
tree1339b657212153803c8b575b3862a4864928da71 /src/document.cpp
parentupdate to trunk (diff)
parentImprove the cache system of bspline, "Correctly" show bspline weight power on... (diff)
downloadinkscape-35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1.tar.gz
inkscape-35dbee2c542660e1ab2c2aa3ed8f0bc052ebd0a1.zip
update to trunk
(bzr r13645.1.48)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp11
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;