clip_region — Clip a region to a rectangle.
clip_region clips the input regions to the rectangle
given by the four control parameters. clip_region is
more efficient than calling intersection with a
rectangle generated by gen_rectangle1.
Region (input_object) region(-array) → object
Region to be clipped.
RegionClipped (output_object) region(-array) → object
Clipped regions.
Row1 (input_control) rectangle.origin.y → (integer)
Row coordinate of the upper left corner of the rectangle.
Default value: 0
Suggested values: 0, 128, 200, 256
Typical range of values:
Row1
(lin)
Column1 (input_control) rectangle.origin.x → (integer)
Column coordinate of the upper left corner of the rectangle.
Default value: 0
Suggested values: 0, 128, 200, 256
Typical range of values:
Column1
(lin)
Row2 (input_control) rectangle.corner.y → (integer)
Row coordinate of the lower right corner of the rectangle.
Default value: 256
Suggested values: 128, 200, 256, 512
Typical range of values: 0
≤
Row2
≤
511 (lin)
Minimum increment: 1
Recommended increment: 10
Column2 (input_control) rectangle.corner.x → (integer)
Column coordinate of the lower right corner of the rectangle.
Default value: 256
Suggested values: 128, 200, 256, 512
Typical range of values: 0
≤
Column2
≤
511 (lin)
Minimum increment: 1
Recommended increment: 10
clip_region returns 2 (H_MSG_TRUE) if all parameters are correct.
The behavior in case of empty input (no regions given) can be set
via set_system('no_object_result',<Result>)
and the behavior in case of an empty input region via
set_system('empty_region_result',<Result>).
If necessary, an exception is raised.
threshold,
connection,
regiongrowing,
pouring
intersection,
gen_rectangle1,
clip_region_rel
Foundation