LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
HitTestZone Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrPage Interface : HitTestZone Method



point
The test point in logical coordinates.

The HitTestZone Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

point
The test point in logical coordinates.
Gets the zero-based index of the zone under a certain point.

Syntax

Visual Basic (Declaration) 
Function HitTestZone( _
   ByVal point As LogicalPoint _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As IOcrPage
Dim point As LogicalPoint
Dim value As Integer
 
value = instance.HitTestZone(point)
C# 
int HitTestZone( 
   LogicalPoint point
)
C++/CLI 
int HitTestZone( 
   LogicalPoint point
) 

Parameters

point
The test point in logical coordinates.

Return Value

The zero-based index of the zone under point, if no zone is under the test point, this method will return -1.

Example

This example will view the OCR Page and its zones in a Leadtools.WinForms.RasterImageViewer control. It will then allow the user to select/deselect zones with the mouse.

Remarks

You can use this method to check whether a zone (either added manually or automatically) is under a given test point. For example, if you have a Windows Forms based application with the current IOcrPage in a Leadtools.WinForms.RasterImageViewer control. You might want to draw the zones on the surface of the viewer. For this, you can use the GetZoneBoundsInPixels methods. If you want to allow the user to click with the mouse on the viewer to select and de-select zones, you can use HitTestZone.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

HitTestZone requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features