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."
For more information refer to:
An Overview of Recognition Modules
OCR Plus
Begin by calling L_DocSetActivePage. Once the active page has been set, the page can be drawn by calling L_DocDrawPage. This function gives you the option of drawing the page with or without the zones.
A page may be drawn "zoomed in" by setting a paint zoom factor before actually drawing the page. To set the paint zoom factor for a specific page, call L_DocSetPaintZoomFactor. To get the current paint zoom factor for a specific page, call L_DocGetPaintZoomFactor.
A zone can be selected and the zone drawn in the HDC using L_DocSelectZone or L_DocSelectZoneByPoint. The L_DocSelectZone selects or deselects a zone by specifying a page index and a zone index. If the zone is selected, the zone is drawn with a "selection rectangle" around it. The pen used to draw the zones is set using the L_DocSetZonePen. The pen used to draw the selected zone is set using L_DocSetSelectedZonePen.
The L_DocSelectZoneByPoint 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_DocSelectZone function, the pen used to draw the zones is set using the L_DocSetZonePen. The pen used to draw the selected zone is set using L_DocSetSelectedZonePen.
To get information about the selected zone, call L_DocGetSelectedZone.
To update the area of a specific zone on a specific page, call L_DocZone. (This seems more like a general zone function that could be used for more than just drawing.)
L_DocRemoveSelectedZone 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_DocOffsetZones function takes the amount the page was scrolled and scrolls the zones accordingly.
OCR Professional
Before drawing a page, with or without its zones, that page must be set as "active" by calling L_Doc2SetActivePage. Once the active page has been set, the page can be drawn by calling L_Doc2DrawPage. This function gives you the option of drawing the page with or without the zones.
A page may be drawn "zoomed in" by setting a paint zoom factor before actually drawing the page. To set the paint zoom factor for a specific page, call L_Doc2SetPaintZoomFactor. To get the current paint zoom factor for a specific page, call L_Doc2GetPaintZoomFactor.
A zone can be selected and the zone drawn in the HDC using L_Doc2SelectZone or L_Doc2SelectZoneByPoint. The L_Doc2SelectZone selects or deselects a zone by specifying a page index and a zone index. If the zone is selected, the zone is drawn with a "selection rectangle" around it. 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.
The L_Doc2SelectZoneByPoint 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 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.
To update the area of a specific zone on a specific page, call L_Doc2Zone. (This seems more like a general zone function that could be used for more than just drawing.).
L_Doc2RemoveSelectedZone 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.