Operator Reference

set_window_paramT_set_window_paramSetWindowParamSetWindowParamset_window_param (Operator)

set_window_paramT_set_window_paramSetWindowParamSetWindowParamset_window_param — Set window parameters.

Signature

set_window_param( : : WindowHandle, Param, Value : )

Herror T_set_window_param(const Htuple WindowHandle, const Htuple Param, const Htuple Value)

void SetWindowParam(const HTuple& WindowHandle, const HTuple& Param, const HTuple& Value)

void HWindow::SetWindowParam(const HString& Param, const HTuple& Value) const

void HWindow::SetWindowParam(const HString& Param, const HString& Value) const

void HWindow::SetWindowParam(const char* Param, const char* Value) const

void HWindow::SetWindowParam(const wchar_t* Param, const wchar_t* Value) const   ( Windows only)

static void HOperatorSet.SetWindowParam(HTuple windowHandle, HTuple param, HTuple value)

void HWindow.SetWindowParam(string param, HTuple value)

void HWindow.SetWindowParam(string param, string value)

def set_window_param(window_handle: HHandle, param: str, value: MaybeSequence[Union[str, float, int]]) -> None

Description

The operator set_window_paramset_window_paramSetWindowParamSetWindowParamset_window_param allows setting different parameters of an open window.

General window parameters:

'flush'"flush""flush""flush""flush"

Enables or disables flushing the contents of the window after the display of every object. If 'flush'"flush""flush""flush""flush" is set to 'false'"false""false""false""false", flush_bufferflush_bufferFlushBufferFlushBufferflush_buffer must be called to update the contents of the window. If you want to interact with the content of the graphics window (e.g., zoom or move the content), you have to set 'flush'"flush""flush""flush""flush" to 'true'"true""true""true""true".

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

'region_quality'"region_quality""region_quality""region_quality""region_quality"

Influences the quality of the rendering of region objects. Especially if the region to display has to be scaled down for visualization, 'good'"good""good""good""good" produces a more accurate and pleasing impression. 'low'"low""low""low""low" is a bit inaccurate in these cases but significantly faster. If only the border of the region is displayed (see set_drawset_drawSetDrawSetDrawset_draw), the fractional part of the line width (see set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width) is ignored.

List of values: 'low'"low""low""low""low", 'good'"good""good""good""good".

Default: 'low'"low""low""low""low".

'background_color'"background_color""background_color""background_color""background_color"

Sets the background color of the window WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. The operator clear_windowclear_windowClearWindowClearWindowclear_window uses this color to clear the window.

Suggested values: a string containing the color name (e.g., 'black'"black""black""black""black", 'red'"red""red""red""red").

'window_title'"window_title""window_title""window_title""window_title"

Allows changing the text in the title bar of an already opened HALCON window.

Note that you cannot set 'window_title'"window_title""window_title""window_title""window_title" for buffer windows. This restriction also applies to HDevelop windows, that is windows opened via dev_open_window, which are in fact buffer windows.

Value range: a string containing up to 1023 characters.

'anti_aliasing'"anti_aliasing""anti_aliasing""anti_aliasing""anti_aliasing"

Enables or disables the anti aliasing of contours and regions.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

'graphics_stack'"graphics_stack""graphics_stack""graphics_stack""graphics_stack"

Enables or disables the graphics stack of a window. With activated graphics stack changing the window part with set_partset_partSetPartSetPartset_part triggers the display of previously displayed objects with respect to the new part. With this it is possible to move or scale the contents of the window. This parameter has no effect on the graphics stack of a HDevelop graphics window.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'false'"false""false""false""false".

'graphics_stack_max_element_num'"graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num"

Maximum number of elements in the graphics stack. This number corresponds to the number of display operations recorded. This parameter has no effect on the graphics stack of a HDevelop graphics window and is effective not before the next call to a display operator.

Suggested values: positive number or 'unlimited'"unlimited""unlimited""unlimited""unlimited".

Default: 50.

'graphics_stack_max_memory_size'"graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size"

Limits the memory consumption of the graphics stack. If this limit is exceeded, older display operations are removed from the graphics stack. This parameter has no effect on the graphics stack of a HDevelop graphics window and is effective not before the next call to a display operator.

Suggested values: memory limit in bytes or 'unlimited'"unlimited""unlimited""unlimited""unlimited".

Default: 'unlimited'"unlimited""unlimited""unlimited""unlimited".

'pixel_grid_enable'"pixel_grid_enable""pixel_grid_enable""pixel_grid_enable""pixel_grid_enable"

Enables or disables the pixel grid. If the pixel grid is activated, a grid is drawn around the displayed pixels as soon as the image part is enlarged sufficiently (see 'pixel_grid_min_resolution'"pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution"). This parameter is effective as soon as the window content is updated.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'false'"false""false""false""false".

Restriction: Has no effect, when the HDevelop option Pixel Grid is enabled.

'pixel_grid_min_resolution'"pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution"

Specifies the minimum required resolution of an image pixel in the graphics window which is necessary for the pixel grid to be drawn. This parameter has an effect only if 'pixel_grid_enable'"pixel_grid_enable""pixel_grid_enable""pixel_grid_enable""pixel_grid_enable" has been set to 'true'"true""true""true""true". Assuming this value is set to 20, the pixel grid will be visible as soon as a pixel in the displayed image part takes up at least 20 x 20 pixels in the graphics window. Furthermore, this parameter is effective as soon as the window content is updated.

Suggested values: Positive integer.

Default: 20.

'pixel_grid_color'"pixel_grid_color""pixel_grid_color""pixel_grid_color""pixel_grid_color"

Specifies the color of the lines of the pixel grid. This parameter has an effect only if 'pixel_grid_enable'"pixel_grid_enable""pixel_grid_enable""pixel_grid_enable""pixel_grid_enable" has been set to 'true'"true""true""true""true". Furthermore, this parameter is effective as soon as the window content is updated.

Suggested values: Color value, see set_colorset_colorSetColorSetColorset_color for an overview.

Default: '#696969c0'"#696969c0""#696969c0""#696969c0""#696969c0".

Restriction: Has no effect, when the HDevelop option Pixel Grid is enabled.

'pixel_grid_line_width'"pixel_grid_line_width""pixel_grid_line_width""pixel_grid_line_width""pixel_grid_line_width"

Specifies the line width in pixels that is used to display the lines of the pixel grid. This parameter has an effect only if 'pixel_grid_enable'"pixel_grid_enable""pixel_grid_enable""pixel_grid_enable""pixel_grid_enable" has been set to 'true'"true""true""true""true". Furthermore, this parameter is effective as soon as the window content is updated.

Value range: [1.0, 2000.0].

Default: 1.0.

Parameters concerning the '3d_plot'"3d_plot""3d_plot""3d_plot""3d_plot" (see set_paintset_paintSetPaintSetPaintset_paint):

'angle_of_view'"angle_of_view""angle_of_view""angle_of_view""angle_of_view"

Set the angle of view of the virtual camera used to display the 3D plot. The angle must be provided in radians and lie within the interval [0,PI). An angle of 0 radians implies orthogonal projection. Another way to choose orthogonal projection is to set 'angle_of_view'"angle_of_view""angle_of_view""angle_of_view""angle_of_view" to 'orthogonal'"orthogonal""orthogonal""orthogonal""orthogonal".

Suggested values: 'orthogonal'"orthogonal""orthogonal""orthogonal""orthogonal" or an angle in radians.

Default: 1.22173 (70 degrees).

'axis_captions'"axis_captions""axis_captions""axis_captions""axis_captions"

The axis captions for row, column, and height can be set by passing a tuple containing the strings for the captions in the specified order row, column, and height axis, (e.g., ['row','col','height']). Pass empty strings to display no captions at all.

Value range: A tuple containing three strings. Each string can contain up to 31 characters.

Default: [' ',' ',' '][" "," "," "][" "," "," "][" "," "," "][" "," "," "].

'caption_color'"caption_color""caption_color""caption_color""caption_color"

The color of the axis captions for row, column, and height. You can either pass one color for all three axes or a tuple of three colors to set individual colors for each axis.

Suggested values: a string or tuple with three strings containing the color name (e.g., 'black'"black""black""black""black", 'red'"red""red""red""red").

Default: 'black'"black""black""black""black".

'plot_quality'"plot_quality""plot_quality""plot_quality""plot_quality"

Influences the quality of the 3D plot. Depending on the capabilities of your graphics card better settings for the quality may reduce the frame rate of the 3D plot significantly.

List of values: 'low'"low""low""low""low", 'medium'"medium""medium""medium""medium", 'good'"good""good""good""good", 'best'"best""best""best""best".

Default: 'medium'"medium""medium""medium""medium".

'scale_plot'"scale_plot""scale_plot""scale_plot""scale_plot"

If set to 'true'"true""true""true""true" the height values of an image are transformed into the interval [0,255] before display. If set to 'false' the aspect ratio between row/column and height is considered. Images of the type byte, cyclic, or direction are not scaled, i.e. in their cases this parameter is ignored.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

'display_grid'"display_grid""display_grid""display_grid""display_grid"

If set to 'true'"true""true""true""true" a grid is displayed at height 0.

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

'display_axes'"display_axes""display_axes""display_axes""display_axes"

If set to 'true'"true""true""true""true" coordinate axes are displayed. List of values: 'true'"true""true""true""true", 'false'"false""false""false""false".

Default: 'true'"true""true""true""true".

Attention

The parameters 'anti_aliasing'"anti_aliasing""anti_aliasing""anti_aliasing""anti_aliasing", 'flush'"flush""flush""flush""flush", 'graphics_stack'"graphics_stack""graphics_stack""graphics_stack""graphics_stack", 'graphics_stack_max_element_num'"graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num", 'graphics_stack_max_memory_size'"graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size", and 'region_quality'"region_quality""region_quality""region_quality""region_quality" depend on the library libcanvas, which might not be available on embedded systems.

The parameter 'window_title'"window_title""window_title""window_title""window_title" cannot be set for buffer windows.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

ParamParamParamparamparam (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the parameter.

Default: 'flush' "flush" "flush" "flush" "flush"

List of values: 'angle_of_view'"angle_of_view""angle_of_view""angle_of_view""angle_of_view", 'anti_aliasing'"anti_aliasing""anti_aliasing""anti_aliasing""anti_aliasing", 'axis_captions'"axis_captions""axis_captions""axis_captions""axis_captions", 'background_color'"background_color""background_color""background_color""background_color", 'caption_color'"caption_color""caption_color""caption_color""caption_color", 'display_axes'"display_axes""display_axes""display_axes""display_axes", 'display_grid'"display_grid""display_grid""display_grid""display_grid", 'flush'"flush""flush""flush""flush", 'graphics_stack'"graphics_stack""graphics_stack""graphics_stack""graphics_stack", 'graphics_stack_max_element_num'"graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num""graphics_stack_max_element_num", 'graphics_stack_max_memory_size'"graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size""graphics_stack_max_memory_size", 'pixel_grid_color'"pixel_grid_color""pixel_grid_color""pixel_grid_color""pixel_grid_color", 'pixel_grid_enable'"pixel_grid_enable""pixel_grid_enable""pixel_grid_enable""pixel_grid_enable", 'pixel_grid_line_width'"pixel_grid_line_width""pixel_grid_line_width""pixel_grid_line_width""pixel_grid_line_width", 'pixel_grid_min_resolution'"pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution""pixel_grid_min_resolution", 'plot_quality'"plot_quality""plot_quality""plot_quality""plot_quality", 'region_quality'"region_quality""region_quality""region_quality""region_quality", 'scale_plot'"scale_plot""scale_plot""scale_plot""scale_plot", 'window_title'"window_title""window_title""window_title""window_title"

ValueValueValuevaluevalue (input_control)  string(-array) HTupleMaybeSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Value to be set.

Default: 'false' "false" "false" "false" "false"

List of values: 'best'"best""best""best""best", 'black'"black""black""black""black", 'blue'"blue""blue""blue""blue", 'false'"false""false""false""false", 'good'"good""good""good""good", 'green'"green""green""green""green", 'low'"low""low""low""low", 'medium'"medium""medium""medium""medium", 'orthogonal'"orthogonal""orthogonal""orthogonal""orthogonal", 'red'"red""red""red""red", 'true'"true""true""true""true", 'unlimited'"unlimited""unlimited""unlimited""unlimited", 'white'"white""white""white""white"

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window

Possible Successors

disp_imagedisp_imageDispImageDispImagedisp_image

See also

get_window_paramget_window_paramGetWindowParamGetWindowParamget_window_param, set_window_attrset_window_attrSetWindowAttrSetWindowAttrset_window_attr, set_part_styleset_part_styleSetPartStyleSetPartStyleset_part_style

Module

Foundation