clear_rectangleT_clear_rectangleClearRectangleClearRectangleclear_rectangle清除矩形(算子)
名称
clear_rectangleT_clear_rectangleClearRectangleClearRectangleclear_rectangle — 删除输出窗口上的矩形。
警告
clear_rectangleclear_rectangleClearRectangleClearRectangleClearRectangleclear_rectangle 已过时,仅出于向后兼容性考虑而保留。
签名
void ClearRectangle(const HTuple& WindowHandle, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2)
void HWindow::ClearRectangle(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2) const
void HWindow::ClearRectangle(Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2) const
static void HOperatorSet.ClearRectangle(HTuple windowHandle, HTuple row1, HTuple column1, HTuple row2, HTuple column2)
void HWindow.ClearRectangle(HTuple row1, HTuple column1, HTuple row2, HTuple column2)
void HWindow.ClearRectangle(int row1, int column1, int row2, int column2)
描述
clear_rectangleclear_rectangleClearRectangleClearRectangleClearRectangleclear_rectangle 删除矩形区域内的所有条目,该矩形通过左上角坐标
(Row1Row1Row1Row1row1row_1,Column1Column1Column1Column1column1column_1) 和右下角坐标
(Row2Row2Row2Row2row2row_2,Column2Column2Column2Column2column2column_2) 定义。删除操作将使指定矩形区域设置为背景色(参见
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window)。
若需删除多个矩形区域,可传递多个矩形参数,即参数 Row1Row1Row1Row1row1row_1、Column1Column1Column1Column1column1column_1、Row2Row2Row2Row2row2row_2 和 Column2Column2Column2Column2column2column_2 均为元组形式。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
窗口句柄。
Row1Row1Row1Row1row1row_1 (输入控制) rectangle.origin.y(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
左上角的行索引。
默认值:
10
值范围:
0
≤
Row1
Row1
Row1
Row1
row1
row_1
≤
511 (lin)
最小增量:
1
建议增量:
1
Column1Column1Column1Column1column1column_1 (输入控制) rectangle.origin.x(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
左上角的列索引。
默认值:
10
值范围:
0
≤
Column1
Column1
Column1
Column1
column1
column_1
≤
511 (lin)
最小增量:
1
建议增量:
1
Row2Row2Row2Row2row2row_2 (输入控制) rectangle.corner.y(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
右下角的行索引。
默认值:
118
值范围:
0
≤
Row2
Row2
Row2
Row2
row2
row_2
≤
511 (lin)
最小增量:
1
建议增量:
1
限制:
Row2 > Row1
Column2Column2Column2Column2column2column_2 (输入控制) rectangle.corner.x(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
右下角的列索引。
默认值:
118
值范围:
0
≤
Column2
Column2
Column2
Column2
column2
column_2
≤
511 (lin)
最小增量:
1
建议增量:
1
限制:
Column2 >= Column1
示例(HDevelop)
* Erase a rectangle in the output window interactively:
draw_rectangle1(WindowHandle,L1,C1,L2,C2)
示例(C)
/* Erase a rectangle in the output window interactively: */
draw_rectangle1(WindowHandle,&L1,&C1,&L2,&C2);
示例(HDevelop)
* Erase a rectangle in the output window interactively:
draw_rectangle1(WindowHandle,L1,C1,L2,C2)
示例(HDevelop)
* Erase a rectangle in the output window interactively:
draw_rectangle1(WindowHandle,L1,C1,L2,C2)
示例(HDevelop)
* Erase a rectangle in the output window interactively:
draw_rectangle1(WindowHandle,L1,C1,L2,C2)
结果
如果存在输出窗口且指定参数正确,clear_rectangleclear_rectangleClearRectangleClearRectangleClearRectangleclear_rectangle 返回 2 (H_MSG_TRUE)。如有必要,则抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window,
set_drawset_drawSetDrawSetDrawSetDrawset_draw,
set_colorset_colorSetColorSetColorSetColorset_color,
set_coloredset_coloredSetColoredSetColoredSetColoredset_colored,
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width,
set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb,
set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1
替代
clear_windowclear_windowClearWindowClearWindowClearWindowclear_window,
disp_rectangle1disp_rectangle1DispRectangle1DispRectangle1DispRectangle1disp_rectangle1
另见
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window
模块
基础