ClassesClassesClassesClasses | | | | Operators

attach_background_to_windowattach_background_to_windowAttachBackgroundToWindowattach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindow (Operator)

Name

attach_background_to_windowattach_background_to_windowAttachBackgroundToWindowattach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindow — Attach a background image to a HALCON window.

Signature

attach_background_to_window(Image : : WindowHandle : )

Herror attach_background_to_window(const Hobject Image, const Hlong WindowHandle)

Herror T_attach_background_to_window(const Hobject Image, const Htuple WindowHandle)

Herror attach_background_to_window(Hobject Image, const HTuple& WindowHandle)

void HWindow::AttachBackgroundToWindow(const HImage& Image) const

void HDrawingObject::AttachBackgroundToWindow(const HImage& Image, const HTuple& WindowHandle)

void AttachBackgroundToWindow(const HObject& Image, const HTuple& WindowHandle)

void HWindow::AttachBackgroundToWindow(const HImage& Image) const

static void HDrawingObject::AttachBackgroundToWindow(const HImage& Image, const HWindow& WindowHandle)

void HOperatorSetX.AttachBackgroundToWindow(
[in] IHUntypedObjectX* Image, [in] VARIANT WindowHandle)

void HWindowX.AttachBackgroundToWindow([in] IHImageX* Image)

void HDrawingObjectX.AttachBackgroundToWindow(
[in] IHImageX* Image, [in] IHWindowX* WindowHandle)

static void HOperatorSet.AttachBackgroundToWindow(HObject image, HTuple windowHandle)

void HWindow.AttachBackgroundToWindow(HImage image)

static void HDrawingObject.AttachBackgroundToWindow(HImage image, HWindow windowHandle)

Description

This operator attaches the background image passed in ImageImageImageImageImageimage to a HALCON window defined in WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle. The input image is copied. Thus it can be freed safely.

The background image is instantly displayed in the HALCON window when calling attach_background_to_windowattach_background_to_windowAttachBackgroundToWindowattach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindow. All HALCON objects that were previously displayed in the window will still be displayed when calling this operator. Thus the previous window content will not be overwritten.

The window contents are displayed in the following order: first the background image, then HALCON objects, and finally the drawing objects. Thus, the drawing object is displayed always on top. Note that the window will be redrawn for each user interaction within the window and each call of set_partset_partSetPartset_partSetPartSetPart. HALCON objects can be deleted from the window with clear_windowclear_windowClearWindowclear_windowClearWindowClearWindow.

The background image can be removed from the window with the operator detach_background_from_windowdetach_background_from_windowDetachBackgroundFromWindowdetach_background_from_windowDetachBackgroundFromWindowDetachBackgroundFromWindow.

Attention

Note that using any synchronous operator which actively probe the event queue, e.g., get_mbuttonget_mbuttonGetMbuttonget_mbuttonGetMbuttonGetMbutton or read_charread_charReadCharread_charReadCharReadChar, will conflict with the interaction with the drawing objects. In case the state of the cursor has to be read, please refer to the documentation of your framework of choice for an appropriate, non-invasive alternative.

Furthermore, the event based functionality should not be used together with the former blocking operators draw_rectangle1draw_rectangle1DrawRectangle1draw_rectangle1DrawRectangle1DrawRectangle1, draw_rectangle2draw_rectangle2DrawRectangle2draw_rectangle2DrawRectangle2DrawRectangle2, draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion, draw_xlddraw_xldDrawXlddraw_xldDrawXldDrawXld or draw_circledraw_circleDrawCircledraw_circleDrawCircleDrawCircle. They conflict with the event based functionality, since they actively fetch all events sent to the HALCON window.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Background image.

WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Window handle.

Result

If the window exists and the specified parameters are correct attach_background_to_windowattach_background_to_windowAttachBackgroundToWindowattach_background_to_windowAttachBackgroundToWindowAttachBackgroundToWindow returns 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow

Possible Successors

detach_background_from_windowdetach_background_from_windowDetachBackgroundFromWindowdetach_background_from_windowDetachBackgroundFromWindowDetachBackgroundFromWindow

Module

Foundation


ClassesClassesClassesClasses | | | | Operators