From 18c81dee7ca13b13078cd8adc4eccab7a7c3ad89 Mon Sep 17 00:00:00 2001
From: doom4ster <doom4ster@gmail.com>
Date: 星期二, 15 八月 2017 11:29:26 +0800
Subject: [PATCH] CB_IMGPSScan.cab ver2.0.1.32 修正檢核相關欄位時的定位偏差
---
CB_IMGPSScanImp.dcu | 0
CB_IMGPSScan.ocx | 0
CB_IMGPSScan.dproj | 4 ++--
CB_IMGPSScan.res | 0
CB_IMGPSScanImp.pas | 33 ++++++++++++++++++++++++---------
5 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/CB_IMGPSScan.dproj b/CB_IMGPSScan.dproj
index 263ae3a..0b7265d 100644
--- a/CB_IMGPSScan.dproj
+++ b/CB_IMGPSScan.dproj
@@ -95,7 +95,7 @@
<VersionInfo Name="MajorVer">2</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">1</VersionInfo>
- <VersionInfo Name="Build">31</VersionInfo>
+ <VersionInfo Name="Build">32</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
@@ -107,7 +107,7 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
- <VersionInfoKeys Name="FileVersion">2.0.1.31</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">2.0.1.32</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
diff --git a/CB_IMGPSScan.ocx b/CB_IMGPSScan.ocx
index a1bc5e0..6f65e91 100644
--- a/CB_IMGPSScan.ocx
+++ b/CB_IMGPSScan.ocx
Binary files differ
diff --git a/CB_IMGPSScan.res b/CB_IMGPSScan.res
index 2289e7d..238d7b9 100644
--- a/CB_IMGPSScan.res
+++ b/CB_IMGPSScan.res
Binary files differ
diff --git a/CB_IMGPSScanImp.dcu b/CB_IMGPSScanImp.dcu
index 026625c..3d7497d 100644
--- a/CB_IMGPSScanImp.dcu
+++ b/CB_IMGPSScanImp.dcu
Binary files differ
diff --git a/CB_IMGPSScanImp.pas b/CB_IMGPSScanImp.pas
index 87cd59f..fe778b7 100644
--- a/CB_IMGPSScanImp.pas
+++ b/CB_IMGPSScanImp.pas
@@ -4682,7 +4682,7 @@
//ShowMessage('Xdpi='+IntToStr(Xdpi)+#10#13+'Ydpi='+IntToStr(Ydpi)+#10#13+'H='+IntToStr(H)+#10#13+'W='+IntToStr(W)+#10#13);
//ShowMessage('Site='+Site);
OMRRect := CM_Str2Rect(Site,Xdpi,UpLPoint);
-//ShowMessage(IntToStr(OMRRect.Left)+#10#13+IntToStr(OMRRect.top)+#10#13+IntToStr(OMRRect.Right)+#10#13+IntToStr(OMRRect.Bottom));
+Display1.Lines.Add('UpLPoint=('+IntToStr(UpLPoint.X)+','+IntToStr(UpLPoint.Y)+');'+Site+';'+IntToStr(OMRRect.Left)+','+IntToStr(OMRRect.top)+','+IntToStr(OMRRect.Right)+','+IntToStr(OMRRect.Bottom));
if OMRRect.Left < 0 then
OMRRect.Left := 0;
if OMRRect.Top < 0 then
@@ -4694,6 +4694,7 @@
result := Get_OMR(ISB_BW.Graphic,OMRRect);
//ShowMessage('result='+IntToStr(result));
+
end;
end;
@@ -5719,7 +5720,7 @@
DW := GetFindResult('T1.FORM_WIDTH');
ANCHOR := UpperCase(GetFindResult('T1.ANCHOR'));
ANCHOR := Index2Anchor(ANCHOR);
-//showmessage(FormID+#13+DH+#13+DW+#13);
+Display1.Lines.Add(FormID+','+DH+','+DW);
//ShowMessage('AAAAAAAAA');
if ((ANCHOR = 'ANCHOR') or (ANCHOR = 'FRAME')) and (DH <> '') and (DW <> '') then //有十字定位點
begin
@@ -10878,6 +10879,8 @@
OMROkCount : Integer;
//Casecheck : Boolean; //是否要做檢核
//AllCheck : Boolean; //是否要做完整檢核
+
+ ISB8W,ISB8H:integer;
begin
///OMRErrInfo 1: 必要文件 2:相依文件 3:互斥文件 4:必填 5:欄位有值附文件 6:欄位有值不附文件
/// 7: 欄位有值相關欄位也要有值 8:欄位有值要寫備註 9:停用日期 10:最大頁數
@@ -11104,6 +11107,7 @@
//Showmessage(ColCName +','+ inttostr(OMRMpsV1.GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site))+','+inttostr(Pixel + SafePixel));
//SafePixel:=90000;
Display1.Lines.Add(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
+//FindPoint(ISB_BW.Graphic,UpLPoint,UpRPoint,DownLPoint,ANCHOR);
if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then
begin
//Showmessage('oh');
@@ -11164,6 +11168,11 @@
RelaFormName := FormCode2FormName(CaseID,RelaFormCode);
Anchor1 := FormID2Anchor(RelaFormCode);
RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml');
+Display1.Lines.Add(RelaFile+','+RelaFormName);
+ ISB8.LoadFromFile(ImageSavePath+CaseID+'\upload\'+RelaFile,1); //20170815
+ ISB8W:= ISB8.Graphic.Width;
+ ISB8H:= ISB8.Graphic.Height;
+ FindPoint(ISB8.Graphic,UpLPoint,UpRPoint,DownLPoint,ISB8W,ISB8H,ANCHOR); //20170815 抓相關然欄位所在圖檔的定位
OMROK := False;
//OMROK := False;
//if RelaXT.SubNodes['/form/settype2/'].First then
@@ -11190,12 +11199,12 @@
OMROK := True;
Break;
end;
+ ///依十字定位點縮放////
+ ImageReSize_FormID(CaseID,OMRFile); //20170815 重新抓定位
+ ////依十字定位點縮放////
end;
end;
- //Else
- //begin
- //ColCName := XT['/form/settype1/'+ColEName+'/'+nodename+'/'];
- //end;
+
Until not RelaXT.SubNodes['/form/settype2/'+RelaColEName+'/'].Next;
if not OMROk then
begin
@@ -11235,7 +11244,7 @@
else
SiteRec := SiteRec+'@'+Site;
Pixel := XT.Node['/form/settype8/'+ColEName+'/'].Attributes['pixel'];
- Display1.Lines.Add(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
+Display1.Lines.Add(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt) > (Pixel + SafePixel) then
begin
@@ -11256,6 +11265,10 @@
RelaFormName := FormCode2FormName(CaseID,RelaFormCode);
Anchor1 := FormID2Anchor(RelaFormCode);
RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml');
+ ISB8.LoadFromFile(ImageSavePath+CaseID+'\upload\'+RelaFile,1); //20170815
+ ISB8W:= ISB8.Graphic.Width;
+ ISB8H:= ISB8.Graphic.Height;
+ FindPoint(ISB8.Graphic,UpLPoint,UpRPoint,DownLPoint,ISB8W,ISB8H,ANCHOR); //20170815 抓相關然欄位所在圖檔的定位
OMROK := False;
//OMROK := False;
//if RelaXT.SubNodes['/form/settype2/'].First then
@@ -11276,14 +11289,16 @@
RelaSiteRec := RelaSiteRec+'@'+RelaSite;
if FileExists(ImageSavePath+CaseID+'\upload\'+RelaFile) then
begin
- Display1.Lines.Add(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
-
+Display1.Lines.Add(ColEName+' '+ColCName+' 圖像實際點數='+IntToStr(GetSiteOMR(ImageSavePath+CaseID+'\upload\'+OMRFile,Site,Bt))+' 設定點數='+IntToStr( (Pixel + SafePixel)));
if GetSiteOMR(ImageSavePath+CaseID+'\upload\'+RelaFile,RelaSite,Bt) > (RelaPixel + SafePixel) then
begin
inc(OMROkCount);
//OMROK := True;
//Break;
end;
+ ///依十字定位點縮放////
+ ImageReSize_FormID(CaseID,OMRFile);
+ ////依十字定位點縮放////
end;
end;
//Else
--
Gitblit v1.8.0