Skip to content

draw_rectangle1_modDrawRectangle1ModDrawRectangle1Moddraw_rectangle1_modT_draw_rectangle1_mod🔗

説明🔗

draw_rectangle1_modDrawRectangle1ModDrawRectangle1Moddraw_rectangle1_modT_draw_rectangle1_mod — 座標系に平行な矩形を描画する。

書式🔗

draw_rectangle1_mod( window WindowHandle, rectangle.origin.y Row1In, rectangle.origin.x Column1In, rectangle.corner.y Row2In, rectangle.corner.x Column2In, out rectangle.origin.y Row1, out rectangle.origin.x Column1, out rectangle.corner.y Row2, out rectangle.corner.x Column2 )void DrawRectangle1Mod( const HTuple& WindowHandle, const HTuple& Row1In, const HTuple& Column1In, const HTuple& Row2In, const HTuple& Column2In, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2 )static void HOperatorSet.DrawRectangle1Mod( HTuple windowHandle, HTuple row1In, HTuple column1In, HTuple row2In, HTuple column2In, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2 )def draw_rectangle1_mod( window_handle: HHandle, row_1in: float, column_1in: float, row_2in: float, column_2in: float ) -> Tuple[float, float, float, float]

Herror T_draw_rectangle1_mod( const Htuple WindowHandle, const Htuple Row1In, const Htuple Column1In, const Htuple Row2In, const Htuple Column2In, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2 )

void HWindow::DrawRectangle1Mod( double Row1In, double Column1In, double Row2In, double Column2In, double* Row1, double* Column1, double* Row2, double* Column2 ) const

void HWindow.DrawRectangle1Mod( double row1In, double column1In, double row2In, double column2In, out double row1, out double column1, out double row2, out double column2 )

説明🔗

draw_rectangle1_modDrawRectangle1Mod は、ウインドウ内でマウスを使って座標軸 に平行な矩形を描画し、その矩形のパラメーターを返します。

矩形を作成するために、パラメーター Row1Inrow1Inrow_1in、 Column1Incolumn1Incolumn_1in、Row2Inrow2Inrow_2in、および Column2Incolumn2Incolumn_2in を 指定します。 生成された矩形の中央付近でマウスをクリックしドラッグすると、その矩 形を移動することができます。 任意の辺の付近でマウスをクリックしドラッグすると、その方向に矩形の 大きさを修正することができます。矩形のコーナ上をクリックしドラッグ することで、そのコーナを移動することができます。 マウスの右ボタンを押すと、処理を終了します。 処理の終了後、矩形はウインドウ内で見えなくなります。

注意🔗

バッファウインドウで使用する場合、マウスイベントをアプリケーションから提供しつつ、 描画オペレーターは別スレッドで実行する必要があります。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

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

ウインドウ ハンドル

Row1Inrow1Inrow_1in (input_control) rectangle.origin.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の左上角の行座標 (インデックス)

Column1Incolumn1Incolumn_1in (input_control) rectangle.origin.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の左上角の列座標 (インデックス)

Row2Inrow2Inrow_2in (input_control) rectangle.corner.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の右下角の行座標 (インデックス)

Column2Incolumn2Incolumn_2in (input_control) rectangle.corner.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の右下角の列座標 (インデックス)

Row1row1row_1 (output_control) rectangle.origin.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の左上角の行座標 (インデックス)

Column1column1column_1 (output_control) rectangle.origin.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の左上角の列座標 (インデックス)

Row2row2row_2 (output_control) rectangle.corner.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の右下角の行座標 (インデックス)

Column2column2column_2 (output_control) rectangle.corner.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

矩形の右下角の列座標 (インデックス)

例🔗

(HDevelop)


read_image(Image,'monkey')
get_image_size (Image, Width, Height)
dev_display (Image)
draw_rectangle1_mod(WindowHandle,100,100,200,300,\
                    Row1,Column1,Row2,Column2)
dev_set_part (Row1, Column1, Row2, Column2)
dev_display (Image)
(C)
read_image(&Image,"monkey")\;
get_image_size(Image,&Width,&Height)\;
disp_image(Image,WindowHandle)\;
draw_rectangle1_mod(WindowHandle,100,100,200,300,
                    &Row1,&Column1,&Row2,&Column2)\;
set_part(WindowHandle,Row1,Column1,Row2,Column2)\;
disp_image(Image,WindowHandle)\;

結果🔗

ウインドウが有効であれば、draw_rectangle1_modDrawRectangle1Mod は値 2 (H_MSG_TRUE) を返します。 必要に応じて、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

open_windowOpenWindow

後処理の候補

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

他の選択候補

draw_rectangle1DrawRectangle1, draw_rectangle2DrawRectangle2, draw_regionDrawRegion

関連項目

gen_rectangle1GenRectangle1, draw_circleDrawCircle, draw_ellipseDrawEllipse

モジュール🔗

Foundation