Operators |
partition_rectangle — Partition a region into rectangles of approximately equal size.
partition_rectangle(Region : Partitioned : Width, Height : )
partition_rectangle partitions the input region into rectangles having an extent of Width times Height. The rectangles are returned in Partitioned. The region is always split into rectangles of approximately equal size. If this is not possible with the requested rectangle size, then Width and Height are adapted so that the size of the resulting rectangles is approximately equal. If the region is smaller than the given size, its output remains unchanged. A partition is only done if the size of the region is at least 1.5 times the size of the rectangle given by the parameters.
Region to be partitioned.
Partitioned region.
Width of the individual rectangles.
Height of the individual rectangles.
partition_rectangle 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>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<'true'/'false'>). If necessary, an exception is raised.
intersection, smallest_rectangle1, shape_trans, clip_region
Foundation
Operators |