attach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindowattach_background_to_windowT_attach_background_to_window
説明
attach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindowattach_background_to_windowT_attach_background_to_window — HALCON ウインドウに背景画像をアタッチする。
書式
attach_background_to_window( image Image, window WindowHandle )void AttachBackgroundToWindow( const HObject& Image, const HTuple& WindowHandle )static void HOperatorSet.AttachBackgroundToWindow( HObject image, HTuple windowHandle )def attach_background_to_window( image: HObject, window_handle: HHandle ) -> None
Herror T_attach_background_to_window( const Hobject Image, const Htuple WindowHandle )
void HWindow::AttachBackgroundToWindow( const HImage& Image ) const
static void HDrawingObject::AttachBackgroundToWindow( const HImage& Image, const HWindow& WindowHandle )
void HWindow.AttachBackgroundToWindow( HImage image )
static void HDrawingObject.AttachBackgroundToWindow( HImage image, HWindow windowHandle )
説明
このオペレーターは、Imageimageimage に渡された背景画像を
WindowHandlewindowHandlewindow_handle で定義された HALCON ウインドウにアタッチしま
す。入力画像はコピーされます。このため、安全に解放できます。
背景画像は、attach_background_to_windowAttachBackgroundToWindow を呼び出すと直ち
に HALCON ウインドウに表示されます。このウインドウに以前に表示され
ていたすべての HALCON オブジェクトは、このオペレーターを呼び出した
ときにはまだ表示されています。このため、前のウインドウの内容は上書
きされません。
ウインドウの内容は、最初は背景画像、次に HALCON オブジェクト、最後
に描画オブジェクトの順で表示されます。
したがって、描画オブジェクトは常に一番上に表示されます。このウインドウは、
ウインドウ内でユーザーが操作し、set_partSetPart を呼び出
すたびに再描画されます。HALCON オブジェクトは、
clear_windowClearWindow を使用してウインドウから削除できます。
背景画像は、オペレーター detach_background_from_windowDetachBackgroundFromWindow を
使用してウインドウから削除できます。
注意
イベントキューをアクティブにプローブする同期オペレーター(
get_mbuttonGetMbutton、read_charReadChar など)を使用すると、描画オ
ブジェクトの操作と競合することに注意してください。カーソルの状態を
読み込む必要がある場合は、適切かつ無侵襲の代替手段について、使用し
ているフレームワークのドキュメントを参照してください。
また、イベントベースの機能は、以前のブロックオペレーター
draw_rectangle1DrawRectangle1、draw_rectangle2DrawRectangle2、
draw_regionDrawRegion、draw_xldDrawXld、または draw_circleDrawCircle
とは一緒に使用しないでください。これらは、HALCON ウインドウに送信
されたすべてのイベントをアクティブにフェッチするため、イベントベー
スの機能と競合します。
実行情報
実行情報
パラメーター
Imageimageimage (input_object) singlechannelimage → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
背景画像
WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)
ウインドウハンドル
結果
ウインドウが存在し、指定されたパラメーターが正しい場合、
attach_background_to_windowAttachBackgroundToWindow は 2 (H_MSG_TRUE) を返します。必要に応じ
て、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
open_windowOpenWindow
後処理の候補
detach_background_from_windowDetachBackgroundFromWindow
モジュール
Foundation