diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:09 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:09 +0000 |
commit | 6fceea28608be0fda32d94f59e1b1550774318a0 (patch) | |
tree | 9be4df525ab59533784ce0c8d441d61130b59e76 /src/xsane-preview.c | |
parent | 817e6294b42b3e4435f1b99728afc1dca84a6445 (diff) |
Imported Upstream version 0.98upstream/0.98
Diffstat (limited to 'src/xsane-preview.c')
-rw-r--r-- | src/xsane-preview.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/xsane-preview.c b/src/xsane-preview.c index 879bc99..5bd6457 100644 --- a/src/xsane-preview.c +++ b/src/xsane-preview.c @@ -815,7 +815,7 @@ static void preview_get_scale_device_to_image(Preview *p, float *xscalep, float } } -#if 1 + /* make sure pixels have square dimension */ if (xscale > yscale) { yscale = xscale; @@ -824,7 +824,6 @@ static void preview_get_scale_device_to_image(Preview *p, float *xscalep, float { xscale = yscale; } -#endif *xscalep = xscale; *yscalep = yscale; @@ -6757,10 +6756,6 @@ void preview_update_maximum_output_size(Preview *p) { float xxx = 0.0; float yyy = 0.0; - float dxmin = 0; - float dymin = 0; - float dxmax = 0; - float dymax = 0; int paper_orientation = 0; @@ -6863,10 +6858,10 @@ void preview_update_maximum_output_size(Preview *p) break; } - p->selection_maximum.coordinate[p->index_xmin] = p->selection.coordinate[p->index_xmin] + xxx *(-p->selection.coordinate[p->index_xmin] + p->selection.coordinate[p->index_xmax]) - p->maximum_output_width * xxx - dxmin; - p->selection_maximum.coordinate[p->index_ymin] = p->selection.coordinate[p->index_ymin] + yyy *(-p->selection.coordinate[p->index_ymin] + p->selection.coordinate[p->index_ymax]) - p->maximum_output_height * yyy - dymin; - p->selection_maximum.coordinate[p->index_xmax] = p->selection.coordinate[p->index_xmin] + xxx *(-p->selection.coordinate[p->index_xmin] + p->selection.coordinate[p->index_xmax]) + p->maximum_output_width * (1.0 - xxx) + dxmax; - p->selection_maximum.coordinate[p->index_ymax] = p->selection.coordinate[p->index_ymin] + yyy *(-p->selection.coordinate[p->index_ymin] + p->selection.coordinate[p->index_ymax]) + p->maximum_output_height * (1.0 - yyy) + dymax; + p->selection_maximum.coordinate[p->index_xmin] = p->selection.coordinate[p->index_xmin] + xxx * (p->selection.coordinate[p->index_xmax] - p->selection.coordinate[p->index_xmin]) - p->maximum_output_width * xxx; + p->selection_maximum.coordinate[p->index_ymin] = p->selection.coordinate[p->index_ymin] + yyy * (p->selection.coordinate[p->index_ymax] - p->selection.coordinate[p->index_ymin]) - p->maximum_output_height * yyy; + p->selection_maximum.coordinate[p->index_xmax] = p->selection.coordinate[p->index_xmin] + xxx * (p->selection.coordinate[p->index_xmax] - p->selection.coordinate[p->index_xmin]) + p->maximum_output_width * (1.0 - xxx); + p->selection_maximum.coordinate[p->index_ymax] = p->selection.coordinate[p->index_ymin] + yyy * (p->selection.coordinate[p->index_ymax] - p->selection.coordinate[p->index_ymin]) + p->maximum_output_height * (1.0 - yyy); if ( (p->selection.coordinate[p->index_xmin] < p->selection_maximum.coordinate[p->index_xmin]) || |