From d12b9c9fa87c4fc4f7842e5d6512c4f17298cce7 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 3 Apr 2010 03:56:36 +0200 Subject: Initial fix for the inverted coordinate system bug (bzr r9281.1.1) --- src/selection-chemistry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 730467ee5..7ac2e5471 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2748,12 +2748,12 @@ sp_selection_create_bitmap_copy(SPDesktop *desktop) Geom::Matrix t; double shift_x = bbox.x0; - double shift_y = bbox.y1; + double shift_y = bbox.y0; if (res == PX_PER_IN) { // for default 90 dpi, snap it to pixel grid shift_x = round(shift_x); - shift_y = -round(-shift_y); // this gets correct rounding despite coordinate inversion, remove the negations when the inversion is gone + shift_y = round(shift_y); } - t = Geom::Scale(1, -1) * Geom::Translate(shift_x, shift_y) * eek.inverse(); + t = Geom::Translate(shift_x, shift_y) * eek.inverse(); // Do the export sp_export_png_file(document, filepath, -- cgit v1.2.3