gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region (算子名称)

名称

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region — Create a checkered region.

参数签名

gen_checker_region( : RegionChecker : WidthRegion, HeightRegion, WidthPattern, HeightPattern : )

Herror gen_checker_region(Hobject* RegionChecker, const Hlong WidthRegion, const Hlong HeightRegion, const Hlong WidthPattern, const Hlong HeightPattern)

Herror T_gen_checker_region(Hobject* RegionChecker, const Htuple WidthRegion, const Htuple HeightRegion, const Htuple WidthPattern, const Htuple HeightPattern)

void GenCheckerRegion(HObject* RegionChecker, const HTuple& WidthRegion, const HTuple& HeightRegion, const HTuple& WidthPattern, const HTuple& HeightPattern)

void HRegion::GenCheckerRegion(Hlong WidthRegion, Hlong HeightRegion, Hlong WidthPattern, Hlong HeightPattern)

static void HOperatorSet.GenCheckerRegion(out HObject regionChecker, HTuple widthRegion, HTuple heightRegion, HTuple widthPattern, HTuple heightPattern)

void HRegion.GenCheckerRegion(int widthRegion, int heightRegion, int widthPattern, int heightPattern)

def gen_checker_region(width_region: int, height_region: int, width_pattern: int, height_pattern: int) -> HObject

描述

The operator gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegiongen_checker_region returns a checkered region. Every black field of the checkerboard belongs to the region. The horizontal and vertical expansion of the region is limited by WidthRegionWidthRegionWidthRegionWidthRegionwidthRegionwidth_region, HeightRegionHeightRegionHeightRegionHeightRegionheightRegionheight_region respectively, the size of the fields of the checkerboard by WidthPatternWidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern * HeightPatternHeightPatternHeightPatternHeightPatternheightPatternheight_pattern.

注意

If a very small pattern is chosen (WidthPatternWidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern < 4) the created region requires much storage.

运行信息

参数表

RegionCheckerRegionCheckerRegionCheckerRegionCheckerregionCheckerregion_checker (output_object)  region objectHRegionHObjectHRegionHobject *

Created checkerboard region.

WidthRegionWidthRegionWidthRegionWidthRegionwidthRegionwidth_region (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Largest occurring x value of the region.

Default: 511

Suggested values: 10, 20, 31, 63, 127, 255, 300, 400, 511

Value range: 1 ≤ WidthRegion WidthRegion WidthRegion WidthRegion widthRegion width_region (lin)

Minimum increment: 1

Recommended increment: 10

HeightRegionHeightRegionHeightRegionHeightRegionheightRegionheight_region (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Largest occurring y value of the region.

Default: 511

Suggested values: 10, 20, 31, 63, 127, 255, 300, 400, 511

Value range: 1 ≤ HeightRegion HeightRegion HeightRegion HeightRegion heightRegion height_region (lin)

Minimum increment: 1

Recommended increment: 10

WidthPatternWidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of a field of the checkerboard.

Default: 64

Suggested values: 1, 2, 4, 8, 16, 20, 32, 64, 100, 128, 200, 300, 500

Value range: 1 ≤ WidthPattern WidthPattern WidthPattern WidthPattern widthPattern width_pattern (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthPattern < WidthRegion

HeightPatternHeightPatternHeightPatternHeightPatternheightPatternheight_pattern (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of a field of the checkerboard.

Default: 64

Suggested values: 1, 2, 4, 8, 16, 20, 32, 64, 100, 128, 200, 300, 500

Value range: 1 ≤ HeightPattern HeightPattern HeightPattern HeightPattern heightPattern height_pattern (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: HeightPattern < HeightRegion

例程 (HDevelop)

gen_checker_region(Checker,512,512,32,64)
dev_set_draw('fill')
dev_display (Checker)

Complexity

The required storage (in bytes) for the region is:

O((WidthRegionWidthRegionWidthRegionWidthRegionwidthRegionwidth_region * HeightRegionHeightRegionHeightRegionHeightRegionheightRegionheight_region) / WidthPatternWidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern)

结果

The operator gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegiongen_checker_region returns the value 2 ( H_MSG_TRUE) if the parameter values are correct. Otherwise an exception is raised. The clipping according to the current image format is set via the operator set_system('clip_region',<'true'/'false'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)set_system("clip_region",<"true"/"false">).

可能的后置算子

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region

可替代算子

gen_grid_regiongen_grid_regionGenGridRegionGenGridRegionGenGridRegiongen_grid_region, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, concat_objconcat_objConcatObjConcatObjConcatObjconcat_obj, gen_random_regiongen_random_regionGenRandomRegionGenRandomRegionGenRandomRegiongen_random_region, gen_random_regionsgen_random_regionsGenRandomRegionsGenRandomRegionsGenRandomRegionsgen_random_regions

参考其它

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

模块

Foundation