
IPA::Region - region data structures

A contour is a 8-connected point set that is returned by IPA::Global::identify_contours function.
A region is a set of horizontal lines,
describing an 2D area.
The contour2region function converts contour output of IPA::Global::identify_contours and IPA::Global::identify_scanlines to a region and returns the region array and its starting y-position.
The contour has to contain no less that 2 unique points.
The ultimate requirement is that all points have to be 8-connected and the contour contains no holes.
Example:
3.3 3.3-3.3
2.2 4.2 -> 2.2-------4.2
1.1 2.1 3.1 4.1 1.1----------4.1
contour region
The module provides various manipluation routines for these regions.

Converts output of IPA::Global::identify_contours to a region.
Converts output of IPA::Global::identify_scanlines to a region.
Plots REGION onto DRAWABLE with OFFSET_X and OFFSET_Y
Same as draw but optimized for speed, and DRAWABLE must be an image.
Draws outline of REGION onto DRAWABLE with OFFSET_X and OFFSET_Y
Combines two regions, REGION_1 and REGION_2, with logic operation, which can be one of 'and', 'or', and 'xor' strings, and returns the result.
Recalculates extensions of REGION and returns adjusted alias of REGION.
Returns shallow copy of REGION
Returns deep copy of REGION
Shifts REGION by OFFSET_X and OFFSET_Y
Returns area occupied by a region

"identify_contours" in IPA::Global, "identify_scanlines" in IPA::Global