summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-27 16:32:55 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-27 16:32:55 +0000
commitf10048be170a45921ae8fc65ccd2588a9ad2897d (patch)
treec0abadf8d3b7ffb325061d797e5b8d9d8b2aefeb /src/desktop.cpp
parentUse real world units for page sizes. (diff)
downloadinkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.tar.gz
inkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.zip
Added viewBox implement document unit support.
(bzr r12475.1.2)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 13e339abe..ea53b9cf7 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -240,7 +240,7 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas, Inkscape::UI::View::EditWid
// display rect and zoom are now handled in sp_desktop_widget_realize()
Geom::Rect const d(Geom::Point(0.0, 0.0),
- Geom::Point(document->getWidth(), document->getHeight()));
+ Geom::Point(document->getWidth().value("px"), document->getHeight().value("px")));
SP_CTRLRECT(page)->setRectangle(d);
SP_CTRLRECT(page_border)->setRectangle(d);
@@ -257,7 +257,7 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas, Inkscape::UI::View::EditWid
/* Connect event for page resize */
- _doc2dt[5] = document->getHeight();
+ _doc2dt[5] = document->getHeight().value("px");
sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (drawing), _doc2dt);
_modified_connection = namedview->connectModified(sigc::bind<2>(sigc::ptr_fun(&_namedview_modified), this));
@@ -1010,7 +1010,7 @@ void
SPDesktop::zoom_page()
{
Geom::Rect d(Geom::Point(0, 0),
- Geom::Point(doc()->getWidth(), doc()->getHeight()));
+ Geom::Point(doc()->getWidth().value("px"), doc()->getHeight().value("px")));
if (d.minExtent() < 1.0) {
return;
@@ -1027,12 +1027,12 @@ SPDesktop::zoom_page_width()
{
Geom::Rect const a = get_display_area();
- if (doc()->getWidth() < 1.0) {
+ if (doc()->getWidth().value("px") < 1.0) {
return;
}
Geom::Rect d(Geom::Point(0, a.midpoint()[Geom::Y]),
- Geom::Point(doc()->getWidth(), a.midpoint()[Geom::Y]));
+ Geom::Point(doc()->getWidth().value("px"), a.midpoint()[Geom::Y]));
set_display_area(d, 10);
}