gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region (Operator)

Name

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region — Create a checkered region.

Signature

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

Description

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.

Attention

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

Execution Information

Parameters

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 value: 511

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

Typical range of values: 1 ≤ WidthRegion WidthRegion WidthRegion WidthRegion widthRegion width_region ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthRegion >= 1

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

Largest occurring y value of the region.

Default value: 511

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

Typical range of values: 1 ≤ HeightRegion HeightRegion HeightRegion HeightRegion heightRegion height_region ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: HeightRegion >= 1

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

Width of a field of the checkerboard.

Default value: 64

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

Typical range of values: 1 ≤ WidthPattern WidthPattern WidthPattern WidthPattern widthPattern width_pattern ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthPattern > 0 && WidthPattern < WidthRegion

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

Height of a field of the checkerboard.

Default value: 64

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

Typical range of values: 1 ≤ HeightPattern HeightPattern HeightPattern HeightPattern heightPattern height_pattern ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: HeightPattern > 0 && HeightPattern < HeightRegion

Example (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)

Result

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">).

Possible Successors

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region

Alternatives

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

See also

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Module

Foundation