Operator Reference
Drawing
This chapter describes operators that allow the user to manually draw geometric shapes. They require mouse interaction and in general block the application until the mouse interaction is finished. For non-blocking interactive creation of geometric shapes, HALCON also provides drawing objects with the operators listed in Graphics / Object.
General Objectives
The draw operators
, draw_region
, draw_xld
,
draw_xld_mod
, draw_nurbs
, draw_nurbs_mod
,
draw_nurbs_interp
, as well as draw_nurbs_interp_mod
,
drag_region1
and drag_region2
return iconic objects.
All other draw operators return the geometric parameters that are needed to
create regions or contours in the respective shape (see table).
Most draw operators have a modifying variant that allows the user to
specify the initial parameters of the shown shape.
drag_region3
Drawing in Buffer Windows
Because the draw operators rely on mouse interaction, they generally do
not work when used with buffer windows (see
), so you
should use drawing objects instead. Nevertheless some operators (see table)
can be used in buffer windows.
These operators are controlled through a mouse state.
In order to use these operators (and to not cause a deadlock) the
application has to provide the mouse state with the operators
open_window
, send_mouse_double_click_event
,
send_mouse_down_event
and send_mouse_drag_event
as well as the
state of the modifier keys (also by using send_mouse_up_event
),
whereas the draw operators themselves must be run in another thread.
While using the draw operator, the image section must not be changed.
send_mouse_drag_event
Drawing Operators | Output | Generate Object | Works in Buffer Windows |
---|---|---|---|
|
, |
|
yes |
|
, , , |
|
yes |
|
, , , |
|
yes |
|
, , , , |
, |
yes |
|
, , |
, |
yes |
|
, , , , |
, |
yes |
|
|
- | yes |
|
|
- | yes |
|
|
- | yes |
|
, , , |
- | no |
|
, , , , |
- | no |
|
|
- | no |
|
|
- | no |
|
|
- | no |
List of Operators
drag_region1
- Interactive moving of a region.
drag_region2
- Interactive movement of a region with fixpoint specification.
drag_region3
- Interactive movement of a region with restriction of positions.
draw_circle
- Interactive drawing of a circle.
draw_circle_mod
- Interactive drawing of a circle.
draw_ellipse
- Interactive drawing of an ellipse.
draw_ellipse_mod
- Interactive drawing of an ellipse.
draw_line
- Draw a line.
draw_line_mod
- Draw a line.
draw_nurbs
- Interactive drawing of a NURBS curve.
draw_nurbs_interp
- Interactive drawing of a NURBS curve using interpolation.
draw_nurbs_interp_mod
- Interactive modification of a NURBS curve using interpolation.
draw_nurbs_mod
- Interactive modification of a NURBS curve.
draw_point
- Draw a point.
draw_point_mod
- Draw a point.
draw_polygon
- Interactive drawing of a polygon row.
draw_rectangle1
- Draw a rectangle parallel to the coordinate axis.
draw_rectangle1_mod
- Draw a rectangle parallel to the coordinate axis.
draw_rectangle2
- Interactive drawing of any orientated rectangle.
draw_rectangle2_mod
- Interactive drawing of any orientated rectangle.
draw_region
- Interactive drawing of a closed region.
draw_xld
- Interactive drawing of a contour.
draw_xld_mod
- Interactive modification of a contour.