uv-twain/huagao/G400ScanConfig.cpp

32 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "G400ScanConfig.h"
G400ScanConfig::G400ScanConfig(GScanCap& gcap)
{
cfg.params.doubleFeeded = gcap.hardwarecaps.en_doublefeed == 0 ? 0 : 1;
cfg.params.dpi = G400_DPI::G400_D200;//gcap.resolution_dst <= 200.0f ? G400_DPI::G400_D200 : (gcap.resolution_dst <= 300.0f ? G400_DPI::G400_D300 : G400_DPI::G400_D600);
cfg.params.enableLed = 1;
cfg.params.isColor = gcap.pixtype==2?1:0;
if (gcap.filter != 3 || gcap.enhance_color)
cfg.params.isColor = 1;
else
cfg.params.isColor = SupPixelTypes[gcap.pixtype];
cfg.params.enableUV = gcap.en_uv;//gcap.hardwarecaps.en_stapledetect==0?0:1;
cfg.params.isCorrect = 1;//1 »úÆ÷УÕý
PaperStatus ps = { gcap.papertype,gcap.paperAlign };
cfg.params.pageSize = SupPaperTyps[ps];
CSize size = PaperSize.GetPaperSize(TwSS::A4, 200.0f, gcap.paperAlign);//G300 ×î´óÖ§³ÖA4·ùÃæ
cfg.params.dstHeight = (int)((size.cy+200)/100);
cfg.params.reversed1 = cfg.params.reversed2 = 0;
}
G400ScanConfig::~G400ScanConfig()
{
}
unsigned int G400ScanConfig::GetData()
{
return cfg.value;
}