Operators |
create_drawing_object_xld — Create a XLD contour which can be modified interactively.
create_drawing_object_xld creates an XLD contour which can be modified interactively in a HALCON window by the user. The contour is defined by the coordinates Row and Column of its points.
These parameters can be queried any time with get_drawing_object_params, as well as its corresponding HALCON object with get_drawing_object_iconic.
In addition to those parameters, every drawing object has a number of parameters which determine the appearance of the object in the HALCON window. See set_drawing_object_params for details on the number and meaning of those parameters.
In order to enable the interactive modification with the drawing object, the object must be attached to an existing window. See attach_drawing_object_to_window for further details. Once attached, the contour is editable by the user through interaction with the window. Further points can be added by left clicking on the window. When clicking the contour segment between two consecutive points, a new point is added between those points. Each contour point can be moved by dragging its point handle. A single contour point can be deleted by dragging it over one of the neighboring contour points directly connected to it. The contour can be closed by moving the last point onto the first contour point. The contour can be moved as a whole by dragging it by the handle in the center. In addition, it is possible to assign a new contour to a drawing object with set_drawing_object_xld.
In contrast to the operator draw_xld, this interaction does not block the calling thread.
Note that since internal structures are allocated during create_drawing_object_xld and the following operators the drawing object should be explicitly freed if it is no longer needed.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Row coordinates of the polygon.
Default value: [100,200,200,100]
Suggested values: 0, 10, 20, 50, 100, 200, 500
Column coordinates of the polygon.
Default value: [100,100,200,200]
Suggested values: 0, 10, 20, 50, 100, 200, 500
Handle of the drawing object.
If the parameter values are correct the operator create_drawing_object_xld returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.
attach_drawing_object_to_window, get_drawing_object_params, get_drawing_object_iconic, set_drawing_object_xld
draw_xld, draw_xld_mod, draw_region
create_drawing_object_rectangle1, create_drawing_object_rectangle2, create_drawing_object_ellipse, create_drawing_object_circle_sector, create_drawing_object_ellipse_sector, create_drawing_object_line, create_drawing_object_circle
Foundation
Operators |