disp_rectangle2T_disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 (Operator)

Name

disp_rectangle2T_disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 — Displays arbitrarily oriented rectangles.

Signature

disp_rectangle2( : : WindowHandle, CenterRow, CenterCol, Phi, Length1, Length2 : )

Herror T_disp_rectangle2(const Htuple WindowHandle, const Htuple CenterRow, const Htuple CenterCol, const Htuple Phi, const Htuple Length1, const Htuple Length2)

void DispRectangle2(const HTuple& WindowHandle, const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2)

void HWindow::DispRectangle2(const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2) const

void HWindow::DispRectangle2(double CenterRow, double CenterCol, double Phi, double Length1, double Length2) const

static void HOperatorSet.DispRectangle2(HTuple windowHandle, HTuple centerRow, HTuple centerCol, HTuple phi, HTuple length1, HTuple length2)

void HWindow.DispRectangle2(HTuple centerRow, HTuple centerCol, HTuple phi, HTuple length1, HTuple length2)

void HWindow.DispRectangle2(double centerRow, double centerCol, double phi, double length1, double length2)

def disp_rectangle2(window_handle: HHandle, center_row: MaybeSequence[Union[int, float]], center_col: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], length_1: MaybeSequence[Union[int, float]], length_2: MaybeSequence[Union[int, float]]) -> None

Description

disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 draws one or several arbitrarily oriented rectangles in the output window. A rectangle is described by the center (CenterRowCenterRowCenterRowcenterRowcenter_row,CenterColCenterColCenterColcenterColcenter_col), the orientation PhiPhiPhiphiphi (in radians) and half the lengths of the edges Length1Length1Length1length1length_1 and Length2Length2Length2length2length_2. The operators used to control the display of regions (e.g., set_drawset_drawSetDrawSetDrawset_draw, set_grayset_graySetGraySetGrayset_gray, set_drawset_drawSetDrawSetDrawset_draw) can also be used with rectangles. Several rectangles can be displayed with one call by using tuple parameters. For the use of colors with several rectangles, see set_colorset_colorSetColorSetColorset_color.

Attention

The center must lie within the window boundaries.

Execution Information

Parameters

WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

CenterRowCenterRowCenterRowcenterRowcenter_row (input_control)  rectangle2.center.y(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row index of the center.

Default: 48

Suggested values: 0, 64, 128, 256, 511

Value range: 0 ≤ CenterRow CenterRow CenterRow centerRow center_row ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 10

CenterColCenterColCenterColcenterColcenter_col (input_control)  rectangle2.center.x(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column index of the center.

Default: 64

Suggested values: 0, 64, 128, 256, 511

Value range: 0 ≤ CenterCol CenterCol CenterCol centerCol center_col ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 10

PhiPhiPhiphiphi (input_control)  rectangle2.angle.rad(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Orientation of rectangle in radians.

Default: 0.0

Suggested values: 0.0, 0.785398, 1.570796, 3.1415926, 6.283185

Value range: 0.0 ≤ Phi Phi Phi phi phi ≤ 6.283185 (lin)

Minimum increment: 0.01

Recommended increment: 0.1

Length1Length1Length1length1length_1 (input_control)  rectangle2.hwidth(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half of the length of the longer side.

Default: 48

Suggested values: 0, 64, 128, 256, 511

Value range: 0 ≤ Length1 Length1 Length1 length1 length_1 ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 10

Length2Length2Length2length2length_2 (input_control)  rectangle2.hheight(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half of the length of the shorter side.

Default: 32

Suggested values: 0, 64, 128, 256, 511

Value range: 0 ≤ Length2 Length2 Length2 length2 length_2 ≤ 511 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Length2 < Length1

Example (HDevelop)

set_color(WindowHandle,'green')
draw_region(MyRegion,WindowHandle)
elliptic_axis(MyRegion,Ra,Rb,Phi)
area_center(MyRegion,_,Row,Column)
disp_rectangle2(WindowHandle,Row,Column,Phi,Ra,Rb)

Result

disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 returns 2 ( H_MSG_TRUE) , if the parameters are correct. Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window, set_rgbset_rgbSetRgbSetRgbset_rgb, set_lutset_lutSetLutSetLutset_lut, set_hsiset_hsiSetHsiSetHsiset_hsi, set_drawset_drawSetDrawSetDrawset_draw, set_colorset_colorSetColorSetColorset_color, set_coloredset_coloredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width

Alternatives

disp_regiondisp_regionDispRegionDispRegiondisp_region, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2, disp_rectangle1disp_rectangle1DispRectangle1DispRectangle1disp_rectangle1, set_shapeset_shapeSetShapeSetShapeset_shape

See also

open_windowopen_windowOpenWindowOpenWindowopen_window, disp_regiondisp_regionDispRegionDispRegiondisp_region, set_colorset_colorSetColorSetColorset_color, set_drawset_drawSetDrawSetDrawset_draw, set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width

Module

Foundation