添加获取纸张尺寸接口
This commit is contained in:
parent
34e0dbfb95
commit
ded9d29b5f
|
@ -2563,6 +2563,14 @@ int hg_scanner::device_io_control(unsigned long code, void* data, unsigned* len)
|
||||||
|
|
||||||
return wait_img_.is_waiting() && wait_usb_.is_waiting() ? SCANNER_ERR_NO_DATA : SCANNER_ERR_OK;
|
return wait_img_.is_waiting() && wait_usb_.is_waiting() ? SCANNER_ERR_NO_DATA : SCANNER_ERR_OK;
|
||||||
}
|
}
|
||||||
|
else if (code == IO_CTRL_CODE_GET_PAPER_SIZE)
|
||||||
|
{
|
||||||
|
std::string name((char*)data);
|
||||||
|
int paper = match_best_paper(name, NULL);
|
||||||
|
SIZE size = paper_size(paper);
|
||||||
|
|
||||||
|
*len = (size.cx & 0x0ffff) | ((size.cy & 0x0ffff) << 16);
|
||||||
|
}
|
||||||
|
|
||||||
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue