summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-28 03:32:14 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-28 03:32:14 +0000
commit3bfb610bb7719d49821fe5381ae449789c3cb968 (patch)
treec6c221e0c7bfcc6399ee4aee360b7b1d4de3f896 /src/selection-chemistry.cpp
parentUse Quantity comparisons in PageSizer. (diff)
downloadinkscape-3bfb610bb7719d49821fe5381ae449789c3cb968.tar.gz
inkscape-3bfb610bb7719d49821fe5381ae449789c3cb968.zip
Improve code readability.
(bzr r12475.1.9)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 3c12b78bd..14e3462d7 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -3397,7 +3397,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
res = prefs_res;
} else if (0 < prefs_min) {
// If minsize is given, look up minimum bitmap size (default 250 pixels) and calculate resolution from it
- res = Inkscape::Util::Quantity::convert(1, "in", "px") * prefs_min / MIN(bbox->width(), bbox->height());
+ res = Inkscape::Util::Quantity::convert(prefs_min, "in", "px") / MIN(bbox->width(), bbox->height());
} else {
float hint_xdpi = 0, hint_ydpi = 0;
Glib::ustring hint_filename;
@@ -3418,8 +3418,8 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
}
// The width and height of the bitmap in pixels
- unsigned width = (unsigned) floor(bbox->width() * res / Inkscape::Util::Quantity::convert(1, "in", "px"));
- unsigned height =(unsigned) floor(bbox->height() * res / Inkscape::Util::Quantity::convert(1, "in", "px"));
+ unsigned width = (unsigned) floor(bbox->width() * Inkscape::Util::Quantity::convert(res, "px", "in"));
+ unsigned height =(unsigned) floor(bbox->height() * Inkscape::Util::Quantity::convert(res, "px", "in"));
// Find out if we have to run an external filter
gchar const *run = NULL;