summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/export.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-07-31 22:33:03 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-07-31 22:33:03 +0000
commitf1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b (patch)
treece3ca9ef9daa04c0474e859c939dfabd1ebab557 /src/ui/dialog/export.cpp
parentAdded percent support back to select toolbar. (diff)
downloadinkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.tar.gz
inkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.zip
Eliminate "unit-constants.h".
(bzr r12380.1.54)
Diffstat (limited to 'src/ui/dialog/export.cpp')
-rw-r--r--src/ui/dialog/export.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 5cb9357c3..063902aa7 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -50,7 +50,6 @@
#include "ui/widget/unit-menu.h"
#include "util/units.h"
-#include "unit-constants.h"
#include "helper/window.h"
#include "inkscape-private.h"
#include "document.h"
@@ -98,7 +97,7 @@
#define SP_EXPORT_MIN_SIZE 1.0
-#define DPI_BASE PX_PER_IN
+#define DPI_BASE Inkscape::Util::Quantity::convert(1, "in", "px")
#define EXPORT_COORD_PRECISION 3
@@ -1048,8 +1047,8 @@ void Export::onExport ()
Geom::OptRect area = item->desktopVisualBounds();
if (area) {
- gint width = (gint) (area->width() * dpi / PX_PER_IN + 0.5);
- gint height = (gint) (area->height() * dpi / PX_PER_IN + 0.5);
+ gint width = (gint) (area->width() * dpi / DPI_BASE + 0.5);
+ gint height = (gint) (area->height() * dpi / DPI_BASE + 0.5);
if (width > 1 && height > 1) {
// Do export