Kofax DOKuStar Validation User Manual

Page 107

Advertising
background image

DOKuStar Validation for Ascent Capture

Page

103

Private Sub mergeZones(firstFld As Field, secondFld As Field)
Dim firstSrcInfo As ImageSourceInfo
Dim secondSrcInfo As ImageSourceInfo
Dim fr, fb, sr, sb As Long

Set firstSrcInfo = firstFld.SourceInfo
Set secondSrcInfo = secondFld.SourceInfo
fr = firstSrcInfo.Zone.X + firstSrcInfo.Zone.Width
fb = firstSrcInfo.Zone.Y + firstSrcInfo.Zone.Height
fr = secondSrcInfo.Zone.X + secondSrcInfo.Zone.Width
fr = secondSrcInfo.Zone.Y + secondSrcInfo.Zone.Height

If firstSrcInfo.Zone.X > secondSrcInfo.Zone.X Then
firstSrcInfo.Zone.X = secondSrcInfo.Zone.X
End If
If firstSrcInfo.Zone.Y > secondSrcInfo.Zone.Y Then
firstSrcInfo.Zone.Y = secondSrcInfo.Zone.Y
End If

If fr >= sr Then
firstSrcInfo.Zone.Width = fr - firstSrcInfo.Zone.X
Else
firstSrcInfo.Zone.Width = sr - firstSrcInfo.Zone.X
End If

If fb >= sb Then
firstSrcInfo.Zone.Height = fb - firstSrcInfo.Zone.Y
Else
firstSrcInfo.Zone.Height = sb - firstSrcInfo.Zone.Y
End If

End Sub

Advertising