Operator Reference

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region (Operator)

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_checker_region — Create a checkered region.

Signature

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_regionGenCheckerRegionGenCheckerRegiongen_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 WidthRegionWidthRegionWidthRegionwidthRegionwidth_region, HeightRegionHeightRegionHeightRegionheightRegionheight_region respectively, the size of the fields of the checkerboard by WidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern * HeightPatternHeightPatternHeightPatternheightPatternheight_pattern.

Attention

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

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

RegionCheckerRegionCheckerRegionCheckerregionCheckerregion_checker (output_object)  region objectHRegionHObjectHObjectHobject *

Created checkerboard region.

WidthRegionWidthRegionWidthRegionwidthRegionwidth_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 width_region (lin)

Minimum increment: 1

Recommended increment: 10

HeightRegionHeightRegionHeightRegionheightRegionheight_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 height_region (lin)

Minimum increment: 1

Recommended increment: 10

WidthPatternWidthPatternWidthPatternwidthPatternwidth_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 width_pattern (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthPattern < WidthRegion

HeightPatternHeightPatternHeightPatternheightPatternheight_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 height_pattern (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: 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((WidthRegionWidthRegionWidthRegionwidthRegionwidth_region * HeightRegionHeightRegionHeightRegionheightRegionheight_region) / WidthPatternWidthPatternWidthPatternwidthPatternwidth_pattern)

Result

The operator gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegiongen_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">)set_system("clip_region",<"true"/"false">).

Possible Successors

paint_regionpaint_regionPaintRegionPaintRegionpaint_region

Alternatives

gen_grid_regiongen_grid_regionGenGridRegionGenGridRegiongen_grid_region, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsgen_region_runs, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1, concat_objconcat_objConcatObjConcatObjconcat_obj, gen_random_regiongen_random_regionGenRandomRegionGenRandomRegiongen_random_region, gen_random_regionsgen_random_regionsGenRandomRegionsGenRandomRegionsgen_random_regions

See also

reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain

Module

Foundation