#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2ExcludeZoneRect(hDoc, nPageIndex, nZoneIndex, prc)

Excludes a rectangle from a user zone.


L_HDOC2 hDoc

Handle to the OCR document. This handle is obtained by calling the L_Doc2StartUp function.

L_INT nPageIndex

Index of the page. This is a zero-based index.

L_INT nZoneIndex

Index of the zone. This is a zero-based index.

RECT * prc

Pointer to RECT structure to be subtracted from specific zone


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


This function subtracts a rectangle from an existing user zone. The function will recalculate the rectangle list of the zone. The resulting list must be a pizzabox-shape except for OMR zones.

A pizzabox shape is a union of rectangles, where the top of each rectangle in the union must touch the bottom of the rectangle above it. A rectangle can touch at most one rectangle above and one below. The following zones cannot have a pizzabox shape:

To add a new rectangle to a zone, call the L_Doc2AddZoneRect / L_Doc2AddZoneRectExt function.

Required DLLs and Libraries

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

LEADTOOLS OCR Module - OmniPage Engine C API Help