使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

dev_set_window_extentsdev_set_window_extentsDevSetWindowExtentsDevSetWindowExtentsdev_set_window_extents开发设置窗口范围(算子)

名称

dev_set_window_extentsdev_set_window_extentsDevSetWindowExtentsDevSetWindowExtentsdev_set_window_extents — 更改活动浮动图形窗口的位置和大小。

签名

dev_set_window_extents( : : Row, Column, Width, Height : )

Herror dev_set_window_extents(const Hlong Row, const Hlong Column, const Hlong Width, const Hlong Height)

Herror T_dev_set_window_extents(const Htuple Row, const Htuple Column, const Htuple Width, const Htuple Height)

void DevSetWindowExtents(const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height)

static void HWindow::DevSetWindowExtents(Hlong Row, Hlong Column, Hlong Width, Hlong Height)

static void HOperatorSet.DevSetWindowExtents(HTuple row, HTuple column, HTuple width, HTuple height)

static void HWindow.DevSetWindowExtents(int row, int column, int width, int height)

def dev_set_window_extents(row: int, column: int, width: int, height: int) -> None

描述

dev_set_window_extentsdev_set_window_extentsDevSetWindowExtentsDevSetWindowExtentsDevSetWindowExtentsdev_set_window_extents 用于更改当前活动浮动图形窗口的位置和/或大小。

参数 RowRowRowRowrowrowColumnColumnColumnColumncolumncolumn 指定窗口的新位置(左上角)。请注意,在 编辑 -> 参数选择 -> 一般属性 -> 一般选项 -> 窗口打开偏移 下指定的偏移量将分别加到行和列索引上。更多信息,请参阅 “HDevelop 用户指南” 中的 “编辑 菜单” 一章。位置的负坐标将被忽略,即窗口不会沿该方向移动。

参数 WidthWidthWidthWidthwidthwidthHeightHeightHeightHeightheightheight 指定窗口的新尺寸。这是实际显示图标对象的内部区域的尺寸。如果这两个值中的任一个为负数,则该维度将保持不变。

注意

此算子仅适用于单个浮动图形窗口,即既未停靠也未以标签页形式显示的图形窗口。

切勿使用 set_window_extentsset_window_extentsSetWindowExtentsSetWindowExtentsSetWindowExtentsset_window_extents 来更改 HDevelop 图形窗口的大小和位置。应改用 dev_set_window_extentsdev_set_window_extentsDevSetWindowExtentsDevSetWindowExtentsDevSetWindowExtentsdev_set_window_extents 算子。

使用 HDevelop 的代码导出功能时,为该算子生成的代码的行为可能与相关的 HALCON 算子有所不同。有关 HDevelop 图形算子导出到不同编程语言的详细说明,请参阅 “HDevelop 用户指南” 中的 代码导出 -> 代码生成的通用方面 -> 图形窗口 一章。

参数

RowRowRowRowrowrow (输入控制)  rectangle.origin.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

左上角的行索引。

默认值: 0

最小增量: 1

建议增量: 1

限制: Row >= 0 || Row == -1

ColumnColumnColumnColumncolumncolumn (输入控制)  rectangle.origin.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

左上角的列索引。

默认值: 0

最小增量: 1

建议增量: 1

限制: Column >= 0 || Column == -1

WidthWidthWidthWidthwidthwidth (输入控制)  rectangle.extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

窗口的宽度。

默认值: 256

最小增量: 1

建议增量: 1

限制: Width > 0 || Width == -1

HeightHeightHeightHeightheightheight (输入控制)  rectangle.extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

窗口的高度。

默认值: 256

最小增量: 1

建议增量: 1

限制: Height > 0 || Height == -1

示例(HDevelop)

dev_close_window ()
read_image (For5, 'for5')
get_image_size (For5, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
dev_display (For5)
stop ()
dev_set_window_extents (-1,-1,Width/2,Height/2)
dev_display (For5)
stop ()
dev_set_window_extents (200,200,-1,-1)

结果

如果指定参数的值正确,dev_set_window_extentsdev_set_window_extentsDevSetWindowExtentsDevSetWindowExtentsDevSetWindowExtentsdev_set_window_extents 返回 2 (H_MSG_TRUE)。否则,将抛出一个异常并返回错误代码。

可能的后继

dev_displaydev_displayDevDisplayDevDisplayDevDisplaydev_display, dev_set_lutdev_set_lutDevSetLutDevSetLutDevSetLutdev_set_lut, dev_set_colordev_set_colorDevSetColorDevSetColorDevSetColordev_set_color, dev_set_drawdev_set_drawDevSetDrawDevSetDrawDevSetDrawdev_set_draw, dev_set_partdev_set_partDevSetPartDevSetPartDevSetPartdev_set_part

另见

set_window_extentsset_window_extentsSetWindowExtentsSetWindowExtentsSetWindowExtentsset_window_extents

模块

基础