clip_region_relclip_region_relClipRegionRelClipRegionRelclip_region_rel (算子名称)

名称

clip_region_relclip_region_relClipRegionRelClipRegionRelclip_region_rel — Clip a region relative to its smallest surrounding rectangle.

参数签名

clip_region_rel(区域 : RegionClipped : Top, Bottom, Left, Right : )

Herror clip_region_rel(const Hobject 区域, Hobject* RegionClipped, const Hlong Top, const Hlong Bottom, const Hlong Left, const Hlong Right)

Herror T_clip_region_rel(const Hobject 区域, Hobject* RegionClipped, const Htuple Top, const Htuple Bottom, const Htuple Left, const Htuple Right)

void ClipRegionRel(const HObject& 区域, HObject* RegionClipped, const HTuple& Top, const HTuple& Bottom, const HTuple& Left, const HTuple& Right)

HRegion HRegion::ClipRegionRel(Hlong Top, Hlong Bottom, Hlong Left, Hlong Right) const

static void HOperatorSet.ClipRegionRel(HObject 区域, out HObject regionClipped, HTuple top, HTuple bottom, HTuple left, HTuple right)

HRegion HRegion.ClipRegionRel(int top, int bottom, int left, int right)

def clip_region_rel(区域: HObject, top: int, bottom: int, left: int, right: int) -> HObject

描述

clip_region_relclip_region_relClipRegionRelClipRegionRelClipRegionRelclip_region_rel reduces the 区域区域区域区域区域区域 by eliminating parts close to the smallest surrounding rectangle of the 区域区域区域区域区域区域. Specifically this means that the 区域区域区域区域区域区域 is clipped to a rectangle that is smaller than or equal to the smallest surrounding rectangle. The resulting clipped region is returned in RegionClippedRegionClippedRegionClippedRegionClippedregionClippedregion_clipped.

The rectangle to which the 区域区域区域区域区域区域 is clipped is determined by reducing the smallest surrounding axis-parallel rectangle at the top, bottom, left, and right side by the values given in TopTopTopToptoptop, BottomBottomBottomBottombottombottom, LeftLeftLeftLeftleftleft, and RightRightRightRightrightright, respectively.

Bottom = 0 Top = 10 Right = 20 Left = 10 区域 RegionClipped
( 1) ( 2)
Region with smallest surrounding rectangle (1) and clipped region (2).

These four parameters must contain numbers larger or equal to zero. If all parameters are set to zero, the region remains unchanged.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Regions to be clipped.

RegionClippedRegionClippedRegionClippedRegionClippedregionClippedregion_clipped (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Clipped regions.

TopTopTopToptoptop (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of rows clipped at the top.

Default: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Value range: 0 ≤ Top Top Top Top top top (lin)

Minimum increment: 1

Recommended increment: 1

BottomBottomBottomBottombottombottom (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of rows clipped at the bottom.

Default: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Value range: 0 ≤ Bottom Bottom Bottom Bottom bottom bottom (lin)

Minimum increment: 1

Recommended increment: 1

LeftLeftLeftLeftleftleft (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of columns clipped at the left.

Default: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Value range: 0 ≤ Left Left Left Left left left (lin)

Minimum increment: 1

Recommended increment: 1

RightRightRightRightrightright (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of columns clipped at the right.

Default: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Value range: 0 ≤ Right Right Right Right right right (lin)

Minimum increment: 1

Recommended increment: 1

结果

clip_region_relclip_region_relClipRegionRelClipRegionRelClipRegionRelclip_region_rel 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>) and the behavior in case of an empty input region via 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>)set_system("empty_region_result",<Result>). 如有必要,将引发异常。

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring

可能的后置算子

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

可替代算子

smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, intersectionintersectionIntersectionIntersectionIntersectionintersection, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, clip_regionclip_regionClipRegionClipRegionClipRegionclip_region

模块

Foundation