Skip to content

draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2T_draw_rectangle2🔗

説明🔗

draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2T_draw_rectangle2 — 対話方式で任意の方向をもつ短形を描画する。

書式🔗

draw_rectangle2( window WindowHandle, out rectangle2.center.y Row, out rectangle2.center.x Column, out rectangle2.angle.rad Phi, out rectangle2.hwidth Length1, out rectangle2.hheight Length2 )void DrawRectangle2( const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2 )static void HOperatorSet.DrawRectangle2( HTuple windowHandle, out HTuple row, out HTuple column, out HTuple phi, out HTuple length1, out HTuple length2 )def draw_rectangle2( window_handle: HHandle ) -> Tuple[float, float, float, float, float]

Herror T_draw_rectangle2( const Htuple WindowHandle, Htuple* Row, Htuple* Column, Htuple* Phi, Htuple* Length1, Htuple* Length2 )

void HWindow::DrawRectangle2( double* Row, double* Column, double* Phi, double* Length1, double* Length2 ) const

void HWindow.DrawRectangle2( out double row, out double column, out double phi, out double length1, out double length2 )

説明🔗

draw_rectangle2DrawRectangle2 は、ウインドウでユーザーが対話的に作成した 矩形のパラメーターを返します。

生成された矩形は、中心座標、第 1 軸と第 2 軸それぞれの 1/2 の長 さ、および第 1 軸が水平軸となす角度によって記述されます。

矩形を生成するために、まずマウスの左ボタンを押して矩形の中心を決め ます。ボタンを押したままで、第 1 軸の長さ (Length1length1length_1) と方 向 (Phiphiphi) を設定します。 第 2 主軸半径はデフォルト値が適用されますが、必要に応じて変更可能 です。 生成された矩形の中央付近でマウスをクリックしドラッグすると、その矩 形を移動することができます。 任意の辺の付近でマウスをクリックしドラッグすると、その方向に矩形の 大きさを修正することができます。第 1 軸上の矢印をクリックしてドラ ッグすると方向を変更できます。 マウスの右ボタンを押すことで処理を終了します。

処理の終了後、矩形はウインドウ内で見えなくなります。

注意🔗

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

実行情報🔗

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

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

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

パラメーター🔗

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

ウインドウ ハンドル

Rowrowrow (output_control) rectangle2.center.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

中心の行座標 (インデックス)

Columncolumncolumn (output_control) rectangle2.center.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

中心の列座標 (インデックス)

Phiphiphi (output_control) rectangle2.angle.rad → (real)HTuple (double)HTuple (double)floatHtuple (double)

水平軸と長軸の成す角度(ラジアン)

Length1length1length_1 (output_control) rectangle2.hwidth → (real)HTuple (double)HTuple (double)floatHtuple (double)

長軸

Length2length2length_2 (output_control) rectangle2.hheight → (real)HTuple (double)HTuple (double)floatHtuple (double)

短軸

結果🔗

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

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

組み合わせ

前処理の候補

open_windowOpenWindow

後処理の候補

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

他の選択候補

draw_rectangle2_modDrawRectangle2Mod, draw_rectangle1DrawRectangle1, draw_regionDrawRegion

関連項目

gen_rectangle2GenRectangle2, draw_circleDrawCircle, draw_ellipseDrawEllipse

モジュール🔗

Foundation