gen_rectangle2
— Create a rectangle of any orientation.
The operator gen_rectangle2
generates one or more rectangles
with the center
(Row
, Column
) , the orientation Phi
and
the half edge lengths Length1
and Length2
.
The orientation is given in arc measure and indicates the angle between
the horizontal axis and Length1
(mathematically positive).
The coordinate system runs from (0,0) (upper left corner) to
(Width-1,Height-1). See get_system
and
reset_obj_db
in this context.
More than one region can be created by passing one tuple of corner points.
The gray values of the output objects are undefined. For speed
reasons, the resulting region may contain additional pixels at the
border and some individual pixels at the border may be missing.
This may lead to an inconsistency between the operators
smallest_rectangle2
and gen_rectangle2
.
Rectangle
(output_object) region(-array) →
object
Created rectangle.
Row
(input_control) rectangle2.center.y(-array) →
(real / integer)
Line index of the center.
Default value: 300.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Typical range of values:
Row
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Column
(input_control) rectangle2.center.x(-array) →
(real / integer)
Column index of the center.
Default value: 200.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Typical range of values:
Column
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Phi
(input_control) rectangle2.angle.rad(-array) →
(real / integer)
Angle of longitudinal axis to the horizontal (in radians).
Default value: 0.0
Suggested values: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097
Typical range of values: -1.178097
≤
Phi
≤
1.178097
(lin)
Restriction: - pi / 2 < Phi && Phi <= pi / 2
Length1
(input_control) rectangle2.hwidth(-array) →
(real / integer)
Half width.
Default value: 100.0
Suggested values: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0
Typical range of values:
Length1
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Length2
(input_control) rectangle2.hheight(-array) →
(real / integer)
Half height.
Default value: 20.0
Suggested values: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0
Typical range of values:
Length2
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
If the parameter values are correct the operator gen_rectangle2
returns the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.
The clipping according to the current image format is set via the
operator set_system('clip_region',<'true'/'false'>)
.
gen_rectangle1
,
gen_region_polygon_filled
,
gen_region_polygon
,
gen_region_points
,
fill_up
draw_rectangle2
,
reduce_domain
,
smallest_rectangle2
,
gen_ellipse
Foundation