Skip to content

disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2T_disp_rectangle2🔗

Short description🔗

disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2T_disp_rectangle2 — Displays arbitrarily oriented rectangles.

Signature🔗

disp_rectangle2( window WindowHandle, rectangle2.center.y CenterRow, rectangle2.center.x CenterCol, rectangle2.angle.rad Phi, rectangle2.hwidth Length1, rectangle2.hheight Length2 )void DispRectangle2( const HTuple& WindowHandle, const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2 )static void HOperatorSet.DispRectangle2( HTuple windowHandle, HTuple centerRow, HTuple centerCol, HTuple phi, HTuple length1, HTuple 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

Herror T_disp_rectangle2( 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

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 )

Description🔗

disp_rectangle2DispRectangle2 draws one or several arbitrarily oriented rectangles in the output window. A rectangle is described by the center (CenterRowcenterRowcenter_row,CenterColcenterColcenter_col), the orientation Phiphiphi (in radians) and half the lengths of the edges Length1length1length_1 and Length2length2length_2. The operators used to control the display of regions (e.g., set_drawSetDraw, set_graySetGray, set_drawSetDraw) 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_colorSetColor.

Attention🔗

The center must lie within the window boundaries.

Execution information🔗

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🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

CenterRowcenterRowcenter_row (input_control) rectangle2.center.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Row index of the center.

Default: 4848
Suggested values: 0, 64, 128, 256, 5110, 64, 128, 256, 511
Value range: 0 ≤ CenterRow ≤ 511 (lin)
Minimum increment: 1
Recommended increment: 10

CenterColcenterColcenter_col (input_control) rectangle2.center.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Column index of the center.

Default: 6464
Suggested values: 0, 64, 128, 256, 5110, 64, 128, 256, 511
Value range: 0 ≤ CenterCol ≤ 511 (lin)
Minimum increment: 1
Recommended increment: 10

Phiphiphi (input_control) rectangle2.angle.rad(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Orientation of rectangle in radians.

Default: 0.00.0
Suggested values: 0.0, 0.785398, 1.570796, 3.1415926, 6.2831850.0, 0.785398, 1.570796, 3.1415926, 6.283185
Value range: 0.0 ≤ Phi ≤ 6.283185 (lin)
Minimum increment: 0.01
Recommended increment: 0.1

Length1length1length_1 (input_control) rectangle2.hwidth(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Half of the length of the longer side.

Default: 4848
Suggested values: 0, 64, 128, 256, 5110, 64, 128, 256, 511
Value range: 0 ≤ Length1 ≤ 511 (lin)
Minimum increment: 1
Recommended increment: 10

Length2length2length_2 (input_control) rectangle2.hheight(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Half of the length of the shorter side.

Default: 3232
Suggested values: 0, 64, 128, 256, 5110, 64, 128, 256, 511
Value range: 0 ≤ Length2 ≤ 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_rectangle2DispRectangle2 returns 2 (H_MSG_TRUE), if the parameters are correct. Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow, set_rgbSetRgb, set_lutSetLut, set_hsiSetHsi, set_drawSetDraw, set_colorSetColor, set_coloredSetColored, set_line_widthSetLineWidth

Alternatives

disp_regionDispRegion, gen_rectangle2GenRectangle2, disp_rectangle1DispRectangle1, set_shapeSetShape

See also

open_windowOpenWindow, disp_regionDispRegion, set_colorSetColor, set_drawSetDraw, set_line_widthSetLineWidth

Module🔗

Foundation