Drawing Pages and Zones

LEADTOOLS provides functions for drawing pages, with or without zones. The zones may or may not be selected. Before drawing a page, with or without its zones, that page must be set as "active."

LEADTOOLS OCR Module - OmniPage Engine

Before drawing a page (with or without its zones), set the page as "active" by calling L_Doc2SetActivePage/l_doc2setactivepageext. After the active page has been set, draw the page by calling L_Doc2DrawPage/l_doc2drawpageext. This function gives you the option of drawing the page with or without the zones.

To draw a page "zoomed in", set the paint zoom factor before actually drawing the page. To set the paint zoom factor for a specific page, call L_Doc2SetPaintZoomFactor/l_doc2setpaintzoomfactorext. Get the current paint zoom factor for a specific page by calling L_Doc2GetPaintZoomFactor/l_doc2getpaintzoomfactorext.

Select and draw a zone in the HDC by calling L_Doc2SelectZone/L_Doc2SelectZoneExt or L_Doc2SelectZoneByPoint/l_doc2selectzonebypointext. L_Doc2SelectZone selects or deselects a zone by specifying a page index and a zone index. Set the pen to draw zones by calling L_Doc2SetZonePen. If the zone is selected, the zone is drawn with a "selection rectangle" around it. Set the pen used to draw the selected zone using L_Doc2SetSelectedZonePen.

The L_Doc2SelectZoneByPoint/l_doc2selectzonebypointext selects a zone by determining which zone on the page contains the specified point. If a zone containing that point is found, that zone is selected and the zone is redrawn with a "selection rectangle" around it. As with the L_Doc2SelectZone/L_Doc2SelectZoneExt function, the pen used to draw the zones is set using the L_Doc2SetZonePen. The pen used to draw the selected zone is set using L_Doc2SetSelectedZonePen.

To get information about the selected zone, call L_Doc2GetSelectedZone/l_doc2getselectedzoneext.

To update the area of a specific zone on a specific page, call L_Doc2Zone/l_doc2zoneext. (This seems more like a general zone function that could be used for more than just drawing.).

L_Doc2RemoveSelectedZone/l_doc2removeselectedzoneext removes the selected zone from the zone list of the specified page.

When scrolling a page that contains zones, the zones must also be scrolled in order to display the zones at the proper location on the page. The L_Doc2OffsetZones function takes the amount the page was scrolled and scrolls the zones accordingly.

For more information refer to:

An Overview of Recognition Modules

Recognizing Multiple Documents

Recognizing Document Pages

Working with Pages

Working with Zones

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.