gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegion (Operator)

Name

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegion — 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)

Description

The operator gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegion 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 WidthRegionWidthRegionWidthRegionWidthRegionwidthRegion, HeightRegionHeightRegionHeightRegionHeightRegionheightRegion respectively, the size of the fields of the checkerboard by WidthPatternWidthPatternWidthPatternWidthPatternwidthPattern * HeightPatternHeightPatternHeightPatternHeightPatternheightPattern.

Attention

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

Execution Information

Parameters

RegionCheckerRegionCheckerRegionCheckerRegionCheckerregionChecker (output_object)  region objectHRegionHRegionHobject *

Created checkerboard region.

WidthRegionWidthRegionWidthRegionWidthRegionwidthRegion (input_control)  extent.x HTupleHTupleHtuple (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 ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthRegion >= 1

HeightRegionHeightRegionHeightRegionHeightRegionheightRegion (input_control)  extent.y HTupleHTupleHtuple (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 ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: HeightRegion >= 1

WidthPatternWidthPatternWidthPatternWidthPatternwidthPattern (input_control)  extent.x HTupleHTupleHtuple (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 ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: WidthPattern > 0 && WidthPattern < WidthRegion

HeightPatternHeightPatternHeightPatternHeightPatternheightPattern (input_control)  extent.y HTupleHTupleHtuple (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 ≤ 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((WidthRegionWidthRegionWidthRegionWidthRegionwidthRegion * HeightRegionHeightRegionHeightRegionHeightRegionheightRegion) / WidthPatternWidthPatternWidthPatternWidthPatternwidthPattern)

Result

The operator gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegion 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">).

Possible Successors

paint_regionpaint_regionPaintRegionPaintRegionPaintRegion

Alternatives

gen_grid_regiongen_grid_regionGenGridRegionGenGridRegionGenGridRegion, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilled, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPoints, gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRuns, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1, concat_objconcat_objConcatObjConcatObjConcatObj, gen_random_regiongen_random_regionGenRandomRegionGenRandomRegionGenRandomRegion, gen_random_regionsgen_random_regionsGenRandomRegionsGenRandomRegionsGenRandomRegions

See also

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain

Module

Foundation