HALCON 13 introduces a new .NET control
HALCON 13 introduced a new .NET control for visualisation that implements basic functionality such as panning and zooming using the mouse wheel. When you add a reference to the HALCON/.NET Library, you now see two controls: the “old” HWindowCtrl as well as the new HSmartWindowCtrl.
In addition, the new control provides better WPF integration. You can embed it into other controls such as tabbed views, or scrollable windows. It is now also possible to overlay other controls on top of it.
In HALCON 13, it has also become easier to control the timing of the visualisation. This is a concern if you need to display several different iconic objects, as well as text, while possibly clearing the window in between. Displaying all these objects sequentially may cause the window to “flicker”.
With the new operator flush_buffer, you can prevent this by directing all graphics output into an invisible background window, then flushing its content into the visible window all at once.
Last but not least, it is now possible to use transparent colors. This is particularly useful for displaying regions if you want to allow the underlying image pixels to shine through as shown in the picture below.
You can set the transparency with dev_set_color passing a hex string in the format ‘#rrggbbaa’.