set_window_paramT_set_window_paramSetWindowParamSetWindowParamset_window_param (Operator)

Name

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_paramSetWindowParamSetWindowParamSetWindowParamset_window_param allows to set different parameters of an open window.

General window parameters:

'flush'"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""flush" is set to 'false'"false""false""false""false""false", flush_bufferflush_bufferFlushBufferFlushBufferFlushBufferflush_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""flush" to 'true'"true""true""true""true""true".

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

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

'region_quality'"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""good" produces a more accurate and pleasing impression. 'low'"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_drawSetDrawSetDrawSetDrawset_draw), the fractional part of the line width (see set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width) is ignored.

Possible values: 'low'"low""low""low""low""low", 'good'"good""good""good""good""good".

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

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

Sets the background color of the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. The operator clear_windowclear_windowClearWindowClearWindowClearWindowclear_window uses this color to clear the window.

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

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

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

Possible values: a string containing up to 1023 characters.

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

Enables or disables the anti aliasing of contours and regions.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

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

'graphics_stack'"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_partSetPartSetPartSetPartset_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.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

Default: 'false'"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""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.

Possible values: positive number or 'unlimited'"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""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.

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

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

'pixel_grid_enable'"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""pixel_grid_min_resolution"). This parameter is effective as soon as the window content is updated.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

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

Restriction: Has no effect, when 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""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""pixel_grid_enable" has been set to 'true'"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.

Possible values: Positive integer.

Default: 20.

'pixel_grid_color'"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""pixel_grid_enable" has been set to 'true'"true""true""true""true""true". Furthermore, this parameter is effective as soon as the window content is updated.

Possible values: Color value, see set_colorset_colorSetColorSetColorSetColorset_color for an overview.

Default: '#696969c0'"#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""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""pixel_grid_enable" has been set to 'true'"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""3d_plot" (see set_paintset_paintSetPaintSetPaintSetPaintset_paint):

'angle_of_view'"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""angle_of_view" to 'orthogonal'"orthogonal""orthogonal""orthogonal""orthogonal""orthogonal".

Possible values: 'orthogonal'"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""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.

Possible values: A tuple containing three strings. Each string can contain up to 31 characters.

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

'caption_color'"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.

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

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

'plot_quality'"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.

Possible values: 'low'"low""low""low""low""low", 'medium'"medium""medium""medium""medium""medium", 'good'"good""good""good""good""good", 'best'"best""best""best""best""best".

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

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

If set to 'true'"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.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

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

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

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

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

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

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

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

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

Attention

The parameters 'anti_aliasing'"anti_aliasing""anti_aliasing""anti_aliasing""anti_aliasing""anti_aliasing", 'flush'"flush""flush""flush""flush""flush", 'graphics_stack'"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_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""graphics_stack_max_memory_size", and 'region_quality'"region_quality""region_quality""region_quality""region_quality""region_quality" depend on the library libcanvas, which might not be available on embedded systems.

Execution Information

Parameters

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

Window handle.

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

Name of the parameter.

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

List of values: 'angle_of_view'"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""anti_aliasing", 'axis_captions'"axis_captions""axis_captions""axis_captions""axis_captions""axis_captions", 'background_color'"background_color""background_color""background_color""background_color""background_color", 'caption_color'"caption_color""caption_color""caption_color""caption_color""caption_color", 'display_axes'"display_axes""display_axes""display_axes""display_axes""display_axes", 'display_grid'"display_grid""display_grid""display_grid""display_grid""display_grid", 'flush'"flush""flush""flush""flush""flush", 'graphics_stack'"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_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""graphics_stack_max_memory_size", 'pixel_grid_color'"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_enable", 'pixel_grid_line_width'"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""pixel_grid_min_resolution", 'plot_quality'"plot_quality""plot_quality""plot_quality""plot_quality""plot_quality", 'region_quality'"region_quality""region_quality""region_quality""region_quality""region_quality", 'scale_plot'"scale_plot""scale_plot""scale_plot""scale_plot""scale_plot", 'window_title'"window_title""window_title""window_title""window_title""window_title"

ValueValueValueValuevaluevalue (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 value: 'false' "false" "false" "false" "false" "false"

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

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

Possible Successors

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

See also

get_window_paramget_window_paramGetWindowParamGetWindowParamGetWindowParamget_window_param, set_window_attrset_window_attrSetWindowAttrSetWindowAttrSetWindowAttrset_window_attr, set_part_styleset_part_styleSetPartStyleSetPartStyleSetPartStyleset_part_style

Module

Foundation