diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-20 17:43:57 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-20 17:43:57 +0000 |
| commit | 0a836d1870bb87d5be3e4d900718f903371c8e56 (patch) | |
| tree | 7d218dc0e9d81e2f7d3eddcefad9640769dc89b3 /src/main.cpp | |
| parent | Compact of SVG icons whith the help of ~suv and Martin Owens (diff) | |
| parent | Merge Google Summer of Code unit improvement. (diff) | |
| download | inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.tar.gz inkscape-0a836d1870bb87d5be3e4d900718f903371c8e56.zip | |
Update to trunk
(bzr r11950.1.146)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 27346a230..9a365424c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; |
