- The search area can be limited to a rectangle (
Rectvariable), to a region (that is, a continuous array of rectangles –Regionvariable), or to an array of rectangles which, in the general case, need not be continuous (RectArrayvariable). This type of constraint is set using theRestrictSearchAreafunction and by specifying a parameter of the corresponding type.
Any expressions which return values of the required type can be specified as parameters. - The search area can be limited to a half-plane located to the left of, to the right of, above, or below a particular point. Such constraints are set using the
Leftof,Rightof,Above, andBelowfunctions. - Sometimes you may wish to set constraints for an element boundary. For example, it may be known beforehand that the left boundary of an element is always located in the left-hand part of the image, whereas the right boundary may stretch indefinitely to the right.
The FlexiLayout language allows you to set such constraints at the stage of calculating the search area, thereby narrowing the range of possible hypotheses for an element. Such constraints are set using theLeftBound,RightBound,topBound, andBottomBoundfunctions and the operators>and<. TheLeftBoundandRightBoundfunctions are used to access the left and right boundaries of the search area, and thetopBoundandBottomBoundfunctions are used to access the top and bottom boundaries respectively. - You can set search constraints by excluding a rectangle, an array of rectangles, a hypothesis, and so on from the search area. This can be done by using the
Exclude,ExcludeRect, andExcludeSetfunctions.
Specifying the search area
Search constraints
Set search constraints in the Advanced pre-search relations section using RestrictSearchArea, half-plane functions, boundary limits, and exclusions.
The search area constraints are set on the Search Constraints and the Relations tabs in the Properties dialog box, and in the Advanced pre-search relations section. Before the constraints have been applied, the search area coincides with the rectangle of the page. First, the program applies the constraints set on the Search Constraints and the Relations tabs. Next, the program applies the additional constraints set in the Advanced pre-search relations section.
The following types of constraint can be set in the Advanced pre-search relations section:
