summaryrefslogtreecommitdiffstats
path: root/src/sp-item.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/sp-item.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/sp-item.cpp')
-rw-r--r--src/sp-item.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index a4070c9b3..0ca9592c9 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -73,6 +73,8 @@
#include "live_effects/effect.h"
#include "live_effects/lpeobject-reference.h"
+#include "util/units.h"
+
#define noSP_ITEM_DEBUG_IDLE
static void sp_item_build (SPObject *object,
@@ -857,7 +859,7 @@ Geom::OptRect SPItem::desktopGeometricBounds() const
Geom::OptRect SPItem::desktopVisualBounds() const
{
/// @fixme hardcoded desktop transform
- Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight());
+ Geom::Affine m = Geom::Scale(1, -1) * Geom::Translate(0, document->getHeight().value("px"));
Geom::OptRect ret = documentVisualBounds();
if (ret) *ret *= m;
return ret;
@@ -1520,7 +1522,7 @@ Geom::Affine SPItem::i2dt_affine() const
// TODO temp code to prevent crashing on command-line launch:
ret = i2doc_affine()
* Geom::Scale(1, -1)
- * Geom::Translate(0, document->getHeight());
+ * Geom::Translate(0, document->getHeight().value("px"));
}
return ret;
}