kopia lustrzana https://gitlab.com/sane-project/backends
fix move paper before scan when required ydpy exceeds base ydpy
rodzic
7d5958f52d
commit
4133e1b079
|
@ -652,19 +652,18 @@ gt68xx_generic_move_paper (GT68xx_Device * dev,
|
||||||
SANE_Int abs_y0, base_ydpi;
|
SANE_Int abs_y0, base_ydpi;
|
||||||
GT68xx_Model *model = dev->model;
|
GT68xx_Model *model = dev->model;
|
||||||
|
|
||||||
/* TODO duplicated logic from setup scan */
|
|
||||||
ydpi = request->ydpi;
|
ydpi = request->ydpi;
|
||||||
base_ydpi = model->base_ydpi;
|
base_ydpi = model->base_ydpi;
|
||||||
|
|
||||||
/* Special fixes */
|
if (ydpi > model->base_ydpi)
|
||||||
if (!model->constant_ydpi)
|
ydpi = base_ydpi;
|
||||||
{
|
|
||||||
if (ydpi > model->base_ydpi)
|
|
||||||
base_ydpi = model->optical_ydpi;
|
|
||||||
}
|
|
||||||
pixel_y0 =
|
pixel_y0 =
|
||||||
SANE_UNFIX ((request->y0 + model->y_offset)) * ydpi / MM_PER_INCH + 0.5;
|
SANE_UNFIX ((request->y0 + model->y_offset)) * ydpi / MM_PER_INCH + 0.5;
|
||||||
abs_y0 = pixel_y0 * base_ydpi / ydpi;
|
abs_y0 = pixel_y0 * base_ydpi / ydpi;
|
||||||
|
|
||||||
|
DBG (6, "gt68xx_generic_move_paper: base_ydpi=%d\n", base_ydpi);
|
||||||
|
DBG (6, "gt68xx_generic_move_paper: ydpi=%d\n", ydpi);
|
||||||
DBG (6, "gt68xx_generic_move_paper: abs_y0=%d\n", abs_y0);
|
DBG (6, "gt68xx_generic_move_paper: abs_y0=%d\n", abs_y0);
|
||||||
|
|
||||||
/* paper move request */
|
/* paper move request */
|
||||||
|
|
Ładowanie…
Reference in New Issue