disp_rectangle2T_disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 (算子)
名称
disp_rectangle2T_disp_rectangle2DispRectangle2DispRectangle2disp_rectangle2 — 显示任意方向的矩形。
签名
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
描述
disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2DispRectangle2disp_rectangle2 draws one or several arbitrarily oriented
rectangles in the output window. A rectangle is described by the
center (CenterRowCenterRowCenterRowCenterRowcenterRowcenter_row,CenterColCenterColCenterColCenterColcenterColcenter_col), the orientation
PhiPhiPhiPhiphiphi (in radians) and half the lengths of the edges
Length1Length1Length1Length1length1length_1 and Length2Length2Length2Length2length2length_2. The operators used to control
the display of regions (e.g., set_drawset_drawSetDrawSetDrawSetDrawset_draw, set_grayset_graySetGraySetGraySetGrayset_gray,
set_drawset_drawSetDrawSetDrawSetDrawset_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_colorSetColorSetColorSetColorset_color。
注意
The center must lie within the window boundaries.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
窗口句柄。
CenterRowCenterRowCenterRowCenterRowcenterRowcenter_row (输入控制) rectangle2.center.y(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
中心列索引。
默认值:
48
建议值:
0, 64, 128, 256, 511
值范围:
0
≤
CenterRow
CenterRow
CenterRow
CenterRow
centerRow
center_row
≤
511 (lin)
最小增量:
1
建议增量:
10
CenterColCenterColCenterColCenterColcenterColcenter_col (输入控制) rectangle2.center.x(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
中心列索引。
默认值:
64
建议值:
0, 64, 128, 256, 511
值范围:
0
≤
CenterCol
CenterCol
CenterCol
CenterCol
centerCol
center_col
≤
511 (lin)
最小增量:
1
建议增量:
10
PhiPhiPhiPhiphiphi (输入控制) rectangle2.angle.rad(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Orientation of rectangle in radians.
默认值:
0.0
建议值:
0.0, 0.785398, 1.570796, 3.1415926, 6.283185
值范围:
0.0
≤
Phi
Phi
Phi
Phi
phi
phi
≤
6.283185 (lin)
最小增量:
0.01
建议增量:
0.1
Length1Length1Length1Length1length1length_1 (输入控制) 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.
默认值:
48
建议值:
0, 64, 128, 256, 511
值范围:
0
≤
Length1
Length1
Length1
Length1
length1
length_1
≤
511 (lin)
最小增量:
1
建议增量:
10
Length2Length2Length2Length2length2length_2 (输入控制) 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.
默认值:
32
建议值:
0, 64, 128, 256, 511
值范围:
0
≤
Length2
Length2
Length2
Length2
length2
length_2
≤
511 (lin)
最小增量:
1
建议增量:
10
限制:
Length2 < Length1
示例(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)
结果
disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2DispRectangle2disp_rectangle2 返回 2 ( H_MSG_TRUE ),如果参数正确。否则将抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window,
set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb,
set_lutset_lutSetLutSetLutSetLutset_lut,
set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi,
set_drawset_drawSetDrawSetDrawSetDrawset_draw,
set_colorset_colorSetColorSetColorSetColorset_color,
set_coloredset_coloredSetColoredSetColoredSetColoredset_colored,
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width
替代
disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region,
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2,
disp_rectangle1disp_rectangle1DispRectangle1DispRectangle1DispRectangle1disp_rectangle1,
set_shapeset_shapeSetShapeSetShapeSetShapeset_shape
另见
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window,
disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region,
set_colorset_colorSetColorSetColorSetColorset_color,
set_drawset_drawSetDrawSetDrawSetDrawset_draw,
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width
模块
基础