Fuzzy rectangle is a structure that describes a class of rectangles whose boundaries lie within specific allowed ranges. A fuzzy rectangle consists of two rectangles - an external rectangle and an internal rectangle. In the FlexiLayout language, fuzzy rectangles are represented by type FuzzyRect. As can be seen in the figure below, in the general case, when constraints for all the boundaries are set, there is a part of the search area that must fall within any hypothesis for the element. It is this part that forms the internal rectangle. The maximum-size circumscribing rectangle of the possible hypothesis forms the external rectangle.Documentation Index
Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
Use this file to discover all available pages before exploring further.
InternalRect: [L2, T2, R1, B1], ExternalRect: [L1, T1, R2, B2].
If the user sets no constraints for the boundaries of the search area, the internal rectangle degenerates and makes no geometrical sense. In this case L1=R1, L2=R2, T1=B1, T2=B2.
Suppose now that no constraints have been specified for the search area. Then, if the maximum and minimum allowed number of pages is 1, the fuzzy rectangle of the search area will be created as follows:
Operations on Fuzzy Rectangles
Fuzzy rectangles can be united and intersected. When two fuzzy rectangles are intersected, their corresponding boundaries intersect: the right boundary of one rectangle intersects with the right boundary of the other, the left with the left, etc. This creates new ranges for the boundaries:(L1 <= L2, T1 <= T2, R1 <= R2, B1 <= B2) is not met, the resulting fuzzy rectangle will be nullified: InternalRect: [0, 0, 0, 0], ExternalRect: [0, 0, 0, 0]. Usually an empty fuzzy rectangle is created as a result of contradictory conditions, e.g. if you attempt to intersect two fuzzy rectangles whose external boundaries do not intersect.
Fuzzy rectangles are united in the same way: first, the ranges of each boundary are united. As a result of uniting the two ranges, a minimum range is created which contains both specified ranges. After the boundaries have been united, a new fuzzy rectangle is formed.
In practice you will most often encounter fuzzy rectangles with a degenerated internal rectangle. Only on rare occasions will you need to set constraints on a specific boundary. However, the search area for an element is always represented by a fuzzy rectangle and an array of excluded rectangles.