diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-09-24 22:17:24 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-09-24 22:17:24 +0000 |
| commit | bcca22a25ae98f70c36fff6292f0a8fe4e578d89 (patch) | |
| tree | a18d382d32f471b7119b9b7b2782cec04d6da43f /src/main.cpp | |
| parent | Refactored SPUse. (diff) | |
| parent | Fix my email address through codebase (diff) | |
| download | inkscape-bcca22a25ae98f70c36fff6292f0a8fe4e578d89.tar.gz inkscape-bcca22a25ae98f70c36fff6292f0a8fe4e578d89.zip | |
Merged from trunk (r12588).
(bzr r11608.1.129)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 27346a230..1c0f4cee7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,7 +11,7 @@ * Michael Meeks <michael@helixcode.com> * Chema Celorio <chema@celorio.com> * Pawel Palucha - * Bryce Harrington <bryce@bryceharrington.com> + * Bryce Harrington <bryce@bryceharrington.org> * ... and various people who have worked with various projects * Jon A. Cruz <jon@oncruz.org> * Abhishek Sharma @@ -1535,7 +1535,7 @@ static int sp_do_export_png(SPDocument *doc) g_warning("Export width %lu out of range (1 - %lu). Nothing exported.", width, (unsigned long int)PNG_UINT_31_MAX); return 1; } - dpi = (gdouble) width * Inkscape::Util::Quantity::convert(1, "in", "px") / area.width(); + dpi = (gdouble) Inkscape::Util::Quantity::convert(width, "in", "px") / area.width(); } if (sp_export_height) { @@ -1545,15 +1545,15 @@ static int sp_do_export_png(SPDocument *doc) g_warning("Export height %lu out of range (1 - %lu). Nothing exported.", height, (unsigned long int)PNG_UINT_31_MAX); return 1; } - dpi = (gdouble) height * Inkscape::Util::Quantity::convert(1, "in", "px") / area.height(); + dpi = (gdouble) Inkscape::Util::Quantity::convert(height, "in", "px") / area.height(); } if (!sp_export_width) { - width = (unsigned long int) (area.width() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); + width = (unsigned long int) (Inkscape::Util::Quantity::convert(area.width(), "px", "in") * dpi + 0.5); } if (!sp_export_height) { - height = (unsigned long int) (area.height() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); + height = (unsigned long int) (Inkscape::Util::Quantity::convert(area.height(), "px", "in") * dpi + 0.5); } guint32 bgcolor = 0x00000000; |
