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" 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.