halcon算子翻译——dev_set_window_extents

名称

dev_set_window_extents - 更改活动图形窗口的位置和大小。

用法

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

描述

  dev_set_window_extents更改当前活动图形窗口的位置和/或大小。

  参数Row和Column指定窗口的新位置(左上角)。 根据HDevelop的窗口模式,坐标(0,0)分别指的是在MDI模式的主HDevelop窗口中的窗口区域的左上角,以及在SDI模式下的屏幕的左上角。 该位置的负坐标被忽略,即在相应的方向上窗口不会被移动。

  参数Width和Height指定窗口的新大小。 这是实际显示图形对象的内部部分的大小。 如果其中一个值是负数,那么相应的尺寸将保持不变。

注意

  切勿使用set_window_extents更改HDevelop图形窗口的大小和位置。 必须使用算子dev_set_window_extents。

  使用HDevelop的代码导出功能,为该算子生成的代码可能与相关的HALCON算子具有不同的行为。 有关将HDevelop图形算子导出为不同编程语言的代码的详细说明,请参阅“HDevelop User's Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。

参数

Row (input_control) rectangle.origin.y → (integer)
  Row index of upper left corner.
  Default value: 0
  Typical range of values: 0 ≤ Row
  Minimum increment: 1
  Recommended increment: 1
  Restriction: (Row >= 0) || (Row == -1)


Column (input_control) rectangle.origin.x → (integer)
  Column index of upper left corner.
  Default value: 0
  Typical range of values: 0 ≤ Column
  Minimum increment: 1
  Recommended increment: 1
  Restriction: (Column >= 0) || (Column == -1)


Width (input_control) rectangle.extent.x → (integer)
  Width of the window.
  Default value: 256
  Typical range of values: 0 ≤ Width
  Minimum increment: 1
  Recommended increment: 1
  Restriction: (Width > 0) || (Width == -1)


Height (input_control) rectangle.extent.y → (integer)
  Height of the window.
  Default value: 256
  Typical range of values: 0 ≤ Height
  Minimum increment: 1
  Recommended increment: 1
  Restriction: (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_extents返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码。

Possible Successors

dev_display, dev_set_lut, dev_set_color, dev_set_draw, dev_set_part

See also

set_window_extents

模块

Foundation

HDevelop例程

vector_to_proj_hom_mat2d.hdev   Rectify image of stadium to simulate overhead view
gen_projective_mosaic.hdev         Combine several images of a PCB into a large mosaic image
dev_set_window_extents.hdev      Set size and position of a graphics window in HDevelop
dev_set_part.hdev              Set the part of an image to be displayed (zoomed) in a graphics window in HDevelop
circular_barcode.hdev        Read a circular bar code printed on a CD
cbm_caliper.hdev          Measure the setting of a caliper using component-based matching in a perspectively distorted image
barcode_orientation.hdev        Use the bar code parameter 'orientation'

转载于:https://www.cnblogs.com/xhiong/p/dev_set_window_extents.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值