kopia lustrzana https://gitlab.com/sane-project/backends
canon_dr backend v54
- br_x and br_y locked to page_width/height until changedmerge-requests/1/head
rodzic
d0ea697ab8
commit
ed59056d40
|
@ -327,6 +327,8 @@
|
|||
- add swskip option
|
||||
- reorder geometry group options
|
||||
- use bg_color to fill missing image data
|
||||
v54 2015-11-21, MAN
|
||||
- br_x and br_y locked to page_width/height until changed
|
||||
|
||||
SANE FLOW DIAGRAM
|
||||
|
||||
|
@ -377,7 +379,7 @@
|
|||
#include "canon_dr.h"
|
||||
|
||||
#define DEBUG 1
|
||||
#define BUILD 53
|
||||
#define BUILD 54
|
||||
|
||||
/* values for SANE_DEBUG_CANON_DR env var:
|
||||
- errors 5
|
||||
|
@ -3036,6 +3038,14 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (s->u.page_x == FIXED_MM_TO_SCANNER_UNIT(val_c))
|
||||
return SANE_STATUS_GOOD;
|
||||
|
||||
/* if full width image, and paper size is changed,
|
||||
change the image size to match new paper */
|
||||
if (s->u.tl_x == 0 && s->u.br_x == s->u.page_x){
|
||||
DBG (20, "sane_control_option: br_x tracking page_width\n");
|
||||
s->u.br_x = FIXED_MM_TO_SCANNER_UNIT(val_c);
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
}
|
||||
|
||||
s->u.page_x = FIXED_MM_TO_SCANNER_UNIT(val_c);
|
||||
|
||||
*info |= SANE_INFO_RELOAD_OPTIONS;
|
||||
|
@ -3045,6 +3055,14 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (s->u.page_y == FIXED_MM_TO_SCANNER_UNIT(val_c))
|
||||
return SANE_STATUS_GOOD;
|
||||
|
||||
/* if full height image, and paper size is changed,
|
||||
change the image size to match new paper */
|
||||
if (s->u.tl_y == 0 && s->u.br_y == s->u.page_y){
|
||||
DBG (20, "sane_control_option: br_y tracking page_height\n");
|
||||
s->u.br_y = FIXED_MM_TO_SCANNER_UNIT(val_c);
|
||||
*info |= SANE_INFO_RELOAD_PARAMS;
|
||||
}
|
||||
|
||||
s->u.page_y = FIXED_MM_TO_SCANNER_UNIT(val_c);
|
||||
|
||||
*info |= SANE_INFO_RELOAD_OPTIONS;
|
||||
|
|
Ładowanie…
Reference in New Issue