partition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle (Operator)

Name

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle — Aufteilen einer Region in Rechtecke von ungefähr gleicher Größe.

Signatur

partition_rectangle(Region : Partitioned : Width, Height : )

Herror partition_rectangle(const Hobject Region, Hobject* Partitioned, double Width, double Height)

Herror T_partition_rectangle(const Hobject Region, Hobject* Partitioned, const Htuple Width, const Htuple Height)

void PartitionRectangle(const HObject& Region, HObject* Partitioned, const HTuple& Width, const HTuple& Height)

HRegion HRegion::PartitionRectangle(double Width, double Height) const

static void HOperatorSet.PartitionRectangle(HObject region, out HObject partitioned, HTuple width, HTuple height)

HRegion HRegion.PartitionRectangle(double width, double height)

Beschreibung

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectangle zerlegt die Eingaberegion in Rechtecke der Größe WidthWidthWidthWidthwidth mal HeightHeightHeightHeightheight. Die Rechtecke werden in PartitionedPartitionedPartitionedPartitionedpartitioned zurückgeliefert. Die Region wird immer in etwa gleich große Rechtecke zerlegt. Falls dies mit der gewünschten Rechteckgröße nicht möglich ist, werden WidthWidthWidthWidthwidth und HeightHeightHeightHeightheight so angepasst, dass die resultierenden Rechtecke in etwa gleich groß sind. Wenn die Region kleiner als die angegebene Größe ist, bleibt sie unverändert. Eine Zerlegung findet erst statt, wenn die Größe mindestens 1.5 mal so groß ist wie durch die Parameter vorgegeben.

Ausführungsinformationen

Parameter

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHobject

Region die zerlegt werden soll.

PartitionedPartitionedPartitionedPartitionedpartitioned (output_object)  region(-array) objectHRegionHRegionHobject *

Zerlegte Region.

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHtuple (real) (double) (double) (double)

Breite der einzelnen Rechtecke.

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHtuple (real) (double) (double) (double)

Höhe der einzelnen Rechtecke.

Ergebnis

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectangle liefert normalerweise den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer Eingabe (keine Eingabebilder vorhanden) lässt sich mittels set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>), das bei leerer Region mit set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>), das bei leerer Ergebnisregion mit set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThreshold, connectionconnectionConnectionConnectionConnection

Alternativen

partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamic

Siehe auch

intersectionintersectionIntersectionIntersectionIntersection, smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1, shape_transshape_transShapeTransShapeTransShapeTrans, clip_regionclip_regionClipRegionClipRegionClipRegion

Modul

Foundation