From 509c3229cd5633e211fde1b603d1af9e6069c06f Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Sun, 5 Dec 2010 11:51:35 +0000 Subject: [PATCH] * Removed condition to round image width and height in pixels to whole numbers. The whole imageable area should now be available for printing. Hope this does not have a negative effect on image quality. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39734 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../print/drivers/gutenprint/GPJob.cpp | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/add-ons/print/drivers/gutenprint/GPJob.cpp b/src/add-ons/print/drivers/gutenprint/GPJob.cpp index 11b3a26963..e9514823f1 100644 --- a/src/add-ons/print/drivers/gutenprint/GPJob.cpp +++ b/src/add-ons/print/drivers/gutenprint/GPJob.cpp @@ -302,45 +302,8 @@ GPJob::PrintPage(list& bands) { if (bottom > imageableArea.bottom) bottom = imageableArea.bottom; - fprintf(stderr, "GPJob image left %d, top %d, right %d, bottom %d\n", - (int)left, (int)top, (int)right, (int)bottom); - - // make sure the width and height in pixels is a whole number - // by increasing the width and height in 1/72 Inches to a multiple of 72 - // - // TODO the "whole number" condition has to be dropped; in the current - // implementation up to 1 Inch of the total width or height cannot be - // used; using the gcd of 72 and x or y DPI this could be reduced; - // for example if DPI is 600 to 1/3 Inch which is still not acceptable. - // - // the position might have to be changed in order to stay inside - // the imageable area; if it gets too large it is decreased by one Inch int32 width = right - left; int32 height = bottom - top; - coordinateSystem.RoundUpToWholeInches(width, height); - right = left + width; - bottom = top + height; - - // again make sure the image is inside the imageable area - if (right > imageableArea.right) { - right = imageableArea.right; - left = right - width; - if (left < imageableArea.left) { - left = imageableArea.left; - right = left + width - kGutenprintUnit; - } - width = right - left; - } - - if (bottom > imageableArea.bottom) { - bottom = imageableArea.bottom; - top = bottom - height; - if (top < imageableArea.top) { - top = imageableArea.top; - bottom = top + height - kGutenprintUnit; - } - height = bottom - top; - } // because of rounding and clipping in the previous step, // now the image frame has to be synchronized